Probability and Statistics 201-SN1-RE • CEGEP, Montreal

Corrected exercises: confidence intervals (201-SN1-RE)

Here are ten corrected exercises on confidence intervals for the CEGEP Probability and Statistics course 201-SN1-RE, in the Science program, preceded by a list of calculations.

What the set covers, the traps it targets

They cover the sampling distribution of the mean X‾\overline{X} and of the proportion P^\hat{P}, the central limit theorem and its conditions, sampling with replacement, the margin of error, Student's t distribution and its degrees of freedom, and the three interval cases of the official course description: a mean with n≥30n\ge 30, a mean with n<30n<30 from a population assumed normal, a proportion with n≥30n\ge 30.

Exercise 0.1 lines up eleven direct calculations: standard error, intervals at 90%, 95% and 99%, critical value read in the table, Student interval, interval for a proportion and sample sizes. By the end of the set, you can prove that E(X‾)=μE(\overline{X})=\mu and V(X‾)=σ2nV(\overline{X})=\frac{\sigma^{2}}{n} (exercise 1) and the analogue for P^\hat{P} (exercise 5), say when the central limit theorem applies (exercise 2), build and write up the three intervals (exercises 3, 4 and 5), choose the size of a sample (exercise 6), interpret a confidence level (exercise 7) and carry out a complete study, from the data to the written conclusion (exercise 9).

The situations come from the natural sciences: scallops in a tank and in a scallop bed, mercury in the flesh of walleyes, ground-level ozone, maple sap and the rule of 86, ash trees attacked by the emerald ash borer, ragweed pollen grains, banded Canada geese whose numbers are estimated by capture-recapture (exercise 10). Seven pitfalls are dealt with: the normal distribution applied to a single fish (exercise 2), 1.961.96 instead of Student's tt on twelve measurements (exercise 4), the sample size rounded down (exercise 6), “a 95% chance that μ\mu is inside” (exercise 7), the interval for the mean taken as the range of the individuals and nn doubled to halve the margin (exercise 8), the bounds swapped by a decreasing transformation (exercise 10).

The thread of the set: the standard deviation of the individuals is not that of the mean. The interval is built with the standard error, its 95% describes the method and not the parameter, and it only holds under its conditions. Hypothesis tests are the subject of the next chapter. Work through each exercise completely before opening the solution.

  • 11 corrected exercises • 110 points • 150 minutes
  • Self-checking, 117 answers
  • Calculator
Start exercise 0.1 The chapter sheet

Course recap

  • • DISTRIBUTION OF X‾\overline{X}: for a sample of size nn drawn with replacement (or without replacement, nn small compared with NN), E(X‾)=μE(\overline{X})=\mu and σX‾=σn\sigma_{\overline{X}}=\dfrac{\sigma}{\sqrt{n}}, the STANDARD ERROR. Do not confuse it with σ\sigma, the spread of the individuals.
  • • DISTRIBUTION OF P^\hat{P}: E(P^)=pE(\hat{P})=p and σP^=p(1−p)n\sigma_{\hat{P}}=\sqrt{\dfrac{p(1-p)}{n}}.
  • • CENTRAL LIMIT THEOREM: independent, identically distributed observations, n≥30n\ge 30 in practice: X‾\overline{X} approximately follows N(μ,σ2n)N\left(\mu, \frac{\sigma^{2}}{n}\right), whatever the shape of the population. It does not make the data normal.
  • • MEAN, n≥30n\ge 30: x‾±zα/2sn\overline{x}\pm z_{\alpha/2}\dfrac{s}{\sqrt{n}}, with z=1.645z=1.645, 1.961.96, 2.5762.576 for 90%, 95%, 99%.
  • • MEAN, n<30n<30, population assumed normal: x‾±tα/2,n−1sn\overline{x}\pm t_{\alpha/2, n-1}\dfrac{s}{\sqrt{n}}, Student's t distribution with n−1n-1 degrees of freedom, more spread out than the normal.
  • • PROPORTION, n≥30n\ge 30, np^≥5n\hat{p}\ge 5 and n(1−p^)≥5n(1-\hat{p})\ge 5: p^±zα/2p^(1−p^)n\hat{p}\pm z_{\alpha/2}\sqrt{\dfrac{\hat{p}(1-\hat{p})}{n}}.
  • • SAMPLE SIZE: n≥(zσE)2n\ge\left(\dfrac{z\sigma}{E}\right)^{2} or n≥z2p(1−p)E2n\ge\dfrac{z^{2}p(1-p)}{E^{2}}, with p=0.5p=0.5 when nothing is known, ROUNDED UP. Dividing the margin by 22 takes 44 times as many data.
  • • INTERPRETATION: μ\mu is fixed; the method produces an interval that contains μ\mu in 95% of samples. A computed interval contains μ\mu or does not.

Calculations: standard error, intervals and sample size

Exercise 0.1: Building a confidence interval: eleven direct calculations

17 answers to check

For each line, compute the requested quantity from the summary data given, without interpreting. Critical values of the standard normal distribution: z0.05=1.645z_{0.05}=1.645 (90% level), z0.025=1.96z_{0.025}=1.96 (95%) and z0.005=2.576z_{0.005}=2.576 (99%). Student's tt is given when it is needed. Round the bounds for a mean to the hundredth and those for a proportion to the thousandth.

  • a) σ=18\sigma=18, n=81n=81, sampling with replacement: compute the standard deviation σX‾\sigma_{\overline{X}} of the sample mean.
  • b) x‾=64.2\overline{x}=64.2, s=9s=9, n=36n=36: build the 95% confidence interval for μ\mu.
  • c) Same data as in b): build the 90% interval.
  • d) Same data as in b): build the 99% interval.
  • e) Read in the standard normal table the critical value z0.01z_{0.01} of a 98% interval.
  • f) x‾=15.4\overline{x}=15.4, s=1.8s=1.8, n=9n=9, population assumed normal, t0.025,8=2.306t_{0.025, 8}=2.306: build the 95% interval for μ\mu.
  • g) 126126 successes out of n=300n=300: build the 95% interval for the proportion pp.
  • h) A confidence interval for μ\mu is [12.6,15.0][12.6, 15.0]: give the point estimate and the margin of error.
  • i) σ=6\sigma=6: compute the minimum sample size for a margin of 11 at the 95% level.
  • j) Unknown proportion, with no prior information at all: compute the minimum sample size for a margin of 0.030.03 at the 95% level.
  • k) p=0.2p=0.2, n=400n=400: compute the standard deviation σP^\sigma_{\hat{P}} of the sample proportion.

Type your answers, the page tells you right or wrong 0/17

a)
b)
c)
d)
e)
f)
g)
h)
i)
j)
k)
Show the solution

Answers

  • a) σX‾=189=2\sigma_{\overline{X}}=\frac{18}{9}=2
  • b) 64.2±2.9464.2\pm 2.94, so [61.26,67.14][61.26, 67.14]
  • c) 64.2±2.4764.2\pm 2.47, so [61.73,66.67][61.73, 66.67]
  • d) 64.2±3.8664.2\pm 3.86, so [60.34,68.06][60.34, 68.06]
  • e) z0.01≈2.33z_{0.01}\approx 2.33
  • f) 15.4±1.3815.4\pm 1.38, so [14.02,16.78][14.02, 16.78]
  • g) 0.42±0.0560.42\pm 0.056, so [0.364,0.476][0.364, 0.476]
  • h) x‾=13.8\overline{x}=13.8 and E=1.2E=1.2
  • i) n≥138.3n\ge 138.3, so n=139n=139
  • j) n≥1067.1n\ge 1067.1, so n=1068n=1068
  • k) σP^=0.02\sigma_{\hat{P}}=0.02

The move that decides everything: compute the standard error ON ITS OWN, on its own line, before any margin. It carries the n\sqrt{n} that people forget, and it is what separates the spread of one individual from the spread of a mean.

a)
σX‾=σn=1881=189=2\displaystyle \sigma_{\overline{X}}=\dfrac{\sigma}{\sqrt{n}}=\dfrac{18}{\sqrt{81}}=\dfrac{18}{9}=2
b)

Standard error: sn=96=1.5\dfrac{s}{\sqrt{n}}=\dfrac{9}{6}=1.5.

Margin: E=1.96×1.5=2.94E=1.96\times 1.5=2.94.

[64.2−2.94,64.2+2.94]=[61.26,67.14]\displaystyle [64.2-2.94, 64.2+2.94]=[61.26, 67.14]

With n≥30n\ge 30, the unknown σ\sigma is replaced by ss and we keep zz.

c)

E=1.645×1.5=2.4675E=1.645\times 1.5=2.4675, so [61.73,66.67][61.73, 66.67].

