CalcPath
ProgressProblem setsFeedback
← Question sheet

Statistics · Solutions

Sampling and Data Distributions

12 questions · about 102 minutes

Work this sheet on paper, showing every step — the solutions are written so you can check your method, not just your final number. Name every result you use (“by linearity of expectation”, “by Chebyshev's inequality”, “by the Central Limit Theorem”) and say why its hypotheses hold; in particular, say at each step whether independence is being used. No calculator is needed: every answer is an exact fraction or root, and the few normal-table values required are printed in the question. Full worked solutions are on a separate page, and each question also has its own reveal, so you can check one answer without seeing the rest.

  1. 1.Computation

    A population consists of the four values {2,4,6,8}, each equally likely to be drawn. Samples of size n=2 are drawn with replacement, so the two draws X1​,X2​ are i.i.d.

    1. (a)Classify each of the following as a parameter, a statistic, or neither, with one sentence of justification each: (i) μ; (ii) Xˉ; (iii) n1​∑i=1n​(Xi​−μ)2; (iv) max(X1​,X2​); (v) σ/n​.
    2. (b)Compute μ and σ2, then list all 16 ordered samples and tabulate the sampling distribution of Xˉ: every value it can take, with its probability.
    3. (c)From your table compute E(Xˉ) and Var(Xˉ) directly, and confirm that they equal μ and σ2/n.

    Solution

    (a) Parameter, statistic, or neither. (i) μ=E(X) is a fixed numerical feature of the population: a parameter. It does not change from sample to sample and is not known from the data.

    (ii) Xˉ=21​(X1​+X2​) can be computed from the data alone: a statistic. It is also a random variable — it takes a different value on a different sample.

    (iii) Neither. It is not a parameter, because it depends on which sample was drawn; and it is not a statistic, because evaluating it needs μ, which the data do not supply. (Replacing μ by Xˉ turns it into a statistic.)

    (iv) The sample maximum is a function of the observations alone: a statistic.

    (v) σ/n​ is a fixed constant determined by the population (and the chosen n); it is not random and cannot be computed from a sample. It is a parameter — specifically the standard error of Xˉ — and the statistic that estimates it is S/n​.

    (b) The population and the sampling distribution. The population mean is

    μ=42+4+6+8​=5,

    and the population variance, dividing by N=4 because this is the whole population and not a sample, is

    σ2=4(−3)2+(−1)2+12+32​=49+1+1+9​=420​=5.

    The 16 ordered samples (a,b) are equally likely, each with probability 161​, and xˉ=2a+b​. Arranging them in a grid with a down the rows and b across the columns, the sample means are

    2468​22345​43456​64567​85678​​

    Counting along the anti-diagonals, the sampling distribution of Xˉ is

    xˉP(Xˉ=xˉ)​2161​​3162​​4163​​5164​​6163​​7162​​8161​​​

    — a triangle centred on 5. The probabilities sum to 1616​=1.

    (c) Mean and variance from the table.

    E(Xˉ)=162⋅1+3⋅2+4⋅3+5⋅4+6⋅3+7⋅2+8⋅1​=162+6+12+20+18+14+8​=1680​=5=μ.

    For the variance, the deviations xˉ−5 are −3,−2,−1,0,1,2,3 with frequencies 1,2,3,4,3,2,1, so

    Var(Xˉ)=161⋅9+2⋅4+3⋅1+4⋅0+3⋅1+2⋅4+1⋅9​=1640​=25​=2σ2​=nσ2​.

    Both theorems check. Note that the averaging halved the variance (5 to 25​) — this is the whole reason for taking a mean — and that the independence of the two draws is what licensed the σ2/n; the equality E(Xˉ)=μ would have held even for dependent draws.

  2. 2.Computation

    Keep the population {2,4,6,8}, with μ=5 and σ2=5, and the 16 equally likely ordered samples (a,b) of size n=2 drawn with replacement. Two candidate estimators of σ2 are the sample variance S2=n−11​∑(Xi​−Xˉ)2 and the divide-by-n version σ^2=n1​∑(Xi​−Xˉ)2.

    1. (a)Show that for a sample (a,b) of size 2, S2=2(a−b)2​ and σ^2=4(a−b)2​.
    2. (b)Tabulate (a−b)2 over the 16 samples, and hence compute E(S2) and E(σ^2) exactly. Which estimator is unbiased, and by what factor is the other one off?
    3. (c)Compute E(S) exactly and compare it with σ=5​. State the general fact this illustrates.

    Solution

    (a) The two formulas. With xˉ=2a+b​ the deviations are

    a−xˉ=2a−b​,b−xˉ=2b−a​,

    equal and opposite, as deviations from the sample mean must be (they always sum to zero). Each squares to 4(a−b)2​, so the sum of squared deviations is 2(a−b)2​. Dividing by n−1=1 gives S2=2(a−b)2​; dividing by n=2 gives σ^2=4(a−b)2​.

    (b) The expectations. Over the 16 ordered samples, ∣a−b∣ takes the value 0 on the 4 diagonal samples (2,2),(4,4),(6,6),(8,8); the value 2 on the 6 samples (2,4),(4,2),(4,6),(6,4),(6,8),(8,6); the value 4 on the 4 samples (2,6),(6,2),(4,8),(8,4); and the value 6 on the 2 samples (2,8),(8,2). Check: 4+6+4+2=16. Hence

    samples∑​(a−b)2=4⋅0+6⋅4+4⋅16+2⋅36=0+24+64+72=160,E[(a−b)2]=16160​=10.

    (Cross-check without the table: a−b has mean 0 and, being a difference of independent draws, variance σ2+σ2=10, so E[(a−b)2]=Var(a−b)=10. The table agrees.)

    Therefore

    E(S2)=210​=5=σ2,E(σ^2)=410​=25​.

    S2 is unbiased. The divide-by-n estimator is biased downward by the factor nn−1​=21​: on average it reports half the true variance. The reason is visible in the diagonal samples, where both observations coincide with xˉ and the estimator reports 0; deviations from the sample's own centre are systematically too small.

    (c) E(S). Since S=S2​=2​∣a−b∣​,

    E∣a−b∣=164⋅0+6⋅2+4⋅4+2⋅6​=1612+16+12​=1640​=25​,E(S)=22​5​=452​​.

    Compare with σ=5​ by squaring both (both are positive): (452​​)2=1650​=825​=3.125<5. So E(S)<σ — roughly 1.77 against 2.24.

    The general fact: S2 is unbiased for σ2, but S is not unbiased for σ. Unbiasedness is not preserved by taking square roots, because the square root is strictly concave and E(S2​)<E(S2)​ whenever S2 is not constant. The sample standard deviation underestimates σ on average.

  3. 3.Computation

    A town's 2000 workers split into two strata of 1000 each. Those living in the town have a daily commute with mean 12 km and standard deviation 6 km; those living outside have mean 28 km and standard deviation 6 km. A sample of n=100 workers is to be asked their commute distance.

    1. (a)Compute the population mean μ, the within-strata and between-strata components of the population variance, and σ2 itself.
    2. (b)Find the standard error of Xˉ under simple random sampling, and under stratified sampling with proportional allocation. State the stratum sample sizes.
    3. (c)How many simple-random-sample interviews would be needed to match the stratified standard error? Then say what would happen to the gain from stratifying if the two strata had the same mean commute, and why.

    Solution

    (a) Decompose the variance. The stratum weights are W1​=W2​=20001000​=21​, so

    μ=21​(12)+21​(28)=20.

    The within-strata component is ∑h​Wh​σh2​=21​(36)+21​(36)=36. The between-strata component is

    h∑​Wh​(μh​−μ)2=21​(12−20)2+21​(28−20)2=21​(64)+21​(64)=64.

    By the law of total variance applied to the stratum label, σ2=36+64=100, so σ=10. Almost two-thirds of the population variance is between the groups.

    (b) The two standard errors. Under simple random sampling (treating n/N=0.05 as small enough to ignore the finite population correction),

    Var(XˉSRS​)=nσ2​=100100​=1,SE=1 km.

    Proportional allocation takes nh​=nWh​=100⋅21​=50 from each stratum. The strata are sampled independently, so

    Var(Xˉstr​)=h∑​Wh2​nh​σh2​​=41​⋅5036​+41​⋅5036​=10036​=0.36,

    which is exactly n1​∑h​Wh​σh2​=10036​, the within-strata variance divided by n. Hence SE=0.36​=0.6 km. Stratifying cut the standard error from 1 to 0.6 for the same hundred interviews.

    (c) The price in interviews, and the source of the gain. An SRS matches 0.36 when n100​≤0.36, i.e. n≥0.36100​=92500​≈277.8, so 278 interviews — nearly three times as many.

    The difference between the two variances is exactly the between-strata term divided by n: 1−0.36=0.64=10064​. If both strata had mean 20, the between-strata component would be 0, σ2 would be 36, and both designs would give Var(Xˉ)=10036​. Stratification would then buy nothing. Stratification deletes the between-strata variance and only that, so the variable you stratify on must be one that separates the stratum means; strata that differ only in spread are worthless.

  4. 4.Critique

    A city council wants to know what proportion of its residents oppose a new road toll. It posts a survey on its website; 50,000 residents respond, of whom 39,000 oppose. The council's report reads:

    Step 1. The sample proportion is p^​=39,000/50,000=0.78.

    Step 2. With n=50,000 the standard error is 0.78×0.22/50,000​≈0.0019, so the 95% margin of error is about ±0.4%.

    Step 3. Therefore between 77.6% and 78.4% of all residents oppose the toll. A sample this large has essentially no sampling error, so the figure is almost exact.

    The arithmetic in Steps 1 and 2 is correct.

    1. (a)Identify what is wrong, naming the kinds of sampling bias involved. Say precisely which claim in Step 3 is false, and which phrase in it is doing the damage.
    2. (b)A councillor proposes keeping the survey open until 200,000 responses arrive. Using the way bias and sampling variability each depend on n, explain why this does not help.
    3. (c)Describe a design under which Steps 2 and 3 would be legitimate, and compute the 95% margin of error it would deliver with n=400 and the conservative planning value p∗=0.5 (take z∗=1.96). Name the one source of bias that even this design must still plan for.

    Solution

    (a) Where the argument fails. Two design failures, neither of them arithmetical.

    First, undercoverage: the sampling frame is "people who visit the council website", not "residents of the city". Residents who never visit the site cannot be selected at all.

    Second, voluntary response bias: nobody selected these 50,000 — they selected themselves, and people who feel strongly (here, drivers who would pay the toll) are far more likely to bother. The sample is also a convenience sample from the council's point of view.

    Both failures shift E(p^​) away from p: the survey estimates, quite precisely, the proportion of self-selected website visitors who oppose the toll, which is a different parameter from the one the council wants.

    Step 2's number is the standard error p^​ would have if the 50,000 were an i.i.d. Bernoulli(p) sample. The formula's hypothesis fails, so the number describes nothing.

    The false claim in Step 3 is that the interval (0.776,0.784) contains the population proportion. The phrase doing the damage is "no sampling error". That phrase is nearly true — sampling variability really is tiny at n=50,000 — but variability is not the error here. The error is bias, which the margin of error does not measure at all. The report has a very narrow interval around the wrong centre: a precise answer to the wrong question.

    (b) Why more responses cannot help. Sampling variability shrinks like 1/n​: quadrupling n halves the standard error, from about 0.0019 to about 0.0009. Bias is E(p^​)−p, and it does not depend on n at all: the extra 150,000 self-selected responses come from the same distorted frame with the same self-selection, so they estimate the same wrong quantity. The councillor would obtain a still narrower interval around the same wrong centre. (This is the Literary Digest mistake: 2.4 million responses, off by nearly twenty points.)

    (c) A legitimate design. Draw a simple random sample from a complete frame of residents — the electoral roll or the register of residential addresses — with the council choosing the respondents, each with equal probability, rather than the respondents choosing themselves. (Stratifying by district would do even better.) Then the responses are i.i.d. Bernoulli(p) and the formulas of Steps 2 and 3 apply.

    With n=400 and p∗=0.5,

    SE=4000.5×0.5​​=16001​​=401​=0.025,ME=1.96×0.025=0.049,

    about ±5 points. Four hundred properly chosen residents give an honest ±5%; fifty thousand self-selected ones give a meaningless ±0.4%.

    The remaining hazard is nonresponse bias: some of the 400 selected residents will decline, and if decliners differ from responders the estimate shifts again. Plan for it in advance — a follow-up protocol on a random subsample of the non-responders — rather than hoping it away.

  5. 5.Proof

    Let X1​,…,Xn​ each have mean μ and finite variance σ2>0, and let Xˉ=n1​∑i=1n​Xi​. You may use linearity of expectation and the expansion Var(aX+bY)=a2Var(X)+b2Var(Y)+2abCov(X,Y).

    1. (a)Assuming the Xi​ are independent, prove that E(Xˉ)=μ and Var(Xˉ)=σ2/n. Mark the one step in which independence is used, and say what the argument gives without it.
    2. (b)Now drop independence and suppose instead that Cov(Xi​,Xj​)=ρσ2 for every pair i=j — the situation for units drawn from a single cluster. Prove that Var(Xˉ)=nσ2​(1+(n−1)ρ).
    3. (c)Deduce from (b) that necessarily ρ≥−n−11​, and that when ρ>0 the variance of Xˉ does not tend to 0 as n→∞. Say what this means for someone who quotes σ/n​ as the standard error of a clustered sample.

    Solution

    (a) Mean and variance of Xˉ. The mean. By linearity of expectation, pulling the constant n1​ out of the sum,

    E(Xˉ)=n1​i=1∑n​E(Xi​)=n1​⋅nμ=μ.

    Only the fact that every Xi​ has mean μ was used; independence plays no role.

    The variance. Write Di​=Xi​−μ, so E(Di​)=0, E(Di2​)=σ2 and E(Di​Dj​)=Cov(Xi​,Xj​). Then ∑Xi​−nμ=∑Di​, and expanding the square of the sum (which is the two-variable expansion applied term by term),

    Var(i=1∑n​Xi​)=E[(i∑​Di​)2]=i∑​E(Di2​)+i=j∑​E(Di​Dj​)=nσ2+i=j∑​Cov(Xi​,Xj​).

    Independence is used here, and only here: independent variables have E(Xi​Xj​)=E(Xi​)E(Xj​), so every covariance is 0 and the double sum vanishes, leaving Var(∑Xi​)=nσ2. Finally, scaling by the constant n1​ multiplies a variance by n21​:

    Var(Xˉ)=n21​⋅nσ2=nσ2​.■

    Without independence the mean result survives intact, and the variance becomes nσ2​+n21​∑i=j​Cov(Xi​,Xj​) — the formula σ2/n is exactly the uncorrelated case.

    (b) Equicorrelated observations. Return to the general expansion of (a). There are n(n−1) ordered pairs (i,j) with i=j, and each contributes ρσ2, so

    Var(i=1∑n​Xi​)=nσ2+n(n−1)ρσ2=nσ2(1+(n−1)ρ).

    Dividing by n2,

    Var(Xˉ)=nσ2​(1+(n−1)ρ).■

    Sanity checks: ρ=0 recovers σ2/n; ρ=1 (all observations identical) gives σ2, the variance of a single observation, which is right because n copies of one number carry one number's worth of information.

    (c) Consequences. A variance is never negative and σ2/n>0, so (b) forces 1+(n−1)ρ≥0, that is ρ≥−n−11​. Observations cannot be strongly negatively correlated with all of each other at once; for large n the common correlation is essentially non-negative.

    For ρ>0, split the formula:

    Var(Xˉ)=nσ2​+ρσ2⋅nn−1​ ⟶ 0+ρσ2=ρσ2>0(n→∞).

    The standard error has a floor of σρ​ that no amount of further sampling from the same cluster can breach: once the shared component of the cluster has been learned, extra units only repeat it.

    Someone quoting σ/n​ for such data understates the true standard error by the factor 1+(n−1)ρ​. With ρ=0.1 and n=100 that factor is 10.9​>3: the reported uncertainty is less than a third of the real one, and the confidence intervals built on it are far too narrow. The correct hypothesis for σ2/n is uncorrelated observations, and a cluster design breaks exactly that.

  6. 6.Computation

    A population of measurements has standard deviation σ=12. Give every standard error exactly.

    1. (a)For a sample of n=36 i.i.d. observations, find SE(Xˉ). Then find the smallest n for which SE(Xˉ)≤0.5, and say by what factor the sample had to grow to cut the standard error by a factor of 4.
    2. (b)Now suppose the population is finite, with N=81 units, and the n=36 observations are drawn without replacement. Find SE(Xˉ). Is the usual convention for ignoring the correction applicable here? What happens to SE(Xˉ) when n=N, and why is that the right answer?
    3. (c)Verify the without-replacement formula by direct enumeration: from the population {2,4,6,8} (so μ=5 and σ2=5) list the samples of size 2 drawn without replacement, compute Var(Xˉ) from the list, and compare it with what the formula predicts.

    Solution

    (a) The square-root law. For i.i.d. observations SE(Xˉ)=σ/n​, so at n=36

    SE=36​12​=612​=2.

    For SE≤21​ we need n​12​≤21​, i.e. n​≥24, i.e. n≥576. The smallest such n is 576. The standard error fell by a factor of 4 (from 2 to 21​) and the sample grew by a factor of 36576​=16=42: dividing the standard error by k costs a factor k2 in sample size, because n sits under a square root.

    (b) Finite population correction. Without replacement from N=81,

    Var(Xˉ)=nσ2​⋅N−1N−n​=36144​⋅81−181−36​=4⋅8045​=4⋅169​=49​,SE=23​.

    The convention is to ignore the correction when n/N≤0.05. Here n/N=8136​=94​≈0.44, so it is not applicable: ignoring it would report 2 instead of 1.5, overstating the uncertainty by a third. Sampling without replacement is more precise than the i.i.d. formula says, because later draws cannot repeat information already collected.

    At n=N the factor N−1N−n​ is 0, so SE=0. That is correct: a sample of the whole population is a census, Xˉ equals μ identically, and there is no sampling variability left to measure.

    (c) Enumeration check. Drawing 2 of the 4 values without replacement, the 6 unordered samples are equally likely (each ordered sample has probability 41​⋅31​=121​, and each unordered sample corresponds to two of them). Their means:

    {2,4}→3,{2,6}→4,{2,8}→5,{4,6}→5,{4,8}→6,{6,8}→7.

    The mean of the six values is 63+4+5+5+6+7​=630​=5=μ, so Xˉ is still unbiased. The deviations from 5 are −2,−1,0,0,1,2, with squares 4,1,0,0,1,4 summing to 10, so

    Var(Xˉ)=610​=35​.

    The formula predicts

    nσ2​⋅N−1N−n​=25​⋅4−14−2​=25​⋅32​=35​,

    in exact agreement. With replacement the same population gives Var(Xˉ)=25​; forbidding repeats removed the two extreme samples (2,2) and (8,8) and their kin, and the variance dropped by the factor 32​.

  7. 7.Proof

    Let X1​,…,Xn​ be i.i.d. with mean μ and finite variance σ2, with n≥2, and let S2=n−11​∑i=1n​(Xi​−Xˉ)2. You may quote E(Xˉ)=μ and Var(Xˉ)=σ2/n.

    1. (a)Prove the identity i=1∑n​(Xi​−Xˉ)2=i=1∑n​(Xi​−c)2−n(Xˉ−c)2 for every real constant c, and deduce that Xˉ is the value of c that minimises ∑i​(Xi​−c)2.
    2. (b)Take c=μ and prove that E(S2)=σ2. Then find E(σ^2) for σ^2=n1​∑i​(Xi​−Xˉ)2, and say in one sentence where the missing piece of σ2 went.
    3. (c)Prove that E(S)≤σ, with equality only when S is constant with probability 1. Use nothing beyond (b) and the fact that a variance is never negative.

    Solution

    (a) The identity. Insert and remove c inside the square: Xi​−Xˉ=(Xi​−c)−(Xˉ−c). Squaring and summing over i,

    i=1∑n​(Xi​−Xˉ)2=i=1∑n​(Xi​−c)2−2(Xˉ−c)i=1∑n​(Xi​−c)+n(Xˉ−c)2,

    where (Xˉ−c) came out of the middle sum because it does not depend on i. Now ∑i​(Xi​−c)=∑i​Xi​−nc=nXˉ−nc=n(Xˉ−c), so the middle term is −2n(Xˉ−c)2, and

    i=1∑n​(Xi​−Xˉ)2=i=1∑n​(Xi​−c)2−2n(Xˉ−c)2+n(Xˉ−c)2=i=1∑n​(Xi​−c)2−n(Xˉ−c)2.■

    Rearranged, ∑i​(Xi​−c)2=∑i​(Xi​−Xˉ)2+n(Xˉ−c)2 ≥ ∑i​(Xi​−Xˉ)2, with equality exactly when c=Xˉ. So the sample mean is the constant about which the sum of squared deviations is smallest — which is why deviations measured from Xˉ are systematically smaller than deviations measured from μ.

    (b) Unbiasedness of S2. Put c=μ in the identity and take expectations of both sides, using linearity:

    E[i=1∑n​(Xi​−Xˉ)2]=i=1∑n​E[(Xi​−μ)2]−nE[(Xˉ−μ)2].

    Each E[(Xi​−μ)2]=Var(Xi​)=σ2, since every Xi​ has the population distribution; that gives nσ2. And because E(Xˉ)=μ, the quantity E[(Xˉ−μ)2] is Var(Xˉ)=σ2/n — this is where independence enters, through the variance formula. Hence

    E[i=1∑n​(Xi​−Xˉ)2]=nσ2−n⋅nσ2​=(n−1)σ2,E(S2)=n−1(n−1)σ2​=σ2.■

    For the divide-by-n estimator,

    E(σ^2)=n(n−1)σ2​=σ2−nσ2​,

    biased low by exactly σ2/n. The missing piece is Var(Xˉ): it is the expected squared error incurred by measuring deviations from Xˉ instead of from μ — one observation's worth of variance, spent on estimating the mean.

    (c) S is biased for σ. First, E(S) is finite: S≥0 and s≤1+s2 for every s≥0, so E(S)≤1+E(S2)=1+σ2<∞. So S has a well-defined variance, and by (b),

    0 ≤ Var(S)=E(S2)−[E(S)]2=σ2−[E(S)]2.

    Hence [E(S)]2≤σ2, and since E(S)≥0 and σ≥0, taking square roots gives E(S)≤σ. Equality holds if and only if Var(S)=0, which is if and only if S equals a constant with probability 1. ■

    For any population in which S actually varies — which is every population that takes more than one value — the inequality is strict: the sample standard deviation underestimates σ on average, even though its square is unbiased. Nothing about concavity or Jensen's inequality was needed; the non-negativity of a variance already contains the whole fact.

  8. 8.Computation

    Markov's inequality: for Y≥0 with finite mean and any a>0, P(Y≥a)≤E(Y)/a. Chebyshev's inequality: for X with mean μ and variance σ2 and any k>0, P(∣X−μ∣≥k)≤σ2/k2. Both hold for every distribution; this question is about how tight they are.

    1. (a)A non-negative random variable Y has E(Y)=4. Bound P(Y≥20) from above. Then construct a distribution for Y with E(Y)=4 for which the bound is attained exactly, and say what that shows about improving Markov's inequality.
    2. (b)Observations are i.i.d. with unknown shape, unknown mean μ and known σ=1. Using only Chebyshev's inequality, find the smallest n that guarantees P(∣Xˉn​−μ∣≥0.25)≤0.01. Say which two earlier results feed into the bound you use.
    3. (c)Construct a distribution with mean μ and standard deviation σ for which P(∣X−μ∣≥2σ) equals 41​ exactly, and verify both moments. For a normal distribution the same probability is about 0.046; explain why Chebyshev must be loose for it.

    Solution

    (a) Markov, and a case of equality. Markov's inequality with a=20 gives

    P(Y≥20)≤20E(Y)​=204​=51​.

    To attain it, let Y take only the values 0 and 20, with P(Y=20)=51​ and P(Y=0)=54​. Then E(Y)=20⋅51​+0⋅54​=4 as required, and P(Y≥20)=51​ — equality.

    Why this is the equality case: Markov's proof rests on the pointwise inequality Y≥a1{Y≥a}, and that is an equality precisely when Y is 0 whenever it is below a and exactly a whenever it is at or above a. Since a distribution with E(Y)=4 achieves the bound, no inequality of the form P(Y≥a)≤C⋅E(Y)/a with C<1 can hold for all non-negative Y: Markov's constant cannot be improved without adding hypotheses.

    (b) Chebyshev applied to the sample mean. Two earlier results are needed. First, the theorem on the mean and variance of the sample mean: for i.i.d. observations E(Xˉn​)=μ and Var(Xˉn​)=σ2/n=1/n. Second, Chebyshev's inequality applied to the random variable Xˉn​ with k=0.25:

    P(∣Xˉn​−μ∣≥0.25)≤(0.25)2Var(Xˉn​)​=1/161/n​=n16​.

    Requiring n16​≤1001​ gives n≥1600; the smallest such n is 1600. This is a guarantee valid for every population with σ=1, whatever its shape. (A normal approximation would ask for only about a hundred observations; the difference is the price of assuming nothing.)

    (c) Chebyshev's constant is also sharp. Take the three-point distribution

    X=⎩⎨⎧​μ−2σμμ+2σ​with probability 81​,with probability 43​,with probability 81​.​

    Mean: the distribution is symmetric about μ, so E(X)=μ; explicitly, E(X−μ)=81​(−2σ)+43​(0)+81​(2σ)=0.

    Variance: E[(X−μ)2]=81​(4σ2)+43​(0)+81​(4σ2)=2σ2​+2σ2​=σ2. ✓

    The tail: P(∣X−μ∣≥2σ)=81​+81​=41​=221​, exactly Chebyshev's bound with k=2σ.

    Chebyshev's inequality must hold for this distribution as well as for the normal, so the constant k21​ cannot be lowered. The normal distribution keeps most of its mass close to μ and puts only about 0.046 beyond 2σ — a factor of more than five below the bound. The bound is loose for the normal precisely because it is tight for the worst case: universality is paid for in slack.

  9. 9.Sketch

    A sequence of coin flips begins with four heads and then alternates strictly for ever: H,H,H,H,T,H,T,H,T,H,…. (The sequence is chosen by hand rather than by a coin, so it is a picture of a mechanism, not a random experiment.) Let Hn​ be the number of heads among the first n flips, p^​n​=Hn​/n the running proportion, and Hn​−2n​ the running excess of heads.

    1. (a)For n≥4 find closed forms for Hn​, p^​n​ and the excess Hn​−2n​, treating even n=2j and odd n=2j+1 separately, and show that in both cases p^​n​−21​=nHn​−n/2​.
    2. (b)Sketch p^​n​ against n for 1≤n≤30, on axes running from 0 to 1, with the horizontal lines y=0.4, y=0.5 and y=0.6 drawn. Find the last n at which p^​n​ is not strictly inside the band 0.4<p^​n​<0.6, and prove that it stays strictly inside for every later n.
    3. (c)On separate axes sketch the excess Hn​−2n​ for 1≤n≤30. Explain from your formulas why the excess never tends to 0 although p^​n​→21​, and say which of the two quantities the Law of Large Numbers makes a claim about.

    Solution

    (a) Closed forms. For n≤4 every flip is a head: Hn​=n, p^​n​=1, and the excess is n−2n​=2n​, i.e. 21​,1,23​,2.

    From flip 5 onward the flips come in pairs (T,H), each pair contributing exactly one head.

    Even n=2j with j≥2. Flips 5,…,2j form j−2 complete pairs, so

    Hn​=4+(j−2)=j+2,p^​n​=2jj+2​=21​+j1​=21​+n2​,Hn​−2n​=(j+2)−j=2.

    Odd n=2j+1 with j≥2. One more flip, a tail, so Hn​=j+2 still, and

    p^​n​=2j+1j+2​,Hn​−2n​=(j+2)−22j+1​=23​,p^​n​−21​=2(2j+1)2(j+2)−(2j+1)​=2(2j+1)3​=2n3​.

    In both cases p^​n​−21​=nHn​−n/2​ — which is in fact an identity for every n, since nHn​​−21​=nHn​−n/2​. The excess is 2 at even n and 23​ at odd n, for ever.

    (b) The sketch of p^​n​, and the band. The drawing must show: four dots at height 1 for n=1,2,3,4; then a sawtooth that descends towards 0.5 from above and never crosses it, since p^​n​−21​ is always positive. The even-n points lie on the upper envelope 21​+n2​ and the odd-n points on the lower envelope 21​+2n3​; some values to plot are p^​5​=54​=0.8, p^​6​=65​, p^​8​=43​, p^​10​=0.7, p^​12​=32​, p^​20​=0.6, p^​29​=2916​≈0.55 and p^​30​=3017​≈0.57. The teeth shrink as n grows. Draw the three horizontal lines; the line y=0.4 is never approached, because the deviation is one-sided.

    Entering the band. Strictly inside means 0<p^​n​−21​<101​. For even n this is n2​<101​, i.e. n>20, so even n≥22 are inside and even n≤20 are not: p^​16​=1610​=0.625, p^​18​=1811​≈0.611, and p^​20​=2012​=0.6 sits exactly on the boundary. For odd n it is 2n3​<101​, i.e. n>15, so odd n≥17 are inside: p^​17​=1710​≈0.588 and p^​19​=1911​≈0.579. The sequence therefore dips into the band at 17, leaves at 18, re-enters at 19, touches the edge at 20, and the last n not strictly inside is n=20. Mark 17–20 on the sketch: this in-and-out is exactly the behaviour the weak law permits.

    Proof that it stays inside. For every n≥21, whichever parity, 0<p^​n​−21​≤n2​≤212​<101​, using 2n3​<n2​ for the odd case. So p^​n​∈(0.5,0.6)⊂(0.4,0.6) for all n≥21. ■

    (c) The sketch of the excess, and the moral. The drawing shows points at 21​,1,23​,2 for n=1,…,4, and then a flat zigzag between 23​ (odd n) and 2 (even n) all the way to n=30 and beyond. It never approaches the axis y=0; in fact it never drops below 23​ again.

    Why the two pictures differ: after the fourth flip a surplus of two heads exists, and nothing in the later flips ever pays it back — each (T,H) pair has zero net effect on the excess. Yet p^​n​−21​=nexcess​, a bounded numerator over a growing denominator, so the proportion converges to 21​ all the same. The proportion returns to 21​ by dilution, not by compensation.

    The Law of Large Numbers is a statement about the proportion — the sample mean of the 0/1 indicators — and nothing else. It says nothing about the count. For a genuinely random coin the situation is worse than in this hand-made sequence: the excess is not even bounded, its standard deviation being 21​n​, which grows without limit. Anyone expecting a run of heads to be "corrected" by later tails is expecting the count to converge, and it never does.

  10. 10.Proof

    Let X1​,X2​,… be i.i.d. fair coin flips coded 1 for heads and 0 for tails, let Hn​=∑i=1n​Xi​ be the number of heads, and let

    Zn​=n​/2Hn​−n/2​.

    You may quote: the MGF of a sum of independent variables is the product of their MGFs; McX​(t)=MX​(ct); the MGF of N(0,1) is et2/2; the continuity theorem for MGFs; the series coshu=∑k≥0​(2k)!u2k​; the limit (1+na​+o(1/n))n→ea; and Φ(2)=0.9772.

    1. (a)Find μ and σ2 for a single flip, and show that Zn​ is both the standardised sample mean σ/n​Xˉn​−μ​ and the standardised sum. Then show that Zn​=n​1​∑i=1n​Yi​, where Yi​=2Xi​−1 takes the values ±1 with probability 21​ each.
    2. (b)Compute the MGF m(t)=E(etYi​) and show that MZn​​(t)=[cosh(t/n​)]n.
    3. (c)Prove that MZn​​(t)→et2/2 for every fixed t, controlling the remainder of the cosh series explicitly, and conclude that Zn​d​N(0,1).
    4. (d)Deduce n→∞lim​P(Hn​≥2n​+n​), and reconcile the fact that this limit is positive with the Law of Large Numbers.

    Solution

    (a) Standardising. A single flip has μ=E(Xi​)=1⋅21​+0⋅21​=21​ and E(Xi2​)=21​, so σ2=21​−41​=41​ and σ=21​.

    The standardised mean is

    21​/n​Xˉn​−21​​=2n​(nHn​​−21​)=n​2​(Hn​−2n​)=n​/2Hn​−n/2​=Zn​,

    and the standardised sum is σn​Hn​−nμ​=n​/2Hn​−n/2​, the same expression: mean and sum standardise to one and the same variable.

    With Yi​=2Xi​−1: heads gives Yi​=1, tails gives Yi​=−1, each with probability 21​, and the Yi​ are independent because the Xi​ are. Summing, ∑i​Yi​=2Hn​−n=2(Hn​−2n​), so

    n​1​i=1∑n​Yi​=n​2(Hn​−n/2)​=Zn​.✓

    (b) The MGF. m(t)=E(etY)=21​et+21​e−t=cosht. Since Zn​=∑i​(Yi​/n​) is a sum of independent variables, its MGF is the product of theirs, and each factor is MYi​/n​​(t)=m(t/n​) by the scaling rule. Hence

    MZn​​(t)=i=1∏n​cosh(n​t​)=[cosh(n​t​)]n.

    (c) The limit, with the remainder controlled. Fix t and write u=t/n​, so ∣u∣≤∣t∣ for all n≥1. From the series,

    coshu=1+2u2​+R(u),R(u)=k≥2∑​(2k)!u2k​ ≥0.

    For k≥2, (2k)!=(2k)(2k−1)(2k−2)(2k−3)⋅(2k−4)! ≥ 4⋅3⋅2⋅1⋅(2k−4)!=24(2k−4)!, so

    R(u)≤24u4​k≥2∑​(2k−4)!u2k−4​=24u4​m≥0∑​(2m)!u2m​=24u4​coshu≤24u4​cosht.

    Substituting u=t/n​ gives 0≤R(t/n​)≤24n2t4cosht​, which is O(1/n2) and therefore o(1/n) as n→∞ with t fixed. So

    cosh(n​t​)=1+nt2/2​+o(n1​),MZn​​(t)=[1+nt2/2​+o(n1​)]n⟶et2/2

    by the quoted limit with a=t2/2. The right-hand side is the MGF of N(0,1), and the convergence holds for every real t, in particular on a neighbourhood of 0; by the continuity theorem for MGFs, Zn​d​N(0,1). ■

    This is the Central Limit Theorem for a fair coin, and the proof is the general MGF argument with every step made explicit: the population is symmetric, so m has no odd terms, and cosh is entire, so the remainder is under complete control rather than merely o(t2).

    (d) A tail probability for the count. The event rewrites as

    Hn​≥2n​+n​⟺Hn​−2n​≥n​⟺Zn​=n​/2Hn​−n/2​≥n​/2n​​=2.

    Since 2 is a continuity point of Φ, convergence in distribution gives

    n→∞lim​P(Hn​≥2n​+n​)=n→∞lim​P(Zn​≥2)=1−Φ(2)=1−0.9772=0.0228.

    Reconciling with the Law of Large Numbers. The event says the surplus of heads is at least n​ — and that stays about 2.3% likely however large n becomes, because the excess count Hn​−2n​ is of order n​ and does not converge. But in terms of the proportion the same event is p^​n​−21​≥nn​​=n​1​, a deviation that shrinks to 0. The Law of Large Numbers says P(∣p^​n​−21​∣≥ε)→0 for each fixed ε, and there is no conflict: for any fixed ε, eventually n​1​<ε, so the CLT event lies inside the band the LLN says is almost certain. The two theorems look at the same deviation at different magnifications — the LLN at a fixed scale, where it vanishes; the CLT at scale 1/n​, where it is a bell curve.

  11. 11.Critique

    An insurer's individual claim sizes, in thousands, are independent draws from a strongly right-skewed population with mean μ=4 and standard deviation σ=6; every claim is non-negative. A trainee analyses a batch of n=36 claims and writes:

    Step 1. Since n=36≥30, the Central Limit Theorem applies, so each claim is approximately N(4,36).

    Step 2. Hence the probability that a single claim exceeds 22 is P(Z>622−4​)=P(Z>3)≈0.0013.

    Step 3. The total of the 36 claims has mean 36×4=144 and standard deviation 6/36​=1, so the probability that the total exceeds 216 is P(Z>72), which is zero for all practical purposes.

    You may use Φ(2)=0.9772 and Φ(3)=0.9987.

    1. (a)Identify every error. For each, name the theorem or result being misapplied and the hypothesis or conclusion being misread.
    2. (b)With the information given, what can honestly be said about the probability that a single claim exceeds 22? Obtain one bound from Markov's inequality and another from Chebyshev's inequality, and say which is sharper.
    3. (c)Correct Step 3: find the approximate probability that the total exceeds 216. Then say, with reference to the population's shape and where the event sits, how far that figure should be trusted.

    Solution

    (a) Three errors.

    Step 1 applies the Central Limit Theorem to the wrong object. The theorem's conclusion is about the sample mean Xˉn​ (equivalently the sum Sn​): the standardised mean converges in distribution to N(0,1). It says nothing whatever about an individual Xi​, which has the population's distribution — strongly right-skewed — no matter how many other claims are collected alongside it. Collecting 36 claims does not reshape any one of them.

    Step 1 also misreads "n≥30". That is a rule of thumb calibrated on moderately skewed populations, not a hypothesis of the theorem, whose actual hypotheses are i.i.d. observations with 0<σ2<∞. For a strongly right-skewed population the normal approximation to Xˉn​ may need n in the hundreds, and it fails first in the tails. Even for the mean, n=36 earns only cautious trust here.

    Step 2 inherits the error. The figure 0.0013 is the upper tail of a normal distribution that does not describe a claim. Nothing in the data supports it.

    Step 3 confuses the standard deviation of the mean with that of the sum. The standard error σ/n​=1 belongs to Xˉ36​. By the CLT for sums, Sn​ is approximately N(nμ,nσ2), with standard deviation σn​=6×6=36, not 1. The spread of a total grows with n. A z-score of 72 should itself have triggered a sanity check: it claims that a total only 50% above its mean is seventy-two standard deviations out, which no real quantity ever is.

    (b) What can honestly be said. Let X be one claim. Since X≥0 with E(X)=4, Markov's inequality with a=22 gives

    P(X≥22)≤224​=112​≈0.18.

    Chebyshev's inequality with k=22−4=18 gives P(∣X−4∣≥18)≤18236​=32436​=91​; and since {X≥22}⊆{∣X−4∣≥18},

    P(X≥22)≤91​≈0.11.

    Chebyshev is the sharper of the two here (91​<112​, since 9⋅2=18>11), because it uses the variance as well as the mean. The honest statement is: the probability is at most about 11%, and could be anything below that. It may well be much smaller than 91​, but there is no basis for 0.0013 — a heavy right tail is exactly the kind of population that puts several percent of its mass beyond 22.

    (c) Step 3 corrected. S36​ has mean 144 and standard deviation 36, so

    P(S36​>216)≈P(Z>36216−144​)=P(Z>2)=1−Φ(2)=0.0228.

    How far to trust it. The Central Limit Theorem licenses the approximation, but its accuracy at n=36 depends on the population's skewness, and this population is strongly right-skewed — the regime where the rule of thumb is least reliable. Worse, the event is a right-tail probability of about 2%, and the tails are where a skewed sample mean departs from normality most stubbornly; for a right-skewed population the normal figure typically understates the right-tail probability at moderate n. The figure 0.0228 is therefore a rough guide — "a few percent, plausibly somewhat more" — and not a number to underwrite a reserve on. A decision that hinges on it needs an exact calculation from the claim distribution or a bootstrap, not the CLT.

  12. 12.Computation

    Throughout, use z∗=1.96 for 95% confidence, with (1.96)2=3.8416, and keep the arithmetic exact.

    1. (a)Prove that p(1−p)≤41​ for 0≤p≤1, with equality only at p=21​, and explain why this makes p∗=21​ the safe planning value in a sample-size calculation.
    2. (b)A poll is to estimate a proportion with 95% margin of error at most 0.02. Find the required n with the conservative planning value, and again with a prior estimate p∗=0.1. For the second, check the conditions for the normal approximation, and say exactly what goes wrong if the true proportion turns out to be 21​.
    3. (c)Two independent trials record a side effect in 40 of 400 patients on treatment A and in 80 of 400 patients on treatment B. Check the conditions, find the standard error of p^​B​−p^​A​, give a 95% confidence interval for pB​−pA​, and state the interval a student who added the two standard errors would have reported and why it is wrong.

    Solution

    (a) The worst case is p=21​. Complete the square:

    p(1−p)=p−p2=41​−(p2−p+41​)=41​−(p−21​)2.

    Since (p−21​)2≥0, this is at most 41​, with equality exactly when p=21​. ■

    The required sample size for margin m is n=m2(z∗)2p∗(1−p∗)​, which increases with p∗(1−p∗). Choosing p∗=21​ therefore gives the largest n any p could demand, so the margin m is achieved whatever the true proportion turns out to be. Any other planning value gambles that p is at least as far from 21​ as the guess.

    (b) Two sample sizes. With the conservative p∗=21​ and m=0.02,

    n=(0.02)23.8416×41​​=0.00040.9604​=2401,

    which happens to be an exact integer, so n=2401. (It is (1.96/0.04)2=492.)

    With the prior estimate p∗=0.1,

    n=0.00043.8416×0.1×0.9​=0.00040.345744​=864.36,

    and rounding up gives n=865 — about 36% of the conservative figure. Conditions: np∗=865×0.1=86.5≥10 and n(1−p∗)=865×0.9=778.5≥10, both comfortably satisfied, so the normal approximation behind the formula is legitimate.

    If the truth is p=21​, the standard error at n=865 is 8650.25​​ rather than the planned 8650.09​​ — larger by the factor 0.090.25​​=35​. The margin of error scales the same way: 0.02×35​=301​≈0.033, well over the 0.02 that was promised. The poll would be 865 interviews spent on a guarantee it cannot keep.

    (c) Difference of two proportions. The estimates are p^​A​=40040​=0.1 and p^​B​=40080​=0.2. Conditions: successes and failures are 40 and 360 for A, 80 and 320 for B, all at least 10, so both sampling distributions may be treated as normal.

    Standard errors of the two estimates:

    SEA​=4000.1×0.9​​=4000.09​​=200.3​=0.015,SEB​=4000.2×0.8​​=4000.16​​=200.4​=0.02.

    The two samples are independent, so the variances add — the minus sign in p^​B​−p^​A​ is squared away:

    Var(p^​B​−p^​A​)=SEB2​+SEA2​=0.0004+0.000225=0.000625,SE=0.000625​=0.025.

    (The three numbers 0.015, 0.02, 0.025 are a 3–4–5 triangle: the standard error of a difference is the hypotenuse, not the sum of the legs.) The point estimate is 0.2−0.1=0.1, the margin is 1.96×0.025=0.049, and the 95% interval is

    0.1±0.049=(0.051, 0.149).

    It excludes 0, so the data are reasonably strong evidence that treatment B produces the side effect more often — by somewhere between 5 and 15 points.

    The student who adds standard errors would take SE=0.015+0.02=0.035, margin 1.96×0.035=0.0686, and report (0.031, 0.169): an interval 40% too wide. It is wrong because standard deviations of independent quantities do not add; variances do. Adding them overstates the uncertainty of every comparison and quietly throws away the power to detect a real difference. For two equal standard errors the inflation is exactly 2​; here it is 0.0250.035​=1.4.

← Back to the question sheet

CalcPath·Free university mathematics

SubjectsProblem setsProgressFeedbackAbout