© All Rights reserved @ LearnWithDash
Step 1: Understand the Random Variable
Let X be a random variable defined by the outcome of 5 coin tosses as follows:
If there are exactly 3 consecutive heads (but not 4 or 5), then X = 3.
If there are exactly 4 consecutive heads (but not 5), then X = 4.
If there are 5 consecutive heads, then X = 5.
Otherwise, X = -1.
Step 2: Total Number of Possible Outcomes
Since each coin toss has 2 possible outcomes (Head (H) or Tail (T)), the total number of possible sequences for 5 tosses is
$2^5 = 32.$
Step 3: Probability of Getting 3 Consecutive Heads (Exactly 3 in a row)
The provided analysis shows there are 5 favorable outcomes where exactly 3 consecutive heads appear (and not 4 or 5):
Sequences like HHHTT, THHHT etc., collectively count up to 5 valid such outcomes.
Hence, the probability is
$P(X=3) = \frac{5}{32}.$
Step 4: Probability of Getting 4 Consecutive Heads (Exactly 4 in a row)
The two favorable outcomes for exactly 4 consecutive heads (but not 5) are:
HHHHT
THHHH
Hence, the probability is
$P(X=4) = \frac{2}{32}.$
Step 5: Probability of Getting 5 Consecutive Heads
There is only 1 favorable outcome with all heads: HHHHH. Thus,
$P(X=5) = \frac{1}{32}.$
Step 6: Probability of Getting None of These (X = -1)
All remaining outcomes that do not have 3, 4, or 5 consecutive heads will lead to X = -1. Hence,
$$
P(X=-1) = 1 - \left(P(X=3) + P(X=4) + P(X=5)\right)
= 1 - \left(\frac{5}{32} + \frac{2}{32} + \frac{1}{32}\right)
= 1 - \frac{8}{32}
= \frac{24}{32}.
$$
Step 7: Calculate the Expected Value of X
The expected value (or mean) of a discrete random variable is given by
$ E(X) = \sum x \, P(X = x). $
Substituting the values we have:
$$
E(X)
= (-1)\times\frac{24}{32}
+ 3\times\frac{5}{32}
+ 4\times\frac{2}{32}
+ 5\times\frac{1}{32}.
$$
Combine the terms:
$$
E(X) = -\frac{24}{32} + \frac{15}{32} + \frac{8}{32} + \frac{5}{32}
= \frac{-24 + 15 + 8 + 5}{32}
= \frac{4}{32}
= \frac{1}{8}.
$$
Final Answer
The expected value of X is
$\frac{1}{8}.$