How to calculate expected cost of a lottery game? I'm trying to guess the design of a very complex lottery mechanism from a game to estimate its costs. Here the mechanism :


*

*Each pull costs 1$.

*Draws are with replacement.

*Chances to get an item is heterogeneous meaning : There are 5 items to earns. (Probability for items 1 to 5 are : 5%,10%,15%,20%,50%)

*Every 10 pulls there's a rate up for rarest items (Probability for items changes, 1 to 5 are : 10%,20%,30%,15%,15%)


How to answer theses questions :


*

*What is the formula connecting pulls / chances / rate up ?

*How many pulls ($) do I need to obtain Item x ?


This looks like the coupon's collector problem but I really don't know how to solve it. If you have any idea please let me know. Thank you.
 A: We want to figure out the probability distribution followed by the number of pulls needed to get a particular item, for example the first item.
For that, we will value the result as a Bernoulli random variable (a coin flip), since for any pull either we get the result or we do not.
What would be the probability of getting it at the nth pull? If the probabilities were the same in every pull, the distribution would be geometric, but since we have the special 10th pull chances the result becomes a bit more elaborate.
Let's see if we can find a pattern.
The probability of getting it at the 1st pull is a mere 5%.
The probability of getting it at the 2nd pull is the probability of failing the first pull (95% probability) times the probability of getting it in the second (5% probability).
In general, up to the 9th pull the chances of getting object 1 at the nth pull are $(0.95)^{n-1}(0.05)$.
The 10th is a special pull, so the formula changes to be $(0.95)^{9}(0.1)$.
It is easy to see how this generalizes: the probability of getting the 1st item at the nth throw in general is equal to $(0.95)^{N(n)}(0.9)^{S(n)}p_n$, where $N(n)$ is the number of regular pulls before the nth pull, $S(n)$ is the number of special pulls before the nth pull and $p_n$ is the probability of getting the first item in the nth throw, either $0.05$ if n is not a multiple of 10 or $0.1$ if n is a multiple of 10.
How do we compute $N(n)$ and $S(n)$?
Well, clearly $N(n) = (n-1) - S(n)$. And $S(n) = \left \lfloor{\frac{n-1}{10}}\right \rfloor $.
Putting everything together, we get that the probability $P_n$ of pulling the first item at the $n$th pull is exactly 
$$
P(n) =
\begin{cases}
       (0.95)^{(n-1) - \left \lfloor{\frac{n-1}{10}}\right \rfloor}(0.9)^{\left \lfloor{\frac{n-1}{10}}\right \rfloor}(0.05) &\quad\text{if } n \ne 0 \mod 10 \\
       (0.95)^{(n-1) - \left \lfloor{\frac{n-1}{10}}\right \rfloor}(0.9)^{\left \lfloor{\frac{n-1}{10}}\right \rfloor}(0.1) &\quad\text{if } n = 0 \mod 10\\
\end{cases}
$$
How many pulls do we expect to make before we get the first item? In order to answer that question, we can compute the expectation $E=\sum_{k=1}^\infty k*P(k)$.
Since the function is not too regular the result is not too pretty. It can be approximated fairly well just by summing the first 100 terms, for examples, since after that the probability vanishes.
Hopefully you can see how to adapt this reasoning to the other cases.