Less confidence, narrower interval.

d)

E=2.576×1.5=3.864E=2.576\times 1.5=3.864, so [60.34,68.06][60.34, 68.06].

More confidence, wider interval.

e)

A 98% level leaves 2%2\% outside the interval, that is 1%1\% in each tail.

So we look for zz such that P(Z≤z)=0.99P(Z\le z)=0.99. The table gives 0.99010.9901 for z=2.33z=2.33: z0.01≈2.33z_{0.01}\approx 2.33 (finer value: 2.3262.326).

Pitfall: looking for P(Z≤z)=0.98P(Z\le z)=0.98, which gives 2.052.05, the critical value of a 96% interval.

f)

Standard error: 1.89=0.6\dfrac{1.8}{\sqrt{9}}=0.6.

Margin: E=2.306×0.6=1.3836E=2.306\times 0.6=1.3836.

[15.4−1.3836,15.4+1.3836]≈[14.02,16.78]\displaystyle [15.4-1.3836, 15.4+1.3836]\approx[14.02, 16.78]

Small sample and σ\sigma unknown: Student with n−1=8n-1=8 degrees of freedom, under the assumption of a normal population.

g)

p^=126300=0.42\hat{p}=\dfrac{126}{300}=0.42; conditions: np^=126≥5n\hat{p}=126\ge 5 and n(1−p^)=174≥5n(1-\hat{p})=174\ge 5.

Standard error: 0.42×0.58300≈0.02850\sqrt{\dfrac{0.42\times 0.58}{300}}\approx 0.02850.

Margin: E=1.96×0.02850≈0.0559E=1.96\times 0.02850\approx 0.0559, so [0.364,0.476][0.364, 0.476].

h)

The interval is symmetric about the estimate: x‾=12.6+15.02=13.8\overline{x}=\dfrac{12.6+15.0}{2}=13.8 and E=15.0−12.62=1.2E=\dfrac{15.0-12.6}{2}=1.2.

i)

1.966n≤1  ⟺  n≥(1.96×6)2=138.29761.96\dfrac{6}{\sqrt{n}}\le 1 \iff n\ge(1.96\times 6)^{2}=138.2976, so n=139n=139.

Pitfall: rounding to 138138 gives a margin of 1.00111.0011, above the target.

j)

n≥1.962×0.5×0.50.032≈1067.1n\ge\dfrac{1.96^{2}\times 0.5\times 0.5}{0.03^{2}}\approx 1067.1, so n=1068n=1068.

p=0.5p=0.5 makes p(1−p)p(1-p) as large as possible: the size obtained works whatever the true proportion.

k)
σP^=p(1−p)n=0.2×0.8400=0.0004=0.02\displaystyle \sigma_{\hat{P}}=\sqrt{\dfrac{p(1-p)}{n}}=\sqrt{\dfrac{0.2\times 0.8}{400}}=\sqrt{0.0004}=0.02

Tick the exercises you have done or want to review: a free account, no password, keeps your ticks and your right answers from one visit to the next, tells you which chapter to tackle next and lets you ask for the exercise you are missing. Create your space, an email is enough.

Part A: the basics (/50)

Exercise 1: The mean of a sample is a random variable: its expected value and variance proved

11 answers to check

In an experimental rearing tank, only four scallops are left. Their shell heights, in millimetres, are 9292, 9898, 104104 and 110110. One scallop is drawn at random, its height is measured, it is put back in the tank, then a second one is drawn: this is sampling WITH REPLACEMENT, of size n=2n=2. Let X1X_{1} and X2X_{2} be the two heights measured and X‾=X1+X22\overline{X}=\dfrac{X_{1}+X_{2}}{2} their mean.

The figure gives the distribution of the height XX of a scallop drawn at random from the tank.

8890929496981001021041061081101121140.050.10.150.20.250.31/41/41/41/4probability
  • a) Compute the mean μ\mu and the variance σ2\sigma^{2} of the population (population variance: divide by N=4N=4).
  • b) The 1616 ordered samples (X1,X2)(X_{1},X_{2}) are equally likely. Write out the distribution of X‾\overline{X}, then give the number of possible values of X‾\overline{X} and P(X‾=101)P(\overline{X}=101).
  • c) Compute E(X‾)E(\overline{X}) and V(X‾)V(\overline{X}) from this distribution. Compare them with μ\mu and with σ22\dfrac{\sigma^{2}}{2}.
  • d) Prove that, for a sample of size nn drawn with replacement, E(X‾)=μE(\overline{X})=\mu and V(X‾)=σ2nV(\overline{X})=\dfrac{\sigma^{2}}{n}. Identify the step that requires the draws to be independent.
  • e) The two scallops are now drawn WITHOUT replacement: the 66 pairs of distinct scallops are equally likely. Compute V(X‾)V(\overline{X}) and explain why this difference can be ignored when the population is large.
  • f) With replacement, compute the standard deviation of X‾\overline{X} for a sample of 88 scallops. By what factor must nn be multiplied to divide it by 22?

Type your answers, the page tells you right or wrong 0/11

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) μ=101\mu=101 mm and σ2=45\sigma^{2}=45 mm²
  • b) X‾∈{92,95,98,101,104,107,110}\overline{X}\in\{92,95,98,101,104,107,110\} with probabilities 116,216,316,416,316,216,116\frac{1}{16},\frac{2}{16},\frac{3}{16},\frac{4}{16},\frac{3}{16},\frac{2}{16},\frac{1}{16}; 77 values; P(X‾=101)=416=0.25P(\overline{X}=101)=\frac{4}{16}=0.25
  • c) E(X‾)=101=μE(\overline{X})=101=\mu and V(X‾)=22.5=σ22V(\overline{X})=22.5=\frac{\sigma^{2}}{2}
  • d) Linearity of expectation, then additivity of variances, which requires independence: V(X‾)=nσ2n2=σ2nV(\overline{X})=\frac{n\sigma^{2}}{n^{2}}=\frac{\sigma^{2}}{n}
  • e) V(X‾)=15V(\overline{X})=15 mm², that is 22.5×N−nN−122.5\times\frac{N-n}{N-1}; this factor is almost 11 when nn is small compared with NN
  • f) σX‾=458≈2.37\sigma_{\overline{X}}=\frac{\sqrt{45}}{\sqrt{8}}\approx 2.37 mm; multiply nn by 44
a)

μ=92+98+104+1104=4044=101\mu=\dfrac{92+98+104+110}{4}=\dfrac{404}{4}=101 mm.

Deviations from the mean: −9-9, −3-3, 33, 99.

σ2=81+9+9+814=1804=45\sigma^{2}=\dfrac{81+9+9+81}{4}=\dfrac{180}{4}=45 mm², so σ=45≈6.71\sigma=\sqrt{45}\approx 6.71 mm.

Divide by NN and not by N−1N-1: these are ALL the values of the population, not a sample.

b)

Each draw has 44 equally likely outcomes, so there are 4×4=164\times 4=16 ordered samples, each with probability 116\frac{1}{16}.

The sum X1+X2X_{1}+X_{2} goes from 184184 to 220220 in steps of 66, so X‾\overline{X} takes 77 values: 9292, 9595, 9898, 101101, 104104, 107107, 110110.

Count the samples: 11, 22, 33, 44, 33, 22, 11 out of 1616. For example X‾=101\overline{X}=101 comes from (92,110)(92,110), (110,92)(110,92), (98,104)(98,104) and (104,98)(104,98): P(X‾=101)=416=0.25P(\overline{X}=101)=\frac{4}{16}=0.25.

The population had four equally likely values; the mean has seven, and it concentrates in the centre.

c)

By symmetry about 101101: E(X‾)=101=μE(\overline{X})=101=\mu.

Deviations from 101101: ±9\pm 9 (probability 116\frac{1}{16} each), ±6\pm 6 (216\frac{2}{16}), ±3\pm 3 (316\frac{3}{16}), 00 (416\frac{4}{16}).

V(X‾)=2×81+4×36+6×9+4×016=36016=22.5\displaystyle V(\overline{X})=\dfrac{2\times 81+4\times 36+6\times 9+4\times 0}{16}=\dfrac{360}{16}=22.5

And σ22=452=22.5\dfrac{\sigma^{2}}{2}=\dfrac{45}{2}=22.5: the variance of the mean of two draws is exactly half that of the population.

This is the thread of the set: the standard deviation of one scallop is 6.716.71 mm, that of the mean of two scallops 22.5≈4.74\sqrt{22.5}\approx 4.74 mm.

d)

With replacement, X1,…,XnX_{1},\dots,X_{n} all have the distribution of the population, so E(Xi)=μE(X_{i})=\mu and V(Xi)=σ2V(X_{i})=\sigma^{2}, and they are independent.

