CalcPath
ProgressProblem setsFeedback
← Question sheet

Statistics · Solutions

Descriptive Statistics

12 questions · about 102 minutes

Work this sheet on paper, showing every step — the solutions are written as methods, so you can check your route and not just your final number. Name every result you use (“by the identity S(c)=S(xˉ)+n(c−xˉ)2”, “by Chebyshev's inequality”, “because deviations from the mean sum to zero”) and say which hypotheses it needs, in particular whether independence or normality is being assumed. Every number has been chosen so that no calculator is needed; leave answers as exact fractions or roots. Full worked solutions are on a separate page, and each question has its own reveal, so you can check one answer without seeing the rest.

  1. 1.Computation

    A bakery bakes 2400 loaves in a day. To monitor the ovens, an inspector weighs 25 loaves chosen at random from the day's output and finds a mean weight of 803 g with a sample standard deviation of 12 g.

    1. (a)Identify the population, the sample, one parameter and one statistic in this scenario, and write each parameter and statistic with its standard symbol.
    2. (b)The inspector writes “Xˉ=803, so E[Xˉ]=803.” Explain what is wrong with this sentence, distinguishing Xˉ from xˉ.
    3. (c)A colleague proposes estimating the day's mean weight by θ^=Xˉ+5, arguing that the ovens “usually run light”. Compute the bias of θ^ under the random-sample assumption, and state exactly what unbiasedness of Xˉ does and does not promise about the single value 803.

    Solution

    (a) Population and sample. The population is the day's entire output, all N=2400 loaves; the sample is the n=25 loaves actually weighed. A parameter is a number computed from the whole population, fixed and unknown: the day's mean weight μ and variance σ2 (or the proportion p of underweight loaves). A statistic is computed from the sample and would change with a different sample: xˉ=803 g and s=12 g, so s2=144 g2 (or p^​).

    (b) Random variable versus observed value. Upper-case Xˉ is the sample mean regarded as a random variable, before the sample is drawn; lower-case xˉ=803 is the one number it turned out to be. An expectation is a long-run average over all the samples that might have been drawn, so it is a statement about Xˉ, and under the random-sample assumption the theorem that the sample mean is unbiased gives E[Xˉ]=μ — an unknown constant, not 803. Substituting one realisation into an expectation is a category error. The two correct sentences are xˉ=803 and E[Xˉ]=μ.

    (c) Bias of the shifted estimator. By linearity of expectation and E[Xˉ]=μ,

    Bias(θ^)=E[Xˉ+5]−μ=μ+5−μ=5 g.

    The estimator is biased upward by 5 g whatever the ovens do: if they run light, that is already built into μ, and Xˉ tracks it without help. Unbiasedness of Xˉ promises only that, averaged over every random sample of 25 loaves that could have been drawn, the sample means would centre exactly on μ. It promises nothing about how far the single value 803 is from μ; that is governed by SD(Xˉ)=σ/n​, which here is estimated by 12/25​=2.4 g and is a separate quantity altogether.

  2. 2.Computation

    Five readings of a room's temperature, in degrees Celsius, are 11, 6, 12, 3, 8.

    1. (a)Compute xˉ and verify that the five deviations xi​−xˉ sum to zero. Then compute S(xˉ)=∑i=15​(xi​−xˉ)2.
    2. (b)Without touching the raw data again, find ∑i=15​(xi​−10)2 by quoting the appropriate identity. Then check it directly.
    3. (c)The readings are converted to Fahrenheit by F=59​C+32. Find the mean in Fahrenheit without converting the individual readings, and name the result that licenses this.
    4. (d)A second room was measured 15 times with mean 12∘C. Find the mean of all 20 readings, and explain why (8+12)/2=10 is wrong.

    Solution

    (a) Mean and deviations. The sum is 11+6+12+3+8=40, so xˉ=40/5=8. The deviations are 3,−2,4,−5,0, and 3−2+4−5+0=0, as the proposition that deviations from the mean sum to zero guarantees for every dataset. Their squares are 9,4,16,25,0, so S(xˉ)=54.

    (b) Shift the centre with the identity. The theorem that the mean minimises total squared deviation gives the exact identity S(c)=S(xˉ)+n(c−xˉ)2. With c=10,

    S(10)=54+5(10−8)2=54+20=74.

    Direct check: (11−10)2+(6−10)2+(12−10)2+(3−10)2+(8−10)2=1+16+4+49+4=74. ✓ The excess 20 is the cost of centring two degrees away from the minimiser.

    (c) Linear transformation. F=aC+b with a=59​ and b=32, so by the proposition on the mean under a linear transformation,

    yˉ​=59​⋅8+32=572​+32=5232​=46.4∘F.

    No individual reading was needed.

    (d) Combined mean. By the proposition on the combined mean of two groups,

    xˉ=nA​+nB​nA​xˉA​+nB​xˉB​​=205⋅8+15⋅12​=2040+180​=11.

    The pooled mean is a weighted mean of the two group means with the group sizes as weights, here 41​⋅8+43​⋅12=2+9=11. The unweighted average 10 treats the two rooms as equally represented, but the second room contributes three times as many readings, so the truth is pulled toward 12. Averaging averages is correct only when nA​=nB​.

  3. 3.Computation

    Ten commute times, in minutes, were recorded as 14, 22, 9, 31, 18, 27, 12, 45, 20, 16.

    1. (a)Find the median and the mean.
    2. (b)The value 45 turns out to have been a 450 — a day with a road closure. Recompute both centres with 450 in place of 45, and state by how much each moved.
    3. (c)Compute the 10% trimmed mean of the corrected data (the one containing 450), and say where it sits relative to the mean and the median.
    4. (d)Using the theorem that characterises the median as a minimiser, explain — without recomputing anything — why the median could not have moved in (b), and for which replacement values of the 45 this argument continues to hold.

    Solution

    (a) Sort first. In order: 9,12,14,16,18,20,22,27,31,45. With n=10 even the median is the average of the 5th and 6th values, (18+20)/2=19. The sum is 9+12+14+16+18=69 and 20+22+27+31+45=145, total 214, so xˉ=214/10=21.4.

    (b) One value changes. The 45 was already the largest observation, so replacing it by 450 leaves the order of the other nine untouched and 450 is still last. The 5th and 6th values are still 18 and 20: the median is 19, a move of 0. The sum becomes 214−45+450=619, so xˉ=61.9, a move of 40.5 minutes — one observation out of ten has tripled the mean.

    (c) Trimmed mean. With α=0.1 and n=10 we discard the lowest 1 and the highest 1 value, leaving 12,14,16,18,20,22,27,31, whose sum is 160. The trimmed mean is 160/8=20. It sits between the median 19 and the mean 61.9, but right next to the median: trimming removed the single value that was driving the mean, which is exactly what the trimmed mean is for.

    (d) Why the median cannot move. The theorem that the median minimises total absolute deviation shows that A(c)=∑∣xi​−c∣ has, between data values, slope L(c)−R(c): the number of observations to the left of c minus the number to the right. That slope depends only on how many points lie on each side, never on how far away they are. Replacing 45 by 450 leaves it on the right of every c<45, so for c in (18,20) the counts are still L=R=5, the slope is still zero there, and the minimising set is still [18,20] with midpoint 19.

    The argument holds for any replacement value that is at least 20, since then 450's replacement still lies to the right of the middle interval and the sorted positions 5 and 6 are unchanged. A replacement below 20 would change the ordering, and the median could then move.

  4. 4.Computation

    A sample of five machined parts has lengths, in centimetres, 7, 7, 11, 11, 14.

    1. (a)Compute s2 and s from the definition, showing the deviations. State what σ2 would be if these five parts were the entire population.
    2. (b)Confirm the sum of squares using the computational formula ∑xi2​−nxˉ2.
    3. (c)Each length is converted to millimetres and then reported as its deviation from a 100 mm target, yi​=10xi​−100. Find yˉ​, sy2​ and sy​ without recomputing from the data, and name the results used.
    4. (d)Compute the coefficient of variation of the x data. Explain why the coefficient of variation of the y data is not a meaningful quantity, even though the y data are just the x data in different units.

    Solution

    (a) From the definition. The sum is 7+7+11+11+14=50, so xˉ=10. The deviations are −3,−3,1,1,4 (they sum to 0, as they must), with squares 9,9,1,1,16 summing to 36. Dividing by n−1=4,

    s2=436​=9 cm2,s=3 cm.

    If the five parts were the whole population the divisor would be N=5: σ2=36/5=7.2 cm2 and σ=6/5​ cm.

    (b) Computational formula. ∑xi2​=49+49+121+121+196=536 and nxˉ2=5⋅100=500, so ∑(xi​−xˉ)2=536−500=36. ✓

    (c) Linear transformation. Here a=10 and b=−100. By the proposition on the mean under a linear transformation, yˉ​=10⋅10−100=0. By the proposition on the variance under a linear transformation, sy2​=a2sx2​=100⋅9=900 mm2 and sy​=∣a∣sx​=30 mm. The shift by −100 moved the mean and left the spread alone; the factor 10 scaled the standard deviation by 10 and the variance by 100.

    (d) Coefficient of variation. CVx​=s/xˉ=3/10=0.3, that is 30%. For the y data the formula would divide by yˉ​=0, but the failure is deeper than a zero denominator: the CV measures spread relative to level, which only means something when zero is a genuine zero of the quantity. The shift −100 moved the origin to an arbitrary target, so “level” no longer has meaning and the ratio is uninterpretable. A pure rescaling with a>0 and b=0 would have left the CV unchanged, since ∣a∣s/(axˉ)=s/xˉ; it is the shift that destroys it, which is why the CV is a ratio-scale tool.

  5. 5.Proof

    Take n=2 throughout. Let X1​,X2​ each have mean μ and variance σ2.

    1. (a)Show from the definitions that Xˉ=21​(X1​+X2​) and that s2=21​(X1​−X2​)2.
    2. (b)Assuming X1​ and X2​ are independent, prove directly that E[s2]=σ2. Deduce the expectation of the n-divisor estimator σ^2=21​∑i=12​(Xi​−Xˉ)2 and state its bias.
    3. (c)Now suppose instead that Cov(X1​,X2​)=ρσ2 for some ρ∈(−1,1). Show that E[s2]=(1−ρ)σ2, say which hypothesis of the unbiasedness theorem this shows to be indispensable, and interpret the sign of the bias when ρ>0.

    Solution

    (a) The two-point sample. By definition Xˉ=21​(X1​+X2​). The deviations are

    X1​−Xˉ=21​(X1​−X2​),X2​−Xˉ=21​(X2​−X1​)=−21​(X1​−X2​),

    which sum to zero as deviations from the mean must. Each squares to 41​(X1​−X2​)2, so the sum of squares is 21​(X1​−X2​)2, and dividing by n−1=1 gives s2=21​(X1​−X2​)2.

    (b) Independent case. Put D=X1​−X2​. By linearity, E[D]=μ−μ=0, so by the computational formula for the variance, E[D2]=Var(D)+(E[D])2=Var(D). For independent summands the variance of a sum is the sum of the variances, and Var(−X2​)=(−1)2Var(X2​)=σ2, so

    Var(D)=Var(X1​)+Var(X2​)=2σ2,henceE[s2]=21​E[D2]=σ2. ■

    The n-divisor estimator is σ^2=21​⋅21​D2=21​s2, so E[σ^2]=21​σ2 and its bias is −21​σ2=−σ2/n with n=2. This is the corollary that the n-divisor estimator is biased downward, in the case where it is off by half.

    (c) Correlated case. Expand D−E[D]=(X1​−μ)−(X2​−μ) and take expectations of the square:

    Var(D)=E[(X1​−μ)2]+E[(X2​−μ)2]−2E[(X1​−μ)(X2​−μ)]=σ2+σ2−2ρσ2=2(1−ρ)σ2.

    Still E[D]=0, so E[s2]=21​Var(D)=(1−ρ)σ2. ■

    This equals σ2 only when ρ=0. The indispensable hypothesis is independence of the observations (uncorrelatedness is what the algebra actually uses); it enters the general proof through Var(Xˉ)=σ2/n, which fails when the cross terms 2∑i<j​Cov(Xi​,Xj​) do not vanish. Normality was never needed and still is not. When ρ>0 the bias −ρσ2 is negative: positively correlated observations sit closer to each other than independent ones would, so their spread understates the population spread — two measurements on the same subject look less variable than two subjects do.

  6. 6.Critique

    A student's write-up on Bessel's correction contains the following two arguments.

    Argument A. “Dividing by n−1 makes the sample standard deviation unbiased. Proof: the sample variance satisfies E[s2]=σ2, so E[s]=E[s2​]=E[s2]​=σ2​=σ.”

    Argument B. “The correction only matters for small samples. Once n is large, dividing by n is also unbiased, so for n=1000 either divisor gives an unbiased estimator of σ2. In any case the real reason for n−1 is that it makes the answer bigger, which is the cautious choice.”

    1. (a)Identify the exact step in Argument A that is invalid and name the result that shows it fails. Then confirm the failure with a concrete example: a statistic V taking the values 1 and 9 with probability 21​ each. Compute E[V], E[V]​ and E[V​].
    2. (b)Identify both false claims in Argument B and correct them. For n=1000 and σ2=50, compute exactly the expectation and the bias of the n-divisor estimator.
    3. (c)Write one correct sentence stating what Bessel's correction actually achieves, including the hypotheses it needs.

    Solution

    (a) The square root is not linear. The invalid step is E[s2​]=E[s2]​: the expectation has been moved inside the square root. Expectation commutes with linear operations only. The square root is strictly concave, so Jensen's inequality gives E[V​]≤E[V]​ for any non-negative V, with strict inequality whenever V is genuinely random. Hence E[s]<σ: the sample standard deviation underestimates σ on average even though s2 is unbiased for σ2.

    Example: E[V]=21​(1+9)=5, so E[V]​=5​, while E[V​]=21​(1+3)=2. Since 22=4<5, we have 2<5​ and the two sides differ. The size of the gap depends on the distribution of V, which is why no universal correction to s exists.

    (b) Two false claims. First, “for large n dividing by n is also unbiased.” By the corollary that the n-divisor estimator is biased downward, Bias(σ^2)=−σ2/n, which is nonzero for every finite n. It tends to zero, but unbiasedness is an exact property and this estimator never has it. For n=1000 and σ2=50,

    E[σ^2]=1000999​⋅50=49.95,Bias=−100050​=−0.05.

    Small, but not zero, and “negligible” is a different claim from “unbiased”.

    Second, “the reason is that it makes the answer bigger.” The divisor n−1 is chosen because the lemma on the expected sum of squares about the sample mean gives E[∑(Xi​−Xˉ)2]=(n−1)σ2, so n−1 is the unique divisor making E[s2]=σ2. Being larger than the n-divisor version is a consequence, not a justification: dividing by n−2 would be larger still, and biased upward.

    (c) The correct statement. “For a random sample — independent, identically distributed observations with finite variance, with no assumption of normality — dividing the sum of squared deviations about Xˉ by n−1 produces an estimator s2 with E[s2]=σ2 exactly; the same is not true of s, for which E[s]<σ.”

  7. 7.Computation

    Eleven response times, in milliseconds, were logged as 13, 40, 9, 15, 11, 4, 24, 10, 18, 7, 12. Use the median-of-halves rule for quartiles throughout.

    1. (a)Give the five-number summary and the IQR. Say explicitly what you did with the median when forming the two halves.
    2. (b)Compute Tukey's mild and extreme fences and classify every observation that lies outside a fence. Say where each whisker of a box plot would end.
    3. (c)Compute the mean, compare it with the median, and state what the comparison suggests about the shape of the data.
    4. (d)The logging system is found to have truncated the largest value, which was really 400, not 40. Without recomputing from scratch, state which of the quantities in (a)–(c) change and which do not, and by how much the mean changes.

    Solution

    (a) Sort, then split. In order: 4,7,9,10,11,12,13,15,18,24,40. With n=11 odd the median is the 6th value, Q2​=12. The rule excludes the median itself from both halves: the lower half is {4,7,9,10,11} with median Q1​=9, and the upper half is {13,15,18,24,40} with median Q3​=18. The five-number summary is {4, 9, 12, 18, 40} and IQR=18−9=9.

    (b) Fences. 1.5IQR=13.5, so the mild fences are 9−13.5=−4.5 and 18+13.5=31.5; 3IQR=27, so the extreme fences are −18 and 45. The only value outside a fence is 40: it exceeds 31.5 but not 45, so it is a mild outlier and not an extreme one. Nothing lies below −4.5. The lower whisker runs from Q1​=9 down to the minimum 4; the upper whisker runs from Q3​=18 to the largest observation inside the fence, 24, with 40 plotted separately.

    (c) Mean versus median. The sum is 4+7+9+10+11=41 and 12+13+15+18+24+40=122, total 163, so

    xˉ=11163​=14119​≈14.8.

    The mean exceeds the median 12 by 1131​≈2.8 ms. By the proposition that skew separates the mean from the median, this suggests right skew — a long upper tail, visible here as 24 and 40. It is a rule of thumb, to be confirmed by a plot.

    (d) What a distant value can and cannot touch. The 40 was already the largest observation, so replacing it by 400 changes no sorted position. Minimum, Q1​, Q2​, Q3​, the IQR, both sets of fences and both whisker ends are all unchanged; in the five-number summary only the maximum becomes 400. The classification does change: 400>45, so the point is now an extreme outlier. The mean rises by 11400−40​=11360​≈32.7 ms to 11523​≈47.5 ms, which now exceeds ten of the eleven observations — the skew diagnosis in (c) is sharpened, and the IQR's indifference to the tail is the robustness claim made concrete.

  8. 8.Computation

    In a course, the midterm had mean 62 and standard deviation 8; the final had mean 70 and standard deviation 12. A student scored 74 on the midterm and 79 on the final. Nothing is known about the shape of either score distribution unless a part says so.

    1. (a)Compute both z-scores and say on which exam the student did relatively better.
    2. (b)The instructor curves the midterm by y=45​x+5. Recompute the student's midterm z-score on the curved scale, then prove in general that a linear rescaling y=ax+b with a>0 leaves every z-score unchanged. What happens if a<0?
    3. (c)Using only the mean and standard deviation, what is the largest possible fraction of final-exam scores lying outside [46,94]? Name the result used. What fraction would you expect outside that interval if the final scores were approximately normal?
    4. (d)Within how many standard deviations of the mean must at least 91% of the final scores lie, whatever the shape of the distribution? Give the corresponding interval of scores.

    Solution

    (a) Standardise. zmid​=874−62​=812​=1.5 and zfin​=1279−70​=129​=0.75. The midterm was the relatively better performance: 1.5 standard deviations above its mean against 0.75, even though the raw final score is higher. The z-score is the common ruler that makes the two comparable.

    (b) Invariance under rescaling. On the curved scale the mean is 45​⋅62+5=77.5+5=82.5, the standard deviation is 45​⋅8=10 (by the proposition on the variance under a linear transformation, sy​=∣a∣sx​), and the student's score is 45​⋅74+5=92.5+5=97.5. So z=1097.5−82.5​=1.5, unchanged.

    In general, with a>0: yˉ​=axˉ+b and sy​=∣a∣sx​=asx​, hence

    zy​=sy​y−yˉ​​=asx​(ax+b)−(axˉ+b)​=asx​a(x−xˉ)​=zx​. ■

    If a<0 then sy​=∣a∣sx​=−asx​, and the same computation gives zy​=−asx​a(x−xˉ)​=−zx​: a reflection swaps which side of the mean each score is on, so every z-score changes sign but not size.

    (c) Chebyshev with k=2. [46,94]=70±24=μ±2σ. Chebyshev's inequality, which needs only a finite variance, gives P(∣X−μ∣≥2σ)≤221​=41​, so at most 25% of scores lie outside the interval. Under approximate normality the empirical rule puts about 95% inside μ±2σ, so only about 5% outside. The universal guarantee is far weaker than the normal figure, as it must be — it has to hold for the worst-case shape.

    (d) Solve for k. We need 1−k21​≥0.91, i.e. k21​≤0.09=1009​, i.e. k2≥9100​, so k≥310​. Then kσ=310​⋅12=40 and the interval is [70−40,70+40]=[30,110]. Its upper end exceeds any score the exam could award, which is a reminder that Chebyshev uses only two numbers and knows nothing about the scale of the data; the bound is a guarantee, not a description.

  9. 9.Proof

    Let x1​,…,xn​ with n≥2 be sample data with standard deviation s>0, and let zi​=(xi​−xˉ)/s be the standardised values.

    1. (a)Prove directly from the definitions of xˉ and s2 that ∑i=1n​zi​=0 and ∑i=1n​zi2​=n−1.
    2. (b)Deduce that no observation in a sample of size n can have ∣zi​∣>n−1​. For which sample sizes is a “four standard deviation” observation impossible?
    3. (c)Let k>0 and let m be the number of observations with ∣xi​−xˉ∣≥ks. Prove that nm​≤nk2n−1​. Compare with Chebyshev's inequality, and explain why this bound needs no assumption about the data at all — not even that they are a random sample.

    Solution

    (a) Two sums. Since s does not depend on i,

    i=1∑n​zi​=s1​i=1∑n​(xi​−xˉ)=s1​(i=1∑n​xi​−nxˉ)=s1​(nxˉ−nxˉ)=0,

    using ∑xi​=nxˉ, the definition of the mean rearranged. For the squares, the definition s2=n−11​∑(xi​−xˉ)2 says ∑(xi​−xˉ)2=(n−1)s2, so

    i=1∑n​zi2​=s21​i=1∑n​(xi​−xˉ)2=s2(n−1)s2​=n−1. ■

    (These are the statements zˉ=0 and sz2​=1 of the proposition on standardised data, proved here without the linear-transformation propositions.)

    (b) A bound on every z-score. Every term zi2​ is non-negative, so for any fixed j,

    zj2​≤i=1∑n​zi2​=n−1,hence∣zj​∣≤n−1​. ■

    A value with ∣z∣=4 requires n−1​≥4, i.e. n≥17; for n≤16 it is impossible. In a sample of 10 no z-score can exceed 3. Equality in the bound would need every other zi​ to be 0, i.e. every other xi​=xˉ, but then the deviations summing to zero would force xj​=xˉ as well and s=0; so the bound is never attained for n≥2, though it is the right order of magnitude. The practical moral: an “outlier” rule of the form ∣z∣>3 cannot fire in a small sample, however extreme the point, which is one reason Tukey's fences are preferred.

    (c) A Chebyshev inequality for data. Discard the non-negative terms that do not satisfy the condition, then bound each remaining term below:

    (n−1)s2=i=1∑n​(xi​−xˉ)2 ≥ i:∣xi​−xˉ∣≥ks∑​(xi​−xˉ)2 ≥ m⋅k2s2.

    Dividing by nk2s2>0 gives nm​≤nk2n−1​. ■

    Chebyshev's inequality says P(∣X−μ∣≥kσ)≤1/k2 for a random variable with finite variance; this is the same statement for the empirical distribution of a dataset, and slightly stronger, by the factor nn−1​<1 that Bessel's divisor introduces. It rests on nothing probabilistic: it is an algebraic inequality about n fixed numbers, so there is no randomness, no independence and no distribution to assume. (Chebyshev's own hypothesis is almost as light — only a finite variance — which is why both bounds are loose: they must survive the worst possible shape.)

  10. 10.Sketch

    Twenty waiting times at a clinic, in minutes, already sorted:

    3, 4, 6, 6, 7, 8, 8, 9, 9, 11, 12, 12, 13, 14, 16, 17, 19, 22, 27, 38.

    1. (a)Using bins of width 5 starting at 0 — [0,5),[5,10),… — tabulate the counts and sketch the histogram. Describe its shape (modality and skew).
    2. (b)Compute the five-number summary, the IQR and Tukey's mild fences, and identify any outliers.
    3. (c)Directly beneath the histogram, on the same horizontal axis, draw the box plot. Mark on it every feature it preserves from the histogram, and name one feature of the histogram it loses.
    4. (d)Compute the mean, mark both the mean and the median on the histogram, and explain — citing the two minimisation theorems — why they fall in the order they do.

    Solution

    (a) Counts and shape. Binning the sorted list:

    [0,5): 3,4 — count 2. [5,10): 6,6,7,8,8,9,9 — count 7. [10,15): 11,12,12,13,14 — count 5. [15,20): 16,17,19 — count 3. [20,25): 22 — count 1. [25,30): 27 — count 1. [30,35): none — count 0. [35,40): 38 — count 1. Total 2+7+5+3+1+1+0+1=20. ✓

    The histogram has bars of heights 2,7,5,3,1,1,0,1 over those intervals, with the horizontal axis labelled “waiting time (minutes)” and the vertical “count”. It is unimodal, peaking in [5,10), and right-skewed: the bars fall off steeply to the left (nothing below 3) and slowly to the right, with a tail reaching 38, an empty bin at [30,35) and an isolated bar beyond it.

    (b) Five-number summary. n=20 is even, so the median is 21​(x(10)​+x(11)​)=21​(11+12)=11.5. The lower half is the first ten values, whose median is 21​(7+8)=7.5=Q1​; the upper half is 12,12,13,14,16,17,19,22,27,38, whose median is 21​(16+17)=16.5=Q3​. The summary is {3, 7.5, 11.5, 16.5, 38} and IQR=9. The mild fences are 7.5−13.5=−6 and 16.5+13.5=30. The single outlier is 38>30; it is mild, not extreme, since the extreme fence is 16.5+27=43.5.

    (c) The box plot beneath. On the same axis draw a box from 7.5 to 16.5 with a line at 11.5; a lower whisker from 7.5 down to the minimum 3 (inside the fence); an upper whisker from 16.5 to 27, the largest value not exceeding 30; and 38 as a separate point.

    Preserved: the centre (the median line sits under the tall left-of-centre bars), the spread of the middle half (the box), the skew (the median is left of the box's centre, 4 from Q1​ but 5 from Q3​, and the upper whisker, of length 10.5, is more than twice the lower one, of length 4.5), and the outlier. Lost: modality — the box cannot show that the data pile up in [5,10) rather than being spread evenly across [7.5,16.5] — and the gap at [30,35). Five numbers do not determine a shape.

    (d) Mean against median. The first ten values sum to 3+4+6+6+7+8+8+9+9+11=71 and the last ten to 12+12+13+14+16+17+19+22+27+38=190, so xˉ=261/20=13.05. Mark the median at 11.5 and the mean at 13.05, both inside the [10,15) bar, with the mean to the right.

    The order median<mean is what right skew predicts, and the two minimisation theorems say why. The mean minimises ∑(xi​−c)2, so the far-out values 27 and 38 contribute squared distances that grow fast, and the minimiser is dragged toward them. The median minimises ∑∣xi​−c∣, whose slope between data points is the count on the left minus the count on the right — so 38 counts exactly once, like every other observation, and its distance is irrelevant.

  11. 11.Critique

    An internal report on customer waiting times at two branches contains the following four claims. Each is wrong. For each claim, identify the error, name the result or principle it violates, and give the corrected statement — with the corrected number wherever one can be computed.

    1. (a)“Branch A served 40 customers with a mean wait of 6 minutes; Branch B served 10 customers with a mean wait of 16 minutes. The company-wide mean wait is therefore (6+16)/2=11 minutes.”
    2. (b)“At Branch B the mean wait is 16 minutes but the median is only 9. Since the mean uses every observation and the median throws most of them away, the mean is the more informative summary of a typical wait at B.”
    3. (c)“Applying the 1.5IQR rule to Branch B flagged 3 of the 10 waits as outliers. These were deleted before computing the standard deviation, so the reported s is now free of contamination.”
    4. (d)“Using the corrected company-wide mean of 8 minutes and s=5 minutes, a customer who waited 18 minutes has z=2 and is therefore at the 97.7th percentile, so fewer than 3% of customers waited longer.”

    Solution

    (a) Averaging averages. The error is treating the two branch means as equally weighted. By the proposition on the combined mean of two groups, the pooled mean is weighted by group size:

    xˉ=40+1040⋅6+10⋅16​=50240+160​=8 minutes.

    The figure 11 would be right only if the branches had served equally many customers; with A four times busier, the truth sits much closer to A's 6.

    (b) Wrong centre for a skewed distribution. A mean of 16 against a median of 9 says, by the proposition that skew separates the mean from the median, that the waits at B are strongly right-skewed: a few very long waits. “Uses every observation” is the mean's weakness here, not its strength — the mean minimises total squared deviation, so it chases the tail, while the median minimises total absolute deviation and only counts observations, so it stays with the bulk. The recipe for choosing a summary says: skewed data or unremovable outliers, report the median and IQR. Corrected statement: “A typical wait at B is about 9 minutes (median, n=10); the mean of 16 is inflated by a few very long waits and should be reported with the IQR, not on its own.”

    (c) A flag is not a licence to delete. Tukey's fences are calibrated on normal data, where they flag about 0.7% of values. On right-skewed waiting times the long tail is the distribution, not a contamination of it, and the rule flags legitimate observations wholesale — 3 out of 10 is itself evidence of skew, not of three errors. Deleting them removes the longest waits from the record, biases s downward, and produces a summary of a dataset that does not exist. Corrected procedure: investigate each flagged wait and delete only if a recording error is found; otherwise keep all 10, report the five-number summary and IQR (which the tail cannot distort) alongside s computed on all the data, and state n.

    (d) A z-score is not a percentile. The computation z=(18−8)/5=2 is fine. The conversion of z=2 into the 97.7th percentile assumes a normal distribution, and the data are not normal: they are right-skewed by (b), and waits cannot be negative while a normal with μ=8, σ=5 extends well below zero. Without a shape, only Chebyshev's inequality applies: P(∣X−8∣≥10)≤41​. Since X≥0, the event ∣X−8∣≥10 is exactly X≥18 — the lower tail X≤−2 is empty — so the honest statement is “at most 25% of customers waited 18 minutes or longer; nothing sharper can be said from xˉ and s alone.” The 97.7 figure is unsupported, and on skewed data could be badly wrong in either direction.

  12. 12.Proof

    Group A consists of nA​ values with mean xˉA​ and within-group sum of squares SSA​=∑i∈A​(xi​−xˉA​)2; group B likewise has nB​, xˉB​ and SSB​. Let xˉ be the mean of the pooled data of N=nA​+nB​ values.

    1. (a)Prove that all i∑​(xi​−xˉ)2=SSA​+SSB​+nA​(xˉA​−xˉ)2+nB​(xˉB​−xˉ)2, and name the identity that does the work.
    2. (b)Show that the last two terms together equal NnA​nB​​(xˉA​−xˉB​)2.
    3. (c)Group A: nA​=4, xˉA​=10, sA​=2. Group B: nB​=6, xˉB​=15, sB​=3. Find the pooled mean, the pooled sum of squares, and the sample variance s2 of the pooled ten values.
    4. (d)Your answer in (c) exceeds both sA2​ and sB2​. Explain why this is not a contradiction, and state the one condition under which the pooled variance is a weighted average of the two group variances.

    Solution

    (a) Decompose each group about its own mean. Within group A, write xi​−xˉ=(xi​−xˉA​)+(xˉA​−xˉ) and expand the square:

    i∈A∑​(xi​−xˉ)2=i∈A∑​(xi​−xˉA​)2+2(xˉA​−xˉ)i∈A∑​(xi​−xˉA​)+nA​(xˉA​−xˉ)2.

    The middle sum is the total deviation of group A from its own mean, which is zero by the proposition that deviations from the mean sum to zero. What remains is SSA​+nA​(xˉA​−xˉ)2 — this is exactly the identity S(c)=S(xˉA​)+nA​(c−xˉA​)2 from the theorem that the mean minimises total squared deviation, applied to group A with c=xˉ. The same computation for group B gives SSB​+nB​(xˉB​−xˉ)2, and since every observation belongs to exactly one group, adding the two gives the claim. ■

    (b) The between-groups term. Since xˉ=NnA​xˉA​+nB​xˉB​​,

    xˉA​−xˉ=NNxˉA​−nA​xˉA​−nB​xˉB​​=NnB​(xˉA​−xˉB​)​,xˉB​−xˉ=NnA​(xˉB​−xˉA​)​.

    Writing d=xˉA​−xˉB​,

    nA​(xˉA​−xˉ)2+nB​(xˉB​−xˉ)2=N2nA​nB2​d2+nB​nA2​d2​=N2nA​nB​(nB​+nA​)​d2=NnA​nB​​d2. ■

    The between-groups contribution depends only on the two sizes and the gap between the two means.

    (c) Numbers. The pooled mean is xˉ=104⋅10+6⋅15​=1040+90​=13. Recover each sum of squares from its variance via SS=(n−1)s2: SSA​=3⋅4=12 and SSB​=5⋅9=45. The between term is 104⋅6​(10−15)2=1024​⋅25=60; as a check, 4(10−13)2+6(15−13)2=36+24=60. ✓ So the pooled sum of squares is 12+45+60=117 and

    s2=10−1117​=13,s=13​.

    (d) Why the pooled variance can exceed both. Each group's variance measures spread about that group's own centre. The pooled variance measures spread about 13, a point that group A sits 3 below and group B sits 2 above; that displacement is what the between term 60 records, and here it outweighs the two within terms combined (57). Sums of squares add; variances about different centres do not. Naively averaging 4 and 9 would be wrong twice over — wrong weights, and no between term at all.

    The between term vanishes exactly when xˉA​=xˉB​. Then SS=SSA​+SSB​ and

    s2=N−1(nA​−1)sA2​+(nB​−1)sB2​​,

    a weighted average of the two variances with weights nA​−1 and nB​−1 — the degrees of freedom of each group. This is the pooled variance that a two-sample comparison of means uses, and the condition of equal group means is precisely what makes it legitimate as a description of a single spread.

← Back to the question sheet

CalcPath·Free university mathematics

SubjectsProblem setsProgressFeedbackAbout