Solving for n in the exponent. Well, it's another question I feel like I should know. I'm trying to model the number of successes before the first failure. The probability of successes is given as $p$, which makes the probability of failure $(1-p)$.
The probability mass function, as I've calculated it, turns out to be $p^{n-1}(1-p)$, since we will stop at the first failure.
I'm trying to solve the following equation for n, but I'm at a loss for how to get it out of the exponent.
$1=p^{n-1}(1-p)$
I would appreciate any help anyone can give me.
Thanks

If $p^{n-1} (1-p) = 1$ then $p^{n-1} = \frac{1}{1-p}$ and so $n-1 = \log_p \frac{1}{1-p}$ and $n = 1+\log_p \frac{1}{1-p}$.