Expected value, by linearity (true with no assumption at all): E(X‾)=1n(E(X1)+⋯+E(Xn))=nμn=μE(\overline{X})=\dfrac{1}{n}\big(E(X_{1})+\dots+E(X_{n})\big)=\dfrac{n\mu}{n}=\mu.

Variance: V(aY)=a2V(Y)V(aY)=a^{2}V(Y) gives V(X‾)=1n2V(X1+⋯+Xn)V(\overline{X})=\dfrac{1}{n^{2}}V(X_{1}+\dots+X_{n}).

Since the XiX_{i} are independent, the variance of their sum is the sum of the variances: V(X1+⋯+Xn)=nσ2V(X_{1}+\dots+X_{n})=n\sigma^{2}.

V(X‾)=nσ2n2=σ2nV(\overline{X})=\dfrac{n\sigma^{2}}{n^{2}}=\dfrac{\sigma^{2}}{n}, so σX‾=σn\sigma_{\overline{X}}=\dfrac{\sigma}{\sqrt{n}}.

Pitfall: invoking independence for the expected value. It is needed only for the variance; without it, covariances are added to the sum of the variances.

e)

Without replacement, the pairs {92,98}\{92,98\}, {92,104}\{92,104\}, {92,110}\{92,110\}, {98,104}\{98,104\}, {98,110}\{98,110\}, {104,110}\{104,110\} give X‾=95\overline{X}=95, 9898, 101101, 101101, 104104, 107107.

E(X‾)=101E(\overline{X})=101 again; deviations −6-6, −3-3, 00, 00, 33, 66.

V(X‾)=36+9+0+0+9+366=906=15V(\overline{X})=\dfrac{36+9+0+0+9+36}{6}=\dfrac{90}{6}=15 mm²

We recover 22.5×N−nN−1=22.5×23=1522.5\times\dfrac{N-n}{N-1}=22.5\times\dfrac{2}{3}=15: without replacement, the second draw cannot repeat the first, the draws are dependent and the mean varies less. This correction factor goes beyond the minimum of the official course description.

On a large population (usual rule: nn below 5%5\% of NN), removing one individual changes almost nothing, N−nN−1\frac{N-n}{N-1} is close to 11 and the formula with replacement remains a good approximation. That is what allows it to be used on a lake, a forest or a bird population.

f)

σX‾=σ8=458=5.625≈2.37\sigma_{\overline{X}}=\dfrac{\sigma}{\sqrt{8}}=\dfrac{\sqrt{45}}{\sqrt{8}}=\sqrt{5.625}\approx 2.37 mm

To divide σn\dfrac{\sigma}{\sqrt{n}} by 22, n\sqrt{n} must be multiplied by 22, so nn by 44: 3232 scallops instead of 88.

The precision of a mean is expensive: it improves like the square root of the effort.

8890929496981001021041061081101121140.050.10.150.20.250.31/162/163/164/163/162/161/16x̄ (mm)probability

Exercise 2: The central limit theorem and its conditions: from the mercury in one walleye to the mean of forty

9 answers to check

A (fictitious) monitoring program measured the mercury content in the flesh of 2,0002{,}000 walleyes from a large reservoir. These measurements are taken to describe the population of walleyes in the reservoir: mean content μ=0.42\mu=0.42 mg/kg, standard deviation σ=0.22\sigma=0.22 mg/kg. The histogram below (density per class of 0.10.1 mg/kg) shows a clearly right-skewed distribution. The reference value of 0.50.5 mg/kg used in the questions is set for the exercise.

0.10.20.30.40.50.60.70.80.911.11.20.40.81.21.622.4mercury content (mg/kg)2,000 walleyesdensity
  • a) A student models the content XX of one walleye by the normal distribution with mean 0.420.42 and standard deviation 0.220.22. In this model, compute P(X<0)P(X<0) to four decimal places, then say whether this model is suitable for a single fish.
  • b) 4040 walleyes are taken at random from the reservoir, which is populous enough for the sampling to be treated as drawing with replacement. Give the expected value and the standard deviation of the mean content X‾\overline{X} of the sample.
  • c) State the central limit theorem and justify that it applies here despite the skewness of the histogram.
  • d) Compute P(X‾>0.5)P(\overline{X}>0.5).
  • e) The 4040 walleyes were in fact caught in a single haul of the net, in the same shallow bay. Identify the condition of the theorem that is threatened and the likely effect on the calculation in d).
  • f) Compute the minimum number of walleyes to sample so that the standard deviation of X‾\overline{X} does not exceed 0.020.02 mg/kg.

Type your answers, the page tells you right or wrong 0/9

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) P(X<0)=P(Z<−1.91)≈0.0281P(X<0)=P(Z<-1.91)\approx 0.0281; no, a negative content is impossible and the distribution is skewed
  • b) E(X‾)=0.42E(\overline{X})=0.42 mg/kg and σX‾=0.2240≈0.0348\sigma_{\overline{X}}=\frac{0.22}{\sqrt{40}}\approx 0.0348 mg/kg
  • c) Independent, identically distributed draws and n=40≥30n=40\ge 30: X‾\overline{X} approximately follows the normal distribution N(0.42,0.03482)N\big(0.42, 0.0348^{2}\big)
  • d) z≈2.30z\approx 2.30 and P(X‾>0.5)≈0.0107P(\overline{X}>0.5)\approx 0.0107
  • e) Independence: fish from the same bay resemble each other; the probability in d) is probably too optimistic
  • f) n≥121n\ge 121, so n=121n=121
a)

In the normal model, z=0−0.420.22≈−1.91z=\dfrac{0-0.42}{0.22}\approx -1.91.

P(X<0)=P(Z<−1.91)=1−0.9719=0.0281\displaystyle P(X<0)=P(Z<-1.91)=1-0.9719=0.0281

Nearly 3%3\% of the fish would have a negative content, which is impossible. The histogram, very skewed with a long tail towards high contents, confirms it: the normal distribution does not describe the content of a single walleye.

Pitfall: believing that the central limit theorem makes the data “normal”. It is about the MEAN, never about the individuals.

b)

The sampling is treated as 4040 independent draws from the population (exercise 1, question d).

E(X‾)=μ=0.42E(\overline{X})=\mu=0.42 mg/kg

σX‾=σn=0.2240≈0.0348\sigma_{\overline{X}}=\dfrac{\sigma}{\sqrt{n}}=\dfrac{0.22}{\sqrt{40}}\approx 0.0348 mg/kg

These two results require no assumption about the shape of the distribution.

c)

Central limit theorem: if X1,…,XnX_{1},\dots,X_{n} are independent, identically distributed, with finite expected value μ\mu and standard deviation σ\sigma, then, for nn large enough, X‾\overline{X} approximately follows the normal distribution with mean μ\mu and standard deviation σn\dfrac{\sigma}{\sqrt{n}}.

“Large enough” translates in practice into n≥30n\ge 30; the more skewed the population, the more observations are needed for the approximation to be good.

Here the draws are treated as independent and n=40≥30n=40\ge 30: X‾\overline{X} approximately follows N(0.42,0.03482)N\big(0.42, 0.0348^{2}\big), even though XX is not normal.

d)

Standardize with the standard error, not with σ\sigma:

z=0.5−0.420.0348≈2.30\displaystyle z=\dfrac{0.5-0.42}{0.0348}\approx 2.30
P(X‾>0.5)≈1−0.9893=0.0107\displaystyle P(\overline{X}>0.5)\approx 1-0.9893=0.0107

A random sample of 4040 walleyes has only about a 1%1\% chance of having a mean above 0.50.5 mg/kg, whereas the figure shows that a good share of the walleyes taken one by one exceed this value.

Pitfall: dividing by σ=0.22\sigma=0.22, which gives z≈0.36z\approx 0.36 and a probability of 0.360.36: that is the probability that a single walleye exceeds the reference value in a normal model that does not even suit it.

e)

The condition threatened is independence. Walleyes caught together in the same bay ate the same prey in the same waters: their contents resemble each other, and the sample poorly represents the other parts of the reservoir.

The real variability of the mean of such a sample, around the mean of the reservoir, is then larger than σ40\dfrac{\sigma}{\sqrt{40}}, and the bay may even be more or less contaminated than the rest.

The calculation in d), which assumes 4040 independent pieces of information, is therefore probably too optimistic: it only holds under its conditions.

f)
0.22n≤0.02  ⟺  n≥11  ⟺  n≥121\displaystyle \dfrac{0.22}{\sqrt{n}}\le 0.02\iff\sqrt{n}\ge 11\iff n\ge 121

