For each friend $ i $ (where $ i = 1, 2, \ldots, n $):
The total number of friends who shout “Huzzah!” can be expressed as: $X = \sum_{i=1}^{n} X_i$. The expected value of $X$ is $E(X) = E(\sum_{i=1}^{n} X_i)$.
Using the linearity of expectation, we can simplify the expected value to the following: $E(X) = \sum_{i=1}^{n} E(X_i)$
Since each friend has the same probability of shouting “Huzzah!” (by symmetry), we know: $E(X) = n \cdot E(X_1)$
Our task now reduces to finding $ E(X_1) $, the probability that a given friend shouts “Huzzah!“.
A friend shouts “Huzzah!” if:
For three coin flips (Left Player, Current Player, Right Player), the probability distributions are:
So the probability is: $P(X_1 = 1) = \frac{2}{8} = \frac{1}{4}$
Thus: $E(X_1) = \frac{1}{4}$
Substituting into the linearity formula we calculated above:
$E(X) = n \cdot E(X_1) = n \cdot \frac{1}{4} = \frac{n}{4}$