# Illegal lottery problem (Merging dependent bernoulli trials)

Suppose I am in a town that playing lottery is illegal. If I buy a ticket for 1 dollar, I will win the lottery with probability $p$. Each time I buy a ticket, the police may catch me and confiscate the ticket and charge me a penalty of $N$ dollars for playing. Assume this occurs with probability $q$. I am fully adamant that I will eventually win the lottery (and it's worth it), hence I keep playing till I win. What is the expected amount of money I need to spend (including in fines), in order to win the lottery? Any other comments on how to formulate or approach the problem are of interest too.

Note that $p$ and $q$ are independent. Therefore I win with probability $p(1-q)$, get fined with probability $q=pq+q(1-p)$ and nothing happens with probability $(1-p)(1-q)$ (except for spending a dollar).

You're certain to spend $\$1$. You also spend an expected$qN$on a potential fine this time around. And then with probability$1-p(1-q)$you have to do the whole thing all over again. So the expected cost$E\$ satisfies
$$E=1+qN+\left[1-p(1-q)\right]E\;,$$
$$E=\frac{1+qN}{p(1-q)}\;.$$