At least 121121 walleyes are needed, three times more than 4040, for a standard deviation not even half as large.

0.10.20.30.40.50.60.70.80.9124681012mean of 40 walleyesone walleyex̄ > 0.5density

Exercise 3: Confidence interval for a mean, large sample: ground-level ozone in summer

11 answers to check

An air quality station records each day the maximum ground-level ozone concentration, averaged over 88 hours, in parts per billion (ppb). To estimate the mean μ\mu of this maximum over the 920920 summer days of the last ten summers, a student draws 3636 days at random from this list. Her 3636 values give x‾=45.9\overline{x}=45.9 ppb and s=10.9s=10.9 ppb; their histogram is below.

Critical values: z0.05=1.645z_{0.05}=1.645, z0.025=1.96z_{0.025}=1.96, z0.005=2.576z_{0.005}=2.576.

2030405060702468101214ozone (ppb)number of days
  • a) Name the parameter being estimated and give its point estimate.
  • b) Compute the standard error sn\dfrac{s}{\sqrt{n}}.
  • c) Build the 95% confidence interval for μ\mu, bounds to the tenth.
  • d) Build the 90% and 99% intervals, bounds to the tenth. Compare the three widths and say what greater confidence costs.
  • e) The standard deviation σ\sigma of the population is unknown. Justify the use of zz rather than Student's t distribution.
  • f) A classmate suggests taking instead the 3636 consecutive days of a single summer, which are easier to extract. State what this way of proceeding compromises.

Type your answers, the page tells you right or wrong 0/11

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) The mean μ\mu of the ozone maxima of the 920920 summer days; point estimate x‾=45.9\overline{x}=45.9 ppb
  • b) 10.96≈1.82\frac{10.9}{6}\approx 1.82 ppb
  • c) 45.9±3.5645.9\pm 3.56, so [42.3,49.5][42.3, 49.5] ppb
  • d) 90%: [42.9,48.9][42.9, 48.9]; 99%: [41.2,50.6][41.2, 50.6]; widths 6.0<7.1<9.46.0<7.1<9.4 ppb: more confidence, less precision
  • e) n=36≥30n=36\ge 30: the central limit theorem makes X‾\overline{X} approximately normal and ss estimates σ\sigma well enough
  • f) Independence and representativeness: neighbouring days share the same air mass, and a single summer does not represent all ten
a)

The parameter is the mean μ\mu of the ozone maxima over the 920920 summer days, a fixed but unknown number.

Its point estimate is the sample mean: x‾=45.9\overline{x}=45.9 ppb.

The mean of the 3636 days drawn is not the parameter: it would change with another draw.

b)

sn=10.936=10.96≈1.82\dfrac{s}{\sqrt{n}}=\dfrac{10.9}{\sqrt{36}}=\dfrac{10.9}{6}\approx 1.82 ppb

A summer day typically deviates by 10.910.9 ppb from the mean; the mean of 3636 days, six times less.

c)

Margin: E=1.96×1.817≈3.56E=1.96\times 1.817\approx 3.56 ppb.

[45.9−3.56,45.9+3.56]≈[42.3,49.5][45.9-3.56, 45.9+3.56]\approx[42.3, 49.5] ppb

Write-up: “At the 95% confidence level, the mean of the ozone maxima of summer days lies between 42.342.3 and 49.549.5 ppb.”

d)

At 90%: E=1.645×1.817≈2.99E=1.645\times 1.817\approx 2.99, so [42.9,48.9][42.9, 48.9], width 6.06.0 ppb.

At 99%: E=2.576×1.817≈4.68E=2.576\times 1.817\approx 4.68, so [41.2,50.6][41.2, 50.6], width 9.49.4 ppb.

Widths: 6.0<7.1<9.46.0<7.1<9.4 ppb. With the same sample, greater confidence is obtained only by widening the interval: what is gained in safety is lost in precision.

To be both safer and more precise, more data are needed (exercise 6).

e)

With n=36≥30n=36\ge 30, two things come into play. The central limit theorem makes X‾\overline{X} approximately normal, whatever the shape of the histogram. And ss, computed on 3636 values, is a stable enough estimate of σ\sigma to be substituted for σ\sigma without changing the distribution.

Student's t distribution with 3535 degrees of freedom would in fact give t0.025≈2.03t_{0.025}\approx 2.03 instead of 1.961.96: the difference is small, and the n≥30n\ge 30 convention neglects it.

Pitfall: justifying zz by “the concentrations are normal”. Nothing says so, and the method does not need it here.

f)

Consecutive days are not independent: a heat and smog episode lasts several days, and the whole series shares the same weather.

A single summer does not represent all ten either: if it was hotter, the estimate is biased, and no margin formula corrects a bias.

Drawing at random from the 920920 days is precisely what gives the right to write “95%”.

4042444648505290%[42.9, 48.9]95%[42.3, 49.5]99%[41.2, 50.6]x̄ = 45.9

Exercise 4: Small sample, Student's t distribution: the sugar content of maple sap

12 answers to check

A maple producer measures with a refractometer the sugar content of the sap, in degrees Brix (°Brix, percentage of sugar by mass), on 1212 tapholes drawn at random in her sugar bush, on the same morning. Results: 2.12.1, 2.62.6, 1.81.8, 2.42.4, 2.92.9, 2.22.2, 1.91.9, 2.52.5, 2.32.3, 2.02.0, 2.52.5, 2.42.4. The figure places these twelve values on an axis.

You are given t0.025,11=2.201t_{0.025, 11}=2.201 and, for a Student variable TT with 1111 degrees of freedom, P(−1.96<T<1.96)≈0.924P(-1.96<T<1.96)\approx 0.924. Maple producers use an empirical rule, the rule of 86: about 86B\dfrac{86}{B} litres of sap at BB °Brix are needed to make one litre of syrup.

1.61.822.22.42.62.83°Brix
  • a) Compute the mean x‾\overline{x} and the standard deviation ss of the sample.
  • b) Justify the use of Student's t distribution and give its number of degrees of freedom. Name the condition to be assumed about the population, and say what the figure shows about it.
  • c) Build the 95% confidence interval for the mean content μ\mu of the sugar bush, bounds to the hundredth.
  • d) A classmate uses 1.961.96 instead of 2.2012.201. Compute his interval and give the real confidence level of his method.
  • e) From c), deduce a 95% interval for 86μ\dfrac{86}{\mu}, the volume of sap per litre of syrup, bounds to the tenth of a litre. Justify that the bounds may be transformed.

Type your answers, the page tells you right or wrong 0/12

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) x‾=2.30\overline{x}=2.30 °Brix and s=0.1≈0.316s=\sqrt{0.1}\approx 0.316 °Brix
  • b) σ\sigma unknown and n=12<30n=12<30: Student with 1111 degrees of freedom, population assumed normal; the figure shows no strong skewness and no outlier
  • c) 2.30±0.202.30\pm 0.20, so [2.10,2.50][2.10, 2.50] °Brix
  • d) [2.12,2.48][2.12, 2.48] °Brix; real level about 92.4%92.4\%, not 95%95\%
  • e) [862.50,862.10]≈[34.4,41.0]\left[\frac{86}{2.50}, \frac{86}{2.10}\right]\approx[34.4, 41.0] L of sap per litre of syrup
a)

x‾=27.612=2.30\overline{x}=\dfrac{27.6}{12}=2.30 °Brix.

Deviations from 2.302.30: −0.2-0.2, 0.30.3, −0.5-0.5, 0.10.1, 0.60.6, −0.1-0.1, −0.4-0.4, 0.20.2, 00, −0.3-0.3, 0.20.2, 0.10.1.

Sum of squares: 1.101.10, so s2=1.1011=0.1s^{2}=\dfrac{1.10}{11}=0.1 and s=0.1≈0.316s=\sqrt{0.1}\approx 0.316 °Brix.

Pitfall: dividing by 1212, which gives 0.3030.303 and underestimates the spread of the population.

b)

The standard deviation σ\sigma of the population is unknown and n=12<30n=12<30: ss varies a lot from one sample to another, and the ratio T=X‾−μS/nT=\dfrac{\overline{X}-\mu}{S/\sqrt{n}} does not follow a normal distribution.

If the population is NORMAL, TT follows Student's t distribution with n−1=11n-1=11 degrees of freedom, more spread out than the normal.

On the figure, the contents spread from 1.81.8 to 2.92.9 with no strong skewness and no isolated value: the normality assumption is plausible. Twelve points do not prove it; they only allow us not to reject it.

c)

Standard error: sn=0.31612≈0.0913\dfrac{s}{\sqrt{n}}=\dfrac{0.316}{\sqrt{12}}\approx 0.0913 °Brix.

