Artificial intelligent assistant

Probability of one candidate passing the test. There is a class of many students and viva is going on for them. For each student the time taken for viva is given and the probability that he will pass is given.If one student fails the examiner wills stop conducting the viva. If we have both these what is the minimum expected time that we can understand at least one has failed or all have passed the viva. That is expected time at which viva will be finished.

Ok, in a concrete case with three students ordered with probabilities of passing of $p_1 = 0.1, p_2 = 0.5$ and $p_3 = 0.2$ together with times of $T_1 = 3$, $T_2 = 7$ and $T_3 = 9$, then the expected total time by similar logic is

$$E[t] = Pr(\text{ Student #1 fails })T_1 + Pr(\text{ Student #1 passes but #2 fails })(T_1 + T_2) $$ $$+ Pr(\text{ Students #1 and #2 pass })(T_1 + T_2 + T_3) $$ $$ = (1-p_1)T_1 + p_1(1-p_2)(T_1 + T_2) + p_1p_2(T_1 + T_2 + T_3)$$ $$ = \ ...$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 35a5ea090072e9440f60ad46c561b9b8