★ Signature method unlocked: the technique this chapter rewards most often, with 3 worked questions.
The full chapter (25 methods · 72 worked questions) comes with Platform Access. See pricing
To find the expected count of something (matches, rings, runs, distinct items collected), write the count as a sum X=i∑Ii of 0/1 indicators and use E(X)=i∑P(Ii=1), which needs no independence. For the variance, expand E(X2)=i∑E(Ii)+i=j∑E(IiIj) using only pairwise probabilities.
Trigger: "expected number of" a count that is awkward to handle directly but is a sum of simple yes/no events.
Instances: (i) Ii=1 if object i has property (correct shirt, fixed card), so E=∑P(Ii=1) even when the Ii are dependent; (ii) collector problems where the wait splits as N=N1+⋯+Nr of independent geometric stages; (iii) variance via the pair probability P(Ii=1 and Ij=1).
Linked questions (3)
STEP 2 2008 · Q12
In the High Court of Farnia, the outcome of each case is determined by three judges: the ass, the beaver and the centaur. Each judge decides its verdict independently. Being simple creatures, they make their decisions entirely at random. Past verdicts show that the ass gives a guilty verdict with probability p, the beaver gives a guilty verdict with probability p/3 and the centaur gives a guilty verdict with probability p2.
Let X be the number of guilty verdicts given by the three judges in a case. Given that E(X)=4/3, find the value of p.
The probability that a defendant brought to trial is guilty is t. The King pronounces that the defendant is guilty if at least two of the judges give a guilty verdict; otherwise, he pronounces the defendant not guilty. Find the value of t such that the probability that the King pronounces correctly is 1/2.
Worked solution
The three judges give guilty verdicts with probabilities p, p/3, and p2 independently. Since X counts the total number of guilty verdicts, linearity of expectation gives the result immediately without computing the full distribution:E(X)=p+3p+p2=34p+p2.Setting this equal to 4/3:34p+p2=34⟹3p2+4p−4=0⟹(3p−2)(p+2)=0.Since 0<p<1, we get p=32.
Finding t.
With p=2/3, compute the probabilities P(X=k) for k=0,1,2,3. The King pronounces guilty when X≥2, so the key probabilities are:P(X=2)=p⋅3p⋅(1−p2)+p⋅(1−3p)⋅p2+(1−p)⋅3p⋅p2=31p2(1+4p−3p2),P(X=3)=p⋅3p⋅p2=3p4.With p=2/3: P(X=3)=3(2/3)4=24316 and P(X=2)=31⋅94⋅(1+38−34)=24384.
So P(King says guilty)=P(X≥2)=243100, and P(King says not guilty)=243143.
A correct pronouncement occurs in exactly two scenarios: the defendant is guilty andX≥2, or the defendant is not guilty andX≤1. Using t=P(defendant is guilty):P(correct)=t⋅243100+(1−t)⋅243143=243143−43t.Setting this equal to 1/2:143−43t=2243⟹43t=143−2243=243⟹t=21.This elegant result has a neat interpretation: when t=1/2, the defendant is equally likely to be guilty or not guilty going in. In that situation, no matter what the judges decide, the King is right exactly half the time — the system provides no useful information whatsoever.
STEP 3 2008 · Q13
A box contains n pieces of string, each of which has two ends. I select two string ends at random and tie them together. This creates either a ring (if the two ends are from the same string) or a longer piece of string. I repeat the process of tying together string ends chosen at random until there are none left.
Find the expected number of rings created at the first step and hence obtain an expression for the expected number of rings created by the end of the process. Find also an expression for the variance of the number of rings created.
Given that ln20≈3 and that 1+21+⋯+n1≈lnn for large n, determine approximately the expected number of rings created in the case n=40000.
Worked solution
We have n pieces of string with 2n free ends in total. At each step we pick two ends uniformly at random and tie them together.
Expected rings at the first step.
At the very first step there are 2n free ends. We pick one end; there are 2n−1 remaining ends. The only way to create a ring is if we pick the other end of the same piece of string — and there is exactly one such end among the 2n−1 remaining. SoP(ring at step 1)=2n−11.The expected number of rings created at step 1 is therefore 2n−11.
Expected total rings.
The key observation is that the number of free ends decreases by exactly 2 at each step, regardless of whether a ring was formed or not. After step k, there are 2n−2k free ends. At the (k+1)th step, the probability of forming a ring is 2(n−k)−11.
Letting k run from 0 to n−1, the expected total number of rings isE=k=0∑n−12(n−k)−11=2n−11+2n−31+⋯+31+11.This is the sum of reciprocals of all odd numbers from 1 to 2n−1.
Variance.
At each step the number of rings created is a Bernoulli random variable: at step k+1 it equals 1 with probability pk=2(n−k)−11 and 0 otherwise. Its variance is pk(1−pk).
Since the outcomes at different steps are independent (the composition of the strings is randomised afresh at each step in distribution), the total variance isVar=k=0∑n−1pk(1−pk)=k=0∑n−12(n−k)−11(1−2(n−k)−11)=j=0∑n−1(2j+1)22(n−1−j)or equivalentlyVar=(2n−1)22(n−1)+(2n−3)22(n−2)+⋯+322.Approximation for n=40000.
We needE=1+31+51+⋯+799991.Write the sum of reciprocals of odd integers up to 2n−1 in terms of the harmonic series:E=k=1∑2nk1−k=1∑n2k1=k=1∑2nk1−21k=1∑nk1≈ln(2n)−21lnn=ln2+21lnn.For n=40000: 21ln(40000)=21ln(202)=ln20≈3. Also ln2≈0.69. Alternatively, note 2n=80000=2×40000, soE≈ln(80000)−21ln(40000)=ln(80000)−ln(200)=ln(20080000)=ln400.Using a cleaner route: ln(80000)−21ln(40000)=ln(80000)−ln40000. Since 40000=200 and 80000/200=400=202, we get E≈ln(202)=2ln20≈6.
The expected number of rings when n=40000 is approximately 6.
STEP 2 2011 · Q13
What property of a distribution is measured by its skewness?
One measure of skewness, γ, is given by γ=σ3E((X−μ)3), where μ and σ2 are the mean and variance of the random variable X. Show that γ=σ3E(X3)−3μσ2−μ3.
The continuous random variable X has probability density function f where f(x)=⎩⎨⎧2x0for 0⩽x⩽1,otherwise. Show that for this distribution γ=−522.
The decile skewness, D, of a distribution is defined by D=F−1(109)−F−1(101)F−1(109)−2F−1(21)+F−1(101), where F−1 is the inverse of the cumulative distribution function. Show that, for the above distribution, D=2−5.
The Pearson skewness, P, of a distribution is defined by P=σ3(μ−M), where M is the median. Find P for the above distribution and show that D>P>γ.
Worked solution
Skewness measures the asymmetry of a distribution — whether values are spread out more to the left or to the right of the mean.
Part (i). We expand (X−μ)3 inside the expectation:E((X−μ)3)=E(X3)−3μE(X2)+3μ2E(X)−μ3.Since E(X)=μ and E(X2)=σ2+μ2, substituting givesE((X−μ)3)=E(X3)−3μ(σ2+μ2)+3μ3−μ3=E(X3)−3μσ2−μ3.Dividing through by σ3 yields the required formula for γ.
Computing γ for f(x)=2x on [0,1]. The moments areE(X)=∫012x2dx=32,E(X2)=∫012x3dx=21,E(X3)=∫012x4dx=52.So μ=32, σ2=21−94=181, and σ3=(181)3/2=18181. Substituting:γ=1818152−3⋅32⋅181−278=1818152−91−278.The numerator: a common denominator of 135 gives 13554−15−40=−1351. The denominator equals 18⋅62=1082 (since 18=32, so 1818=542, giving σ3=5421). Henceγ=−1351×542=−135542=−522.Part (ii). The CDF is F(x)=x2 for x∈[0,1], so F−1(p)=p. The three quantiles are:F−1(109)=109=103,F−1(21)=21,F−1(101)=101.The numerator of D is 103−22+101=104−22, and the denominator is 103−101=102. SoD=102104−22=2−210=2−5.Pearson skewness. The median satisfies M2=21, so M=21. With μ=32 and σ=181=321:P=3213(32−21)=92(32−21)=62−9.Showing D>P>γ. All three values are negative, so we work numerically: D=2−5≈−0.236, P=62−9≈−0.485, γ=−522≈−0.566.
For D>P: we need 2−5>62−9, i.e. 11−5>62. Squaring (both sides positive): 121−225+5>72, so 54>225, i.e. 27>115. Squaring again: 729>605. True.
For P>γ: 62−9>−522, i.e. 62+522>9, so 5322>9, i.e. 322>45. Squaring: 2048>2025. True.