Margin: E=2.201×0.0913≈0.201E=2.201\times 0.0913\approx 0.201 °Brix.

[2.30−0.201,2.30+0.201]≈[2.10,2.50][2.30-0.201, 2.30+0.201]\approx[2.10, 2.50] °Brix

At the 95% level, the mean sugar content of the sap in the sugar bush, that morning, lies between 2.102.10 and 2.502.50 °Brix.

d)

With 1.961.96: E=1.96×0.0913≈0.179E=1.96\times 0.0913\approx 0.179, so [2.12,2.48][2.12, 2.48].

This interval contains μ\mu exactly when ∣T∣<1.96|T|<1.96, which happens with probability 0.9240.924 with 1111 degrees of freedom.

His method is therefore reliable only 92.4%92.4\% of the time while it claims 95%95\%: the interval is too narrow because it ignores that ss itself is uncertain.

Pitfall: taking zz “because it is simpler”. On a small sample, that claims a precision one does not have.

e)

The function x↦86xx\mapsto\dfrac{86}{x} is strictly decreasing on (0,+∞)(0, +\infty). So 2.10≤μ≤2.502.10\le\mu\le 2.50 is equivalent to 862.50≤86μ≤862.10\dfrac{86}{2.50}\le\dfrac{86}{\mu}\le\dfrac{86}{2.10}: the two events are THE SAME, and have the same probability of covering the true value, 95%95\%.

862.501≈34.4\dfrac{86}{2.501}\approx 34.4 L and 862.099≈41.0\dfrac{86}{2.099}\approx 41.0 L

The interval [34.4,41.0][34.4, 41.0] is not centred on the point estimate 862.30≈37.4\dfrac{86}{2.30}\approx 37.4 L, because the transformation is not affine.

It concerns 86μ\dfrac{86}{\mu}, the requirement computed from the mean content, and not the mean of the 86x\dfrac{86}{x} of the tapholes, which is a different quantity.

1.7522.252.52.7533.253.50.010.020.030.040.050.060.070.080.090.11.962.201Student, 11 dfstandard normalarea 0.025 in each tail

Exercise 5: Confidence interval for a proportion: ash trees attacked by the emerald ash borer

10 answers to check

A city's tree inventory lists 8,0008{,}000 public ash trees. To estimate the proportion pp of ash trees attacked by the emerald ash borer, a team examines 250250 of them, drawn at random from the inventory: 8585 show signs of infestation (galleries under the bark, D-shaped exit holes, crown dieback). Let XX be the number of infested ash trees in the sample and P^=Xn\hat{P}=\dfrac{X}{n} the sample proportion.

  • a) Treating the sampling as drawing with replacement, give the distribution of XX, then prove that E(P^)=pE(\hat{P})=p and V(P^)=p(1−p)nV(\hat{P})=\dfrac{p(1-p)}{n}. Justify treating it this way.
  • b) Compute p^\hat{p}, check the conditions for an interval on a proportion and compute the standard error p^(1−p^)n\sqrt{\dfrac{\hat{p}(1-\hat{p})}{n}}.
  • c) Build the 95% confidence interval for pp, bounds to the thousandth.
  • d) Translate this interval into a number of infested ash trees in the city, to the nearest ten.
  • e) The city had announced “about one third of the ash trees infested”, a citizens' association “half”. Say whether each of these claims is compatible with the sample, at the 95% level.

Type your answers, the page tells you right or wrong 0/10

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) XX follows the binomial distribution B(250,p)B(250, p); E(P^)=npn=pE(\hat{P})=\frac{np}{n}=p, V(P^)=np(1−p)n2=p(1−p)nV(\hat{P})=\frac{np(1-p)}{n^{2}}=\frac{p(1-p)}{n}; nn is about 3%3\% of NN
  • b) p^=0.34\hat{p}=0.34; np^=85≥5n\hat{p}=85\ge 5, n(1−p^)=165≥5n(1-\hat{p})=165\ge 5; standard error ≈0.0300\approx 0.0300
  • c) 0.34±0.0590.34\pm 0.059, so [0.281,0.399][0.281, 0.399]
  • d) Between about 2,2502{,}250 and 3,1903{,}190 infested ash trees
  • e) One third: yes, 0.3330.333 is in the interval; half: no, 0.50.5 is excluded
a)

Each ash tree drawn is infested with probability pp, independently of the others (with replacement): XX counts the successes of 250250 Bernoulli trials, so XX follows the binomial distribution B(250,p)B(250, p), with E(X)=npE(X)=np and V(X)=np(1−p)V(X)=np(1-p).

E(P^)=E(Xn)=npn=p\displaystyle E(\hat{P})=E\left(\dfrac{X}{n}\right)=\dfrac{np}{n}=p
V(P^)=V(Xn)=1n2 np(1−p)=p(1−p)n\displaystyle V(\hat{P})=V\left(\dfrac{X}{n}\right)=\dfrac{1}{n^{2}}\,np(1-p)=\dfrac{p(1-p)}{n}

P^\hat{P} is in fact the mean of nn Bernoulli variables, with expected value pp and variance p(1−p)p(1-p): it is the result of exercise 1 applied to 00s and 11s.

The actual sampling is without replacement, but 2508,000≈3.1%\dfrac{250}{8{,}000}\approx 3.1\%, under the usual 5%5\% rule: removing one ash tree barely changes the proportion among the next ones.

b)
p^=85250=0.34\displaystyle \hat{p}=\dfrac{85}{250}=0.34

Conditions: random sample, n=250≥30n=250\ge 30, np^=85≥5n\hat{p}=85\ge 5 and n(1−p^)=165≥5n(1-\hat{p})=165\ge 5; the central limit theorem makes P^\hat{P} approximately normal.

Standard error: 0.34×0.66250≈0.0300\sqrt{\dfrac{0.34\times 0.66}{250}}\approx 0.0300

p^\hat{p} goes under the square root because pp is unknown: this is what distinguishes the interval from the calculation in exercise 0.1 k).

c)

Margin: E=1.96×0.0300≈0.0587E=1.96\times 0.0300\approx 0.0587.

[0.34−0.0587,0.34+0.0587]≈[0.281,0.399]\displaystyle [0.34-0.0587, 0.34+0.0587]\approx[0.281, 0.399]

At the 95% level, the proportion of infested public ash trees lies between 28.1%28.1\% and 39.9%39.9\%.

Pitfall: writing “±5.9%\pm 5.9\%” without specifying that these are percentage points, and not 5.9%5.9\% of 34%34\%.

d)

Multiply the bounds by N=8,000N=8{,}000:

0.2813×8,000≈2,2500.2813\times 8{,}000\approx 2{,}250 and 0.3987×8,000≈3,1900.3987\times 8{,}000\approx 3{,}190

Between about 2,2502{,}250 and 3,1903{,}190 public ash trees would be infested: it is this range, and not just 0.34×8,000=2,7200.34\times 8{,}000=2{,}720, that should be used to budget treatments and removals.

e)

13≈0.333\dfrac{1}{3}\approx 0.333 belongs to [0.281,0.399][0.281, 0.399]: the city's claim is compatible with the sample. Compatible does not mean proven: 0.300.30 or 0.380.38 are just as compatible.

0.50.5 is far above the bound 0.3990.399: “half” is not compatible with the sample at the 95% level. If the true proportion were 0.50.5, a sample of 250250 ash trees would very rarely give 34%34\%.

The next chapter turns this reasoning into a hypothesis test.

0.250.30.350.40.450.50.550.2810.3991/31/2

Part B: problems and reasoning (/50)

Exercise 6: Choosing a sample size for a target margin: a scallop bed

8 answers to check

A biologist is planning the sampling of a sea scallop bed. A pilot survey of 3030 scallops gives a standard deviation of shell height s=12.5s=12.5 mm, which will be taken as the value of σ\sigma. The figure plots the 95% margin of error of the estimate of the mean height, E=1.9612.5nE=1.96\dfrac{12.5}{\sqrt{n}}, as a function of the sample size nn.

501001502002503003504004505005506000.511.522.533.544.55n (scallops)margin (mm)
  • a) Show that the margin E=zσnE=z\dfrac{\sigma}{\sqrt{n}} is at most a target value E0E_{0} if and only if n≥(z σE0)2n\ge\left(\dfrac{z\,\sigma}{E_{0}}\right)^{2}.
  • b) Compute the minimum sample size for a margin of 22 mm at the 95% level.
  • c) Same question for a margin of 11 mm. By what factor has the size been multiplied?
  • d) Read on the figure, then compute, the margin obtained with n=100n=100. Describe what the curve shows beyond n=300n=300.
  • e) She also wants to estimate the proportion pp of scallops whose shell is bored by a parasitic worm, with a margin of 0.050.05 at the 95% level. Show that p(1−p)≤14p(1-p)\le\dfrac{1}{4}, then compute the size that works whatever pp, and the size that is enough if an earlier study puts pp around 0.20.2.
  • f) For the mean height, compute the size needed for a margin of 22 mm at the 99% level (z0.005=2.576z_{0.005}=2.576).

