Consider an experiment that is successful with probability $0.8$. We repeat this experiment (independently) until it is successful for the first time. The first $5$ times we do the experiment, we have to pay $\$10$ per experiment. After this, we have to pay $\$5$ per experiment. Define the random variable $X$ to be the total amount of money that we have to pay during all experiments. Determine the expected value $(X)$.
I tried solving it using linearity of expectations and geometric distribution, but I am sure I was wrong.
Any help on how to solve this?
The probability of the program lasting precisely $n$ experiments is $$ (0.2)^{n-1}\cdot (0.8) $$
Break the problem into two regions: Find the expected number and cost of expensive experiments, and add the cost of inexpensive experiments.
The expected cost of the expensive experiments, each of which requires $n-1$ previous failures to be needed, is $$ 10 \sum_{n=1}^5 (0.2)^{n-1} $$ which is just a geomentric sum with value $$ 10 \cdot \cdot \frac{1-(0.2)^5}{1-(0.2)} = \$12.496 $$ The expected cost of the \$5 experiments, each of which requires $n-1$ previous failures to be needed, is $$ 5 \sum_{n=6}^\infty (0.2)^{n-1} = 5 \cdot (0.2)^5 \frac{1}{1-(0.2)} =\$0.002 $$ And the sum of these is $$ \$12.498 $$