# Expected number of times before winning the lottery $n$ times

Let $p,n$ be positive integers. Suppose that every time you buy the lottery, you have a $\dfrac1p$ chance of winning it (independently of other times). What is the expected number of times you have to buy the lottery before you win $n$ times?

Intuitively, it should be $pn$, but how to prove it?

Using linearity of expectations, it's easy to see that after buying $k$ times, you'll have won $\dfrac{k}{p}$ times. But that doesn't seem to help with the above question.

• do you mean $\frac{n}{p}$ for the answer? – freak_warrior Nov 22 '13 at 4:12
• @freak_warrior No, I really mean $pn$. (Sorry, my way of defining the probability $1/p$ might be the inverse of what you might usually expect) – Kunal Nov 22 '13 at 4:13
• Then the 2 pieces of information doesn't tally. – freak_warrior Nov 22 '13 at 4:37

Let the probability of winning the lottery on any trial be $w$ (I refuse to use $\frac{1}{p}$ as the name for this probability.)
Let $X_1$ be the number of trials up to and including the first win, $X_2$ the number of trials between the first win (exclusive) and the second win (inclusive) and so on up to $X_n$.
We want $E(X_1+\cdots+X_n)$, which is $E(X_1)+\cdots +E(X_n)$.
The $X_i$ each have geometric distribution. It is a standard fact that $E(X_i)=\frac{1}{w}$.
Thus our desired expectation is $\frac{n}{w}$.