Type your answers, the page tells you right or wrong 0/8

b)
c)
d)
e)
f)
Show the solution

Answers

  • a) zσn≤E0  ⟺  n≥zσE0  ⟺  n≥(zσE0)2z\frac{\sigma}{\sqrt{n}}\le E_{0}\iff\sqrt{n}\ge\frac{z\sigma}{E_{0}}\iff n\ge\left(\frac{z\sigma}{E_{0}}\right)^{2}
  • b) n≥150.06n\ge 150.06, so n=151n=151
  • c) n≥600.25n\ge 600.25, so n=601n=601; about 44 times more
  • d) E=24.510=2.45E=\frac{24.5}{10}=2.45 mm; the curve flattens out, returns are diminishing
  • e) p(1−p)=14−(p−12)2≤14p(1-p)=\frac{1}{4}-\left(p-\frac{1}{2}\right)^{2}\le\frac{1}{4}; n=385n=385 whatever pp; n=246n=246 if p≈0.2p\approx 0.2
  • f) n≥259.21n\ge 259.21, so n=260n=260
a)

All the quantities are positive, and x↦x2x\mapsto x^{2} is increasing on [0,+∞)[0, +\infty):

zσn≤E0  ⟺  zσE0≤n  ⟺  n≥(zσE0)2\displaystyle z\dfrac{\sigma}{\sqrt{n}}\le E_{0}\iff\dfrac{z\sigma}{E_{0}}\le\sqrt{n}\iff n\ge\left(\dfrac{z\sigma}{E_{0}}\right)^{2}

Each step is an equivalence, so the condition is necessary and sufficient. The minimum size is the first integer greater than or equal to (zσE0)2\left(\frac{z\sigma}{E_{0}}\right)^{2}.

b)

(1.96×12.52)2=12.252=150.0625\left(\dfrac{1.96\times 12.5}{2}\right)^{2}=12.25^{2}=150.0625, so n=151n=151.

Pitfall: rounding to the nearest integer, 150150. The margin is then 24.5150≈2.0004\dfrac{24.5}{\sqrt{150}}\approx 2.0004 mm: the target is not met. Always round up.

c)

(1.96×12.51)2=24.52=600.25\left(\dfrac{1.96\times 12.5}{1}\right)^{2}=24.5^{2}=600.25, so n=601n=601.

600.25150.0625=4\dfrac{600.25}{150.0625}=4: dividing the margin by 22 multiplies the size by 44 (after rounding, 601151≈3.98\frac{601}{151}\approx 3.98).

This is the n\sqrt{n} law of exercise 1, seen from the budget side: precision is paid for squared.

d)

The figure gives a margin of about 2.52.5 mm at n=100n=100; the calculation: E=24.5100=2.45E=\dfrac{24.5}{\sqrt{100}}=2.45 mm.

Beyond n=300n=300, the curve is almost flat: going from 300300 to 600600 scallops gains only 24.5300−24.5600≈0.41\dfrac{24.5}{\sqrt{300}}-\dfrac{24.5}{\sqrt{600}}\approx 0.41 mm. Returns are diminishing, and it is often the cost of fieldwork that sets nn.

e)

p(1−p)=p−p2=14−(p−12)2≤14p(1-p)=p-p^{2}=\dfrac{1}{4}-\left(p-\dfrac{1}{2}\right)^{2}\le\dfrac{1}{4}, with equality for p=12p=\dfrac{1}{2}.

The worst case gives n≥1.962×0.250.052=384.16n\ge\dfrac{1.96^{2}\times 0.25}{0.05^{2}}=384.16, so n=385n=385: this size guarantees the margin whatever the true proportion.

With p≈0.2p\approx 0.2: n≥1.962×0.2×0.80.052≈245.86n\ge\dfrac{1.96^{2}\times 0.2\times 0.8}{0.05^{2}}\approx 245.86, so n=246n=246.

The prior information saves 139139 scallops, provided it is reliable: if pp is in fact close to 0.50.5, the margin obtained will exceed 0.050.05.

f)

(2.576×12.52)2=16.12=259.21\left(\dfrac{2.576\times 12.5}{2}\right)^{2}=16.1^{2}=259.21, so n=260n=260.

Going from 95% to 99% with the same margin costs 260−151=109260-151=109 more scallops.

Exercise 7: What “95%” means: twenty intervals on pollen grains

11 answers to check

To understand what a confidence level guarantees, a palynology laboratory runs a simulation. Its software holds a reference population of masses of ragweed pollen grains, with known mean μ=5.0\mu=5.0 ng (nanograms) and standard deviation 0.90.9 ng. It draws 2020 independent samples of 3636 grains and computes for each one the 95% interval x‾±1.96s36\overline{x}\pm 1.96\dfrac{s}{\sqrt{36}}.

The figure shows the 2020 intervals, numbered from top to bottom; the dot of each interval is the mean x‾\overline{x} of its sample, and the vertical line marks μ=5.0\mu=5.0 ng.

4.24.44.64.855.25.45.61234567891011121314151617181920μ = 5.0 ng
  • a) Count the intervals that contain μ\mu and give the numbers of those that miss it.
  • b) Give the proportion of intervals that would contain μ\mu if the simulation were repeated a very large number of times, and the mean number of intervals out of 2020 that contain it.
  • c) Justify that the number NN of intervals that contain μ\mu follows the binomial distribution B(20,0.95)B(20, 0.95). Compute P(N=20)P(N=20) and P(N≤18)P(N\le 18). Is the result of a) surprising?
  • d) Explain why the 2020 intervals have neither the same centre nor the same width.
  • e) In real life, there is only one sample. A researcher obtains interval no. 11, [4.65,5.14][4.65, 5.14] ng, without knowing μ\mu. Choose the correct sentence.
  • f) The laboratory reruns the simulation with 99% intervals. Give the mean number of intervals out of 2020 that would miss μ\mu, and the factor by which their width would be multiplied.

Type your answers, the page tells you right or wrong 0/11

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) 1818 intervals contain μ\mu; nos. 4 and 18 miss it
  • b) 95%95\% in the long run; 1919 intervals out of 2020 on average
  • c) 2020 independent trials with the same probability 0.950.95; P(N=20)≈0.3585P(N=20)\approx 0.3585; P(N≤18)≈0.2642P(N\le 18)\approx 0.2642: no, it is not surprising
  • d) x‾\overline{x} (the centre) and ss (the width) vary from one sample to another; μ\mu does not
  • e) The 95% describes the method: this particular interval contains μ\mu or it does not
  • f) 0.20.2 missed interval out of 2020 on average; width multiplied by 2.5761.96≈1.31\frac{2.576}{1.96}\approx 1.31
a)

Look for the intervals that do not cross the vertical line μ=5.0\mu=5.0: no. 4, entirely to the left ([4.21,4.86][4.21, 4.86]), and no. 18, which stops just before it ([4.36,4.96][4.36, 4.96]).

20−2=1820-2=18 intervals contain μ\mu.

b)

By construction, each 95% interval contains μ\mu with probability 0.950.95 BEFORE the draw. Over a very large number of repetitions, the proportion of intervals that contain μ\mu tends to 0.950.95 (law of large numbers).

Out of 2020, we expect 20×0.95=1920\times 0.95=19 on average.

c)

Each sample is a Bernoulli trial: “the interval contains μ\mu”, with probability 0.950.95. The 2020 samples are drawn independently, so NN follows B(20,0.95)B(20, 0.95).

P(N=20)=0.9520≈0.3585\displaystyle P(N=20)=0.95^{20}\approx 0.3585
P(N=19)=20×0.9519×0.05≈0.3774\displaystyle P(N=19)=20\times 0.95^{19}\times 0.05\approx 0.3774
P(N≤18)=1−0.3774−0.3585≈0.2642\displaystyle P(N\le 18)=1-0.3774-0.3585\approx 0.2642

About one simulation in four gives 1818 successes or fewer: observing 1818 is ordinary. The 95% level does not promise 1919 in every series of 2020.

d)

The centre of an interval is the mean x‾\overline{x} of its sample, which varies from one draw to another (it is the variable X‾\overline{X} of exercise 1). Its half-width, 1.96s61.96\dfrac{s}{6}, depends on the standard deviation ss of the sample, which also varies.

What does not move is μ\mu: the vertical line is the same for all 2020 intervals.

