Analyzing the Setup
Welcome, future engineer. Today, we aren't just solving a probability problem; we are mapping the life cycle of a game. Imagine you are holding a coin that is biased to favor the Head.
We are going to toss this coin, and the game will end either when we see the face of a Head or when we accumulate the misfortune of three Tails. Our goal is to find the expected value of the number of tosses, X.
Decoding the Bias
Before we toss, we must understand our tool. The problem states that a Head is 3 times as likely as a Tail. Let the probability of a Tail be p. Then, the probability of a Head is 3p.
Since these are the only two possible outcomes, their sum must be unity:
P(H)+P(T)=1
Substituting our variables, we get
3p+p=1, which simplifies to
4p=1. Thus, we calibrate our instrument as follows:
P(T)=41,P(H)=43
Mapping the Stopping Conditions
Now, let us visualize the game. The random variable X represents the number of tosses.
If the first toss is a Head, the game ends immediately (X=1). If the first is a Tail, we continue. If the second is a Head, the game ends (X=2).
If the second is also a Tail, we toss again. If the third is a Head, or if the third is a Tail (completing our set of three), the game ends (X=3). Thus, the possible values are X∈{1,2,3}.
Calculating the Probabilities
For
X=1, the sequence is simply
H. The probability is:
P(X=1)=P(H)=43
For
X=2, the sequence must be
TH. Using the multiplication rule for independent events:
P(X=2)=P(T)⋅P(H)=41⋅43=163
For
X=3, the game reaches the third toss if we have already seen two Tails. The sequences that end at
X=3 are
TTH and
TTT. Both trigger the end of the game:
P(X=3)=P(TTH)+P(TTT)
Calculating these individual probabilities:
P(TTH)=41⋅41⋅43=643
P(TTT)=41⋅41⋅41=641
Summing these, we obtain:
P(X=3)=643+641=644=161
The Expected Value
The mean, or expected value
E(X), is the weighted average of all possible outcomes:
E(X)=∑xi⋅P(X=xi)
Substituting our values:
E(X)=1⋅P(X=1)+2⋅P(X=2)+3⋅P(X=3)
Plugging in the calculated probabilities:
E(X)=1(43)+2(163)+3(161)
To add these, we use a common denominator of
16:
E(X)=1612+166+163=1621
The final expected value of the number of tosses is 1621.