Please help with basic issues

Hi, all.

I took single-variable calc in high school, and will be moving on to multi-variable calc (calc 3) this summer at the community college. However, it surprises me that in all of this we have not yet nor will we discuss probability theory. The only probability I learned was very basic stuff from grade school algebra. About the only thing I remember is that the probability of $\displaystyle n$ events happening given $\displaystyle n$ instances, with each event having an individual probability of $\displaystyle p$, is $\displaystyle p^n$. That's pretty much all I have to go on.

That said, I came across a random problem which I think I've solved, but which I'd like someone to explain to me in more proper, formal language...

Suppose you have a die with $\displaystyle n$ sides, and you roll it again and again, until you roll a certain single-number result (e.g. roll a six-sided die until you get a 4). Then you repeat the experiment ad nauseum. Out of the multiple experiments, what is the average number of rolls it will take for you to get that certain result?

My solution is as follows:

Step one: The probability $\displaystyle q$ of rolling an undesired result $\displaystyle r$ times in a row is $\displaystyle (\frac{n-1}{n})^r$.

Step two (*this is the step with which I need the most help*): To get an average number of throws, we must let $\displaystyle q=\frac{1}{2}$. I know this intuitively, but how do I show it on paper?

Remaining steps:

$\displaystyle \frac{1}{2} = (\frac{n-1}{n})^r$

$\displaystyle \ln{\frac{1}{2}} = \ln{(\frac{n-1}{n})^r}$

$\displaystyle \ln{\frac{1}{2}} = r \ln{\frac{n-1}{n}}$

$\displaystyle r = \frac{\ln{\frac{n-1}{n}}}{\ln{\frac{1}{2}}}

$

Thus, $\displaystyle r$ is the average number of throws.

First, is my conclusion correct? If so, can someone please help me understand the steps?

Thanks!