Pitfall: saying that “μ\mu falls in the interval”. It is the interval that lands, or not, on μ\mu.

e)

Once the sample is drawn, [4.65,5.14][4.65, 5.14] contains μ\mu or does not: nothing random is left. The 95% describes the METHOD, which succeeds in 95% of samples.

The sentence “a 95% chance that μ\mu is between 4.654.65 and 5.145.14” gives the parameter a probability that belongs to the method. The sentence about “95% of the grains” confuses the interval for the MEAN with the spread of the grains, six times larger (36=6\sqrt{36}=6).

f)

At 99%, each interval misses μ\mu with probability 0.010.01: we expect 20×0.01=0.220\times 0.01=0.2 missed out of 2020 on average.

The half-width goes from 1.96s61.96\frac{s}{6} to 2.576s62.576\frac{s}{6}: factor 2.5761.96≈1.31\dfrac{2.576}{1.96}\approx 1.31.

μ\mu is missed less often because each interval is wider: safety is paid for in precision, as in exercise 3.

4.24.44.64.855.25.45.61234567891011121314151617181920μ = 5.0 ng

Exercise 8: Five statements to correct

8 answers to check

Each of the following five statements was found in a test paper or in an internship report, and each one is false. For each, choose the correct wording and back it up with the calculation requested. Two marks per statement.

  • a) “On 3636 pollen grains, x‾=5.12\overline{x}=5.12 ng and s=0.84s=0.84 ng give the 95% interval [4.85,5.39][4.85, 5.39]: 95% of the grains of this species have a mass between 4.854.85 and 5.395.39 ng.” Compute the ratio of the standard deviation of the grains to the standard error.
  • b) “With 3636 days of ozone measurements, our margin is 44 ppb; with 7272 days, it will drop to 22 ppb.” Compute the number of days that really gives 22 ppb, the standard deviation staying the same.
  • c) “Since n=40≥30n=40\ge 30, the mercury contents of the 4040 walleyes follow a normal distribution.”
  • d) “A 99% interval is more precise than a 95% interval, since we have more confidence in it.”
  • e) “To estimate the proportion of banded geese with the same margin, ten times more birds must be observed in a population of 200,000200{,}000 than in a population of 20,00020{,}000.” Compute the 95% margin obtained with 400400 birds observed in the worst case p=0.5p=0.5, for each of the two populations.

Type your answers, the page tells you right or wrong 0/8

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) The interval estimates the MEAN; the grains are 36=6\sqrt{36}=6 times more spread out than the mean
  • b) Margin divided by 22: nn multiplied by 44, that is 144144 days
  • c) The central limit theorem is about X‾\overline{X}, not about the individual contents
  • d) 2.576>1.962.576>1.96: the 99% interval is wider, so less precise
  • e) 1.960.25400=0.0491.96\sqrt{\frac{0.25}{400}}=0.049 in both populations: the margin depends on nn, not on NN
a)

The interval brackets the MEAN mass μ\mu of the species, not the mass of one grain. Its half-width 1.96×0.846≈0.271.96\times\dfrac{0.84}{6}\approx 0.27 ng is built from the standard error s36=0.14\dfrac{s}{\sqrt{36}}=0.14 ng.

The ratio ss/36=36=6\dfrac{s}{s/\sqrt{36}}=\sqrt{36}=6: the grains are six times more spread out than the mean. A range containing most of the grains would be of the order of x‾±2s\overline{x}\pm 2s, about six times wider than the interval.

Pitfall: this is the confusion that runs through the whole chapter, the standard deviation of the individuals taken for that of the mean.

b)

The margin is 1.96sn1.96\dfrac{s}{\sqrt{n}}: it is inversely proportional to n\sqrt{n}, not to nn.

With 7272 days, it only becomes 42≈2.83\dfrac{4}{\sqrt{2}}\approx 2.83 ppb.

To divide it by 22, we need n\sqrt{n} times 22, so n=4×36=144n=4\times 36=144 days.

c)

The central limit theorem says that the MEAN X‾\overline{X} of 4040 independent observations approximately follows a normal distribution. The individual contents keep their skewed distribution, whether the sample has 4040 or 4,0004{,}000 fish.

Enlarging the sample makes its histogram more faithful to the population, not more normal (exercise 2, question a).

d)

With the same data, the margin is 2.576sn2.576\dfrac{s}{\sqrt{n}} at 99% against 1.96sn1.96\dfrac{s}{\sqrt{n}} at 95%: the 99% interval is 2.5761.96≈1.31\dfrac{2.576}{1.96}\approx 1.31 times wider.

It is SAFER (the method succeeds more often) but LESS PRECISE. Confidence and precision pull in opposite directions; only a larger nn improves both.

e)

With replacement, or without replacement when nn is a small fraction of NN, the standard error is p(1−p)n\sqrt{\dfrac{p(1-p)}{n}}: NN does not appear in it.

For n=400n=400 and p=0.5p=0.5: E=1.960.25400=1.96×0.025=0.049E=1.96\sqrt{\dfrac{0.25}{400}}=1.96\times 0.025=0.049, in BOTH populations (400400 birds are 2%2\% and 0.2%0.2\% of them).

A spoonful of well-stirred soup tells as much about a saucepan as about a stockpot: it is the mixing, the randomness of the draw, that counts, not the fraction taken.

Exercise 9: Complete study: mercury in the walleyes of a sport-fishing lake

10 answers to check

An environmental health team studies the walleye of a lake heavily used by sport anglers. It catches 4545 walleyes at random, in different parts of the lake and on different dates in the season, and measures the mercury content of their flesh. Summary: x‾=0.46\overline{x}=0.46 mg/kg, s=0.20s=0.20 mg/kg; 1717 walleyes exceed 0.50.5 mg/kg. The box plot summarizes the 4545 contents.

The reference value of 0.50.5 mg/kg is set for the exercise; it does not reproduce an official standard. The lake holds several thousand adult walleyes.

00.10.20.30.40.50.60.70.80.910.120.310.420.580.98mg/kg
  • a) Name the population studied and the two parameters the study seeks to estimate.
  • b) Check the conditions for a confidence interval on a mean with n≥30n\ge 30. The box plot shows some skewness: is that an obstacle?
  • c) Build the 95% confidence interval for the mean content μ\mu, bounds to the hundredth.
  • d) In view of c), can we claim that the mean content of the walleyes in the lake is below 0.50.5 mg/kg? Justify.
  • e) Build the 95% interval for the proportion pp of walleyes in the lake above 0.50.5 mg/kg, after checking the conditions. Bounds to the thousandth.
  • f) Write, in four to six lines, the conclusion of the study for the public health committee, naming its limitations.
  • g) Next year the team wants to estimate μ\mu to within ±0.03\pm 0.03 mg/kg at the 95% level. Compute the number of walleyes to catch, keeping s=0.20s=0.20 mg/kg.

Type your answers, the page tells you right or wrong 0/10

a)
b)
c)
d)
e)
g)
Show the solution

Answers

  • a) The adult walleyes of the lake; μ\mu, mean content, and pp, proportion above 0.50.5 mg/kg
  • b) Random, independent, 45≥3045\ge 30, 4545 small compared with the population: conditions met; the skewness prevents nothing, the central limit theorem is about X‾\overline{X}
  • c) 0.46±0.0580.46\pm 0.058, so [0.40,0.52][0.40, 0.52] mg/kg
  • d) No: 0.50.5 is in the interval
  • e) p^=1745≈0.378\hat{p}=\frac{17}{45}\approx 0.378; 17≥517\ge 5 and 28≥528\ge 5; [0.236,0.519][0.236, 0.519]
  • f) Mean between 0.400.40 and 0.520.52 mg/kg, between 24%24\% and 52%52\% of the walleyes above the reference value, at the 95% level; limitations: one species, one season, 4545 fish
  • g) n≥170.7n\ge 170.7, so n=171n=171
a)

The population is the set of adult walleyes in the lake, not the 4545 fish caught, which form the sample.

The two parameters, fixed and unknown: the mean content μ\mu and the proportion pp of walleyes above 0.50.5 mg/kg. Their point estimates are x‾=0.46\overline{x}=0.46 and p^=1745\hat{p}=\frac{17}{45}.

b)

Conditions: catches at random, spread out in space and time, which makes independence plausible; n=45≥30n=45\ge 30; 4545 walleyes out of several thousand, less than 5%5\%, so it can be treated as drawing with replacement.

The box shows right skewness: median 0.420.42 below the mean 0.460.46, long upper whisker up to 0.980.98. This is not an obstacle: with 4545 observations, the central limit theorem makes X‾\overline{X} approximately normal, and ss replaces σ\sigma.

