Question
Consider a biased coin that lands heads with probability and tails with probability . We use ``'' and ``'' to record heads and tails, respectively. The coin is tossed repeatedly. Let denote the number of tosses required for the pattern ``'' to appear for the first time. Find . (Hint: There are two approaches. One is to compute conditional expectations and then use the law of total expectation to compute separately to obtain the result. The other approach is to try to prove that and are independent, and then construct the generating function of to solve the problem.)
Step-by-step solution
Let denote the number of tosses required for two consecutive heads (HH) to appear for the first time. The coin lands heads with probability and tails with probability . Let . Consider the outcome of the first toss. If the first toss is tails (T), with probability : one toss has been made but no progress toward "HH" has occurred; the process effectively restarts. Thus the expected total number of tosses from this point is . If the first toss is heads (H), with probability : one toss has been made and one step of progress toward the goal. Now consider the second toss. If the second toss is heads (H), with probability : the pattern "HH" has appeared and the process terminates. The total number of tosses is . If the second toss is tails (T), with probability : the pattern "HT" has appeared; the process has not ended. Two tosses have been made, but the accumulated "H" is broken, and the process effectively restarts. Thus the expected total number of tosses from this point is . By the law of total expectation, expressing as the weighted average of the expected values over all possible cases: Solving for : Therefore, . Let . Using the law of total expectation, decompose : If the first toss is tails (T), the total number of tosses is , where is the number of tosses from a fresh start until "HH" appears, having the same distribution as . Taking the expectation of the square: . If the first toss is heads (H), consider the second toss: If the second toss is heads (H), the total number of tosses is , and its square is . If the second toss is tails (T), the total number of tosses is , where has the same distribution as . Taking the expectation of the square: . Combining the above cases yields the equation for : Expanding and simplifying: Substituting : Multiplying both sides by to clear the denominator: Therefore, . Using the variance formula :
Final answer
The expectation is . The variance is .
Marking scheme
The following is the grading rubric tailored for this probability problem. This rubric treats the official solution as fully correct.
1. Checkpoints (max 7 pts total)
Score exactly one chain | take the maximum subtotal among chains; do not add points across chains.
Chain A: Conditional Expectation Method / System of Equations (Official Solution Path)
- Expectation equation setup [2 pts] [Additive]: Correctly writing the recursive equation for .
- For example: or an equivalent expanded/simplified form.
- *Note: If only the equation structure is correct (reflecting the restart and step-counting logic) but the coefficients have minor errors, award 1 pt.*
- Expectation solution [1 pt] [Additive]: Correctly solving .
- Second moment equation setup [2 pts] [Additive]: Correctly writing the recursive equation for .
- Key requirement: Must correctly expand the squared expectation (i.e., reflecting ).
- *If the cross term is omitted (i.e., incorrectly writing ), no credit for this item or subsequent computation items.*
- Second moment solution [1 pt] [Additive]: Substituting and correctly solving (or a correct equivalent intermediate expression).
- Final variance result [1 pt] [Additive]: Using to combine and algebraically simplify, obtaining the final result .
Chain B: Probability Generating Function (PGF) Method
- PGF equation setup [2 pts] [Additive]: Correctly establishing the self-referential equation for .
- For example: .
- PGF closed-form expression [1 pt] [Additive]: Correctly solving for the explicit form of , e.g., .
- Expectation computation [1 pt] [Additive]: Correctly computing via .
- Second derivative / second moment computation [2 pts] [Additive]: Correctly differentiating twice to compute or , showing a correct and complete calculus derivation.
- Final variance result [1 pt] [Additive]: Combining the above results to correctly compute .
Total (max 7)
2. Zero-credit items
- Only listing the standard geometric distribution formula (e.g., or ) without deriving anything specific to the "HH" pattern.
- Only listing the definition of expectation or variance (e.g., ) without any specific substitution or computation for this problem.
- Writing the answer directly without proof, and the answer is incorrect.
3. Deductions
- Arithmetic error [-1]: After setting up the correct equation, a simple algebraic or sign error leads to an incorrect final result (one deduction per error, but at most 1 per chain).
- Logical gap [Cap at 3/7]: In Chain A, if the cross term () arising from the square expansion is omitted when computing the second moment , this is a core logical error; that part and the subsequent variance part receive no credit (score capped at the expectation portion of 3 pts).
- Unsimplified result [No Penalty]: If the final result is in a correct form (e.g., written as a difference of fractions) but not combined into the single-fraction form of the official answer, no penalty is applied as long as it is mathematically equivalent.