Interns of company XYZ has to pass 2 training programs in sequence. So Program 2 can only be taken after an intern has done Program 1. Each program has a success rate of 40% and each program takes 3 months to complete. When an intern fails a program, she can retake that program as many times as required.
How can I calculate the average time required to complete the two programs based on this data only?
Apologies if this is so basic. I'm just confused how to calculate the average without the total number of interns.
The sample space in this problem is $ \Omega = \{ 6, 9, 12, 15 \dots \infty \} $. This is because at best the intern will complete the program in $ 6 $ months. Now, to find the expected value, we have to find the probabilities of each of these events.
Going by this, we notice that we have to find the following summation
$$ \large\displaystyle\sum\limits_{i=2}^{\infty} (i - 1) \times 0.4^2 \times 0.6^{i-2} $$
But to find the expected value, we need to also include the time required. This is the summation
$$ \large\displaystyle\sum\limits_{i=2}^{\infty} 3i \times (i - 1) \times 0.4^2 \times 0.6^{i-2} $$
This evaluates to $ \boxed{15} $ $\text{months}$ and that is our answer.
Another way to do the same thing is the following:
We can view the completion of the first training program as a Geometric random variable $ X_1 $ with parameter $ p = 0.4 $ as the probability of success. The expected value of a geometric variable is $ E[X_1] = \dfrac{1}{p} $ but here since instead of the steps being $ \{ 1, 2, 3, \dots \} $ they are $ \{ 3, 6, 9, \dots \} $, we have $ E[X_1] = \dfrac{3}{0.4} = 7.5 $. After this happens, the second time the intern needs to pass the program is also an identical random variable, $ X_2 $ (due to memorylessness) with expected value $ E[X_2] = 7.5 $ By linearity of expectation,$$ E[X_1 + X_2] = E[X_1] + E[X_2] = 7.5 + 7.5 = 15 $$ Or as you observed, $$ \dfrac{3}{0.4} + \dfrac{3}{0.4} = \dfrac{6}{0.4} = 15 $$
The general form when the probability of success is $ p $ is
$$ \large\displaystyle\sum\limits_{i=2}^{\infty} 3i \times (i - 1) \times p^2 \times (1 - p)^{i-2} $$
If the probability of success for the first and second tests are different, that is the probability of success on the first test is $ p_1 $ and $ p_2 $ for the second test, then the expected value is given by
$$ \large\displaystyle\sum\limits_{i=2}^{\infty} 3i \times p_1 \times p_2 \times \left( \displaystyle\sum\limits_{j=0}^{i-2} (1 - p_1)^j \times (1 - p_2)^{i - j - 2} \right)$$