Answer:
The expected value is 5.
Step-by-step explanation:
- Let X represent the number of tosses until the event described in the question happens.
- Let Y represent the number of tosses with coin A until Heads is obtained.
- Let Z represent the number of tosses with coin B until Heads is obtained.
As we can see, X=Y+Z. Then, by the linearity of the expected value operator, we have that

- We will compute E(Y) and E(Z).
Observe that Y and Z have countable sets of outcomes (1,2,3,....) then,
,
,
Then:
- for each
, the probability of Y=n is given by
(because the first n-1 tosses must be Tails and the n-th must be Heads). Therefore

- For each
, the probability of Z=n is given by
(because the first n-1 tosses must be Tails and the n-th must be Heads). Therefore

Observe that, by the <u>geometric series formula</u>:

Therefore

Finally, E(X)=E(Y)+E(Z)=2+3=5.