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
 A: If $X$ is the number of successes (not trials) until the first failure, then $\Pr(X=n)=p^n(1-p)$ for $n=0,1,2,\dots$. 
This cannot ever be equal to $1$ if $p\ne 0$. 
If you want to solve $p^n(1-p)=a$, given $0\lt p\lt 1$, rewrite the equation as 
$p^n=\frac{a}{1-p}$.
and take the logarithm of both sides. 
Remark: As was pointed out in the answer, except in the trivial case we cannot have $\Pr(X=n)=1$. Perhaps you want to show that 
$$\sum_0^\infty p^n(1-p)=1.$$
Let $0\lt p\lt 1$. Then the above sum is an infinite geometric series, and by the usuual formula it does sum to $1$. We do not even have to compute, since $\sum_0^\infty \Pr(X=n)$ must be $1$. 
A: 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}$.
A: Using the equation you gave, $1 = p^n (1-p)$
You should get the term with "n" by itself:
$1/(1-p) = p^n$
and then simply take the logarithm
$-log(1-p) = n*log(p)$
$n = -log(1-p)/log(p)$
However, I think that the problem itself might be more complicated than you've realized. It is the sum of all possible values of "n" - not just one of them - from 0 to ∞ that would make the probability equal to 1.
$1 ≠ (p^n)(1-p)$
$1 = (1-p)$$(p^0+p^1+p^2+p^3+p^4+...)$
