Question
Consider a biased coin that lands heads with probability and tails with probability , where the outcomes are recorded as ``'' and ``'' 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 apply the law of total expectation to calculate and separately, thereby obtaining the result. The other approach is to show 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 until two consecutive heads (HH) first appear. 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), which occurs with probability , then one toss has been used but no progress has been made toward the goal "HH"; the process effectively restarts from scratch. Hence the expected total number of tosses in this case is . If the first toss is heads (H), which occurs with probability , then one toss has been used and one step of progress has been made. We now consider the outcome of the second toss. If the second toss is heads (H), which occurs with probability , then "HH" has appeared and the process terminates. The total number of tosses is . If the second toss is tails (T), which occurs with probability , then the pattern "HT" has occurred and the process has not terminated. Two tosses have been used, but the accumulated "H" has been broken, so the process restarts from scratch. The expected total number of tosses in this case is . By the law of total expectation, equals the weighted average of the expected values over all cases: Solving for : Therefore, . Let . Using the law of total expectation, we decompose as follows: If the first toss is tails (T), the total number of tosses is , where is the number of additional tosses from a fresh start until "HH" appears, having the same distribution as . Taking the expectation of the square gives . If the first toss is heads (H), we 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 gives . Combining the above cases yields the equation for : Expanding and collecting terms in : Substituting the previously obtained : Multiplying both sides by to clear the denominator: Therefore, . Computing the variance via :
Final answer
The expectation is . The variance is .
Marking scheme
Below is the rubric tailored to this probability theory problem. The official solution is taken 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 / System of Equations (Official Solution Path)
- Setting up the expectation equation [2 pts] [Additive]: Correctly formulate the recursive equation for .
- For example: , or an equivalent form obtained by expanding and simplifying.
- *Note: If the equation has the correct structure (reflecting the ideas of resetting and step accumulation) but contains minor coefficient errors, award 1 pt.*
- Solving for the expectation [1 pt] [Additive]: Correctly obtain .
- Setting up the second moment equation [2 pts] [Additive]: Correctly formulate the recursive equation for .
- Key requirement: Must correctly expand the expectation of the squared term (i.e., reflecting ).
- *If the cross term is omitted (i.e., incorrectly writing ), this item and all subsequent items receive no credit.*
- Solving for the second moment [1 pt] [Additive]: Substitute and correctly obtain (or an equivalent correct intermediate expression).
- Final variance result [1 pt] [Additive]: Combine using and simplify algebraically to obtain the final result .
Chain B: Probability Generating Function (PGF / Generating Functions)
- Setting up the PGF equation [2 pts] [Additive]: Correctly establish the self-referential equation for the generating function .
- For example: .
- Closed-form PGF expression [1 pt] [Additive]: Correctly solve for the explicit form of , e.g., .
- Expectation computation [1 pt] [Additive]: Correctly compute via .
- Second derivative / second moment computation [2 pts] [Additive]: Correctly compute or from , showing a correct and complete calculus derivation.
- Final variance result [1 pt] [Additive]: Combine the above results to correctly compute .
Total (max 7)
2. Zero-credit items
- Merely stating standard geometric distribution formulas (such as or ) without any derivation specific to the "HH" pattern.
- Merely writing down the definition of expectation or variance (such as ) without any concrete substitution or computation for this problem.
- Stating the answer 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 (deduct 1 pt per error, but at most 1 pt per Chain).
- Logic gap [Cap at 3/7]: In Chain A, if the cross term arising from expanding the square is omitted when computing the second moment , this constitutes a core logical error; that part and the subsequent variance part receive no credit (score capped at 3 pts for the expectation portion).
- Unsimplified result [No Penalty]: If the final result is in a correct form (e.g., expressed as a difference of fractions) but not reduced to a single fraction as in the official solution, no deduction is applied, provided the expressions are mathematically equivalent.