Pitfall: refusing the interval because “the data are not normal”. Normality of the data is required only for a small sample (exercise 4).

c)

Standard error: 0.2045≈0.0298\dfrac{0.20}{\sqrt{45}}\approx 0.0298 mg/kg.

Margin: E=1.96×0.0298≈0.058E=1.96\times 0.0298\approx 0.058 mg/kg.

[0.46−0.058,0.46+0.058]≈[0.40,0.52][0.46-0.058, 0.46+0.058]\approx[0.40, 0.52] mg/kg

d)

No. The interval goes from 0.400.40 to 0.520.52 and contains 0.50.5: a mean content slightly above the reference value is as compatible with the data as a content below it.

That x‾=0.46\overline{x}=0.46 is below 0.50.5 is not enough: the gap of 0.040.04 is smaller than the margin.

Pitfall: drawing a conclusion from the point estimate alone, as if it were the true mean.

e)

p^=1745≈0.378\hat{p}=\dfrac{17}{45}\approx 0.378; conditions: n=45≥30n=45\ge 30, np^=17≥5n\hat{p}=17\ge 5, n(1−p^)=28≥5n(1-\hat{p})=28\ge 5.

Standard error: 0.378×0.62245≈0.0723\sqrt{\dfrac{0.378\times 0.622}{45}}\approx 0.0723; margin: 1.96×0.0723≈0.1421.96\times 0.0723\approx 0.142.

[0.378−0.142,0.378+0.142]≈[0.236,0.519]\displaystyle [0.378-0.142, 0.378+0.142]\approx[0.236, 0.519]

The interval is very wide: 4545 fish are enough for a mean, much less so for a proportion.

f)

Sample conclusion: “From 4545 walleyes caught at random in the lake, the mean mercury content is estimated at 0.460.46 mg/kg; at the 95% confidence level, the population mean lies between 0.400.40 and 0.520.52 mg/kg, and the proportion of walleyes above the reference value of 0.50.5 mg/kg between 24%24\% and 52%52\%. We therefore cannot claim that the mean content is below the reference value, and a large share of the fish exceed it. These results hold for the adult walleye of this lake during this season; a larger sample, and measurements by fish size, would sharpen the consumption advice.”

The grader looks for the two intervals, the confidence level, the target population and at least one limitation; “95% chance” and any claim of certain exceedance are penalized.

g)

n≥(1.96×0.200.03)2≈170.7n\ge\left(\dfrac{1.96\times 0.20}{0.03}\right)^{2}\approx 170.7, so n=171n=171 walleyes.

Dividing the current margin, 0.0580.058, by about 22 takes nearly 44 times as many fish.

Exercise 10: Problem: how many geese at the stopover site? A proportion that becomes a population size

10 answers to check

In spring, a team of biologists banded 600600 Canada geese at a migratory stopover site. In the fall, at the same site, it reads the bands of 320320 geese observed at random: 4848 are banded.

The population is assumed closed between the two dates (no births, deaths, departures or arrivals), bands are never lost and every bird, banded or not, is equally likely to be observed. Let NN be the size of the population and p=600Np=\dfrac{600}{N} the proportion of banded geese.

  • a) Compute the observed proportion p^\hat{p} and deduce the estimate N^=600p^\hat{N}=\dfrac{600}{\hat{p}} of the population size.
  • b) Check the conditions, then build the 95% confidence interval for pp, bounds to the thousandth.
  • c) Deduce a 95% confidence interval for NN, bounds to the nearest ten. Justify the transformation.
  • d) The interval obtained for NN is not centred on N^\hat{N}. Explain why.
  • e) Geese travel in families, and a family banded together in spring is often observed together in the fall. Identify the assumption of the method that is affected and its effect on the interval in b).
  • f) Compute the number of geese to observe next fall for a margin of 0.020.02 on pp, taking p≈0.15p\approx 0.15.

Type your answers, the page tells you right or wrong 0/10

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) p^=48320=0.15\hat{p}=\frac{48}{320}=0.15 and N^=6000.15=4,000\hat{N}=\frac{600}{0.15}=4{,}000 geese
  • b) 0.15±0.0390.15\pm 0.039, so [0.111,0.189][0.111, 0.189]
  • c) [6000.189,6000.111]≈[3,170,5,410]\left[\frac{600}{0.189}, \frac{600}{0.111}\right]\approx[3{,}170, 5{,}410] geese
  • d) p↦600pp\mapsto\frac{600}{p} is not affine: the bound 0.1110.111, close to 00, is stretched much more
  • e) Independence: families observed as a block; the interval in b) is too narrow
  • f) n≥1224.51n\ge 1224.51, so n=1,225n=1{,}225
a)
p^=48320=0.15\displaystyle \hat{p}=\dfrac{48}{320}=0.15

If p=600Np=\dfrac{600}{N}, then N=600pN=\dfrac{600}{p}, hence the estimate N^=6000.15=4,000\hat{N}=\dfrac{600}{0.15}=4{,}000 geese.

Idea of the capture-recapture method: the share of banded birds in the fall sample estimates their share in the whole population.

b)

Conditions: observation at random, n=320≥30n=320\ge 30, np^=48≥5n\hat{p}=48\ge 5 and n(1−p^)=272≥5n(1-\hat{p})=272\ge 5; 320320 birds out of a few thousand, the approximation with replacement is acceptable (at 8%8\% of the estimated population, it is even somewhat conservative).

Standard error: 0.15×0.85320≈0.0200\sqrt{\dfrac{0.15\times 0.85}{320}}\approx 0.0200; margin: 1.96×0.0200≈0.0391.96\times 0.0200\approx 0.039.

[0.15−0.039,0.15+0.039]≈[0.111,0.189]\displaystyle [0.15-0.039, 0.15+0.039]\approx[0.111, 0.189]
c)

The function p↦600pp\mapsto\dfrac{600}{p} is strictly decreasing on (0,1](0, 1]: 0.111≤p≤0.189  ⟺  6000.189≤N≤6000.1110.111\le p\le 0.189\iff\dfrac{600}{0.189}\le N\le\dfrac{600}{0.111}. It is the same event, hence the same confidence level, 95%.

With the unrounded bounds: 6000.1891≈3,173\dfrac{600}{0.1891}\approx 3{,}173 and 6000.1109≈5,411\dfrac{600}{0.1109}\approx 5{,}411.

At the 95% level, the stopover site holds between about 3,1703{,}170 and 5,4105{,}410 geese.

Pitfall: writing [600/0.111,600/0.189][600/0.111, 600/0.189] in that order, an interval whose left bound exceeds its right bound.

d)

The interval for pp is symmetric about 0.150.15, but 600p\dfrac{600}{p} is not an affine function.

It is convex: near 00, a small drop in pp makes NN shoot up. The bound 0.1110.111 gives 5,4115{,}411, that is 1,4111{,}411 above 4,0004{,}000, whereas the bound 0.1890.189 gives only 827827 below.

The figure in the solution shows these two unequal gaps.

e)

The assumption affected is the independence of the observations. If the birds are seen in families, 320320 geese are not 320320 independent pieces of information: a banded family seen together weighs like a single draw counted several times.

The observed proportion then varies more from one fall to the next than p(1−p)n\sqrt{\frac{p(1-p)}{n}} says: the interval in b) is too narrow and its 95% is overstated.

Remedy: count families as the units of observation, or space out the band readings.

f)

n≥1.962×0.15×0.850.022=1224.51n\ge\dfrac{1.96^{2}\times 0.15\times 0.85}{0.02^{2}}=1224.51, so n=1,225n=1{,}225 geese.

To divide the margin 0.0390.039 by about 22, nearly 44 times as many observations as this fall's 320320 are needed.

0.080.10.120.140.160.180.20.220.242000300040005000600070008000N = 600/ppN (geese)
Something missing from this set? A type of exercise your teacher gives, a problem you are stuck on, a mistake you spotted: tell me, I read every request.

Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space. Rather not create an account? Write to me directly.

What is it about?
I read every request myself, nobody else sees it. No need to write your name or your school.
When your request is dealt with, you hear about it by email and in your space.

By sending, you agree that I read your request to answer it. It is kept with your account, erased with it, and never published: privacy policy.

This chapter comes back in

The chapters that build on it, later in the year or in the years that follow.

© Ahmed Squalli Houssaini. Exercise set published at www.letuteurscientifique.ca/en/exercices/cegep-sn1-confidence-intervals. Free for personal and classroom use; republishing it elsewhere requires written permission (legal notice).

Looking for a probability and statistics tutor in Montreal?

Get in touch for a first session. Confidence intervals come down to three decisions, which case, which standard error, which concluding sentence, and they are what earns the marks on the final exam.

Site by Studio Squalli