Question
Consider a biased coin that lands heads with probability and tails with probability , where the outcomes are recorded as ``'' for heads and ``'' for tails. The coin is tossed repeatedly. Let denote the number of tosses required for the pattern ``'' to appear for the first time. Find and . (Hint: There are two approaches. The first is to compute conditional expectations and then apply the law of total expectation to calculate and separately, thereby obtaining the result. The second approach is to show that and are independent, and then construct the probability 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), which occurs with probability , then one toss has been used but no progress has been made toward the pattern "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 toward the pattern has been made. We now consider the outcome of the second toss. If the second toss is heads (H), which occurs with probability , then the pattern "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 outcome is "HT" and the process has not terminated. Two tosses have been used, but the accumulated "H" has been broken, so the process restarts from scratch. Hence the expected total number of tosses in this case is . By the law of total expectation, can be expressed as 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 tosses from a fresh start until "HH" appears, having the same distribution as . Taking the expectation of the square yields . 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 yields . Combining the cases above, we obtain the equation for : Expanding and collecting terms in : Substituting the previously obtained : Multiplying both sides by to clear the denominator: Therefore, . Using the variance formula , we compute the variance:
Final answer
The expectation is . The variance is .
Marking scheme
The following is a tailored rubric for this probability theory problem. Note that 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 formulate the recursive equation for .
- For example: or an equivalent form obtained by expanding and simplifying.
- *Note: If the equation structure is correct (reflecting the ideas of resetting and step accumulation) but has minor coefficient errors, award 1 point.*
- Expectation value [1 pt] [Additive]: Correctly solve .
- Second moment equation setup [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 zero credit.*
- Second moment solution [1 pt] [Additive]: Substitute and correctly solve (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) Method
- PGF equation setup [2 pts] [Additive]: Correctly establish the self-referential equation for the PGF .
- For example: .
- Closed-form PGF [1 pt] [Additive]: Correctly solve for the explicit expression 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 differentiation process.
- Final variance result [1 pt] [Additive]: Combine the above results to correctly compute .
Total (max 7)
2. Zero-credit items
- Merely stating the standard formulas for the geometric distribution (e.g., or ) without any derivation specific to the "HH" pattern.
- Merely writing down the definition of expectation or variance (e.g., ) without any concrete substitution or computation for this problem.
- Stating the answer without proof, and the answer is incorrect.
3. Deductions
- Calculation error [-1]: After setting up the correct equation, an incorrect final result due to simple algebraic or sign errors (deduct 1 point per error, but at most 1 point per Chain).
- Logic 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 constitutes a core logical error; the corresponding part and all subsequent variance computations receive zero credit (score capped at 3 points for the expectation portion).
- Unsimplified [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.