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.They cover the sampling distribution of the mean X and of the proportion 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≥30, a mean with n<30 from a population assumed normal, a proportion with n≥30.
What the set covers, the traps it targets
They cover the sampling distribution of the mean X and of the proportion 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≥30, a mean with n<30 from a population assumed normal, a proportion with n≥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)=μ and V(X)=nσ2 (exercise 1) and the analogue for 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.96 instead of Student's t on twelve measurements (exercise 4), the sample size rounded down (exercise 6), “a 95% chance that μ is inside” (exercise 7), the interval for the mean taken as the range of the individuals and n 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.
•DISTRIBUTION OF X: for a sample of size n drawn with replacement (or without replacement, n small compared with N), E(X)=μ and σX=nσ, the STANDARD ERROR. Do not confuse it with σ, the spread of the individuals.
•DISTRIBUTION OF P^: E(P^)=p and σP^=np(1−p).
•CENTRAL LIMIT THEOREM: independent, identically distributed observations, n≥30 in practice: X approximately follows N(μ,nσ2), whatever the shape of the population. It does not make the data normal.
•MEAN, n≥30: x±zα/2ns, with z=1.645, 1.96, 2.576 for 90%, 95%, 99%.
•MEAN, n<30, population assumed normal: x±tα/2,n−1ns, Student's t distribution with n−1 degrees of freedom, more spread out than the normal.
•PROPORTION, n≥30, np^≥5 and n(1−p^)≥5: p^±zα/2np^(1−p^).
•SAMPLE SIZE: n≥(Ezσ)2 or n≥E2z2p(1−p), with p=0.5 when nothing is known, ROUNDED UP. Dividing the margin by 2 takes 4 times as many data.
•INTERPRETATION: μ is fixed; the method produces an interval that contains μ in 95% of samples. A computed interval contains μ 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.645 (90% level), z0.025=1.96 (95%) and z0.005=2.576 (99%). Student's t 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, n=81, sampling with replacement: compute the standard deviation σX of the sample mean.
b) x=64.2, s=9, n=36: build the 95% confidence interval for μ.
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.01 of a 98% interval.
f) x=15.4, s=1.8, n=9, population assumed normal, t0.025,8=2.306: build the 95% interval for μ.
g) 126 successes out of n=300: build the 95% interval for the proportion p.
h) A confidence interval for μ is [12.6,15.0]: give the point estimate and the margin of error.
i) σ=6: compute the minimum sample size for a margin of 1 at the 95% level.
j) Unknown proportion, with no prior information at all: compute the minimum sample size for a margin of 0.03 at the 95% level.
k) p=0.2, n=400: compute the standard deviation σP^ of the sample proportion.
Show the solution
Answers
a)σX=918=2
b)64.2±2.94, so [61.26,67.14]
c)64.2±2.47, so [61.73,66.67]
d)64.2±3.86, so [60.34,68.06]
e)z0.01≈2.33
f)15.4±1.38, so [14.02,16.78]
g)0.42±0.056, so [0.364,0.476]
h)x=13.8 and E=1.2
i)n≥138.3, so n=139
j)n≥1067.1, so n=1068
k)σ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 that people forget, and it is what separates the spread of one individual from the spread of a mean.
a)
σX=nσ=8118=918=2
b)
Standard error: ns=69=1.5.
Margin: E=1.96×1.5=2.94.
[64.2−2.94,64.2+2.94]=[61.26,67.14]
With n≥30, the unknown σ is replaced by s and we keep z.
c)
E=1.645×1.5=2.4675, so [61.73,66.67].
Less confidence, narrower interval.
d)
E=2.576×1.5=3.864, so [60.34,68.06].
More confidence, wider interval.
e)
A 98% level leaves 2% outside the interval, that is 1% in each tail.
So we look for z such that P(Z≤z)=0.99. The table gives 0.9901 for z=2.33: z0.01≈2.33 (finer value: 2.326).
Pitfall: looking for P(Z≤z)=0.98, which gives 2.05, the critical value of a 96% interval.
f)
Standard error: 91.8=0.6.
Margin: E=2.306×0.6=1.3836.
[15.4−1.3836,15.4+1.3836]≈[14.02,16.78]
Small sample and σ unknown: Student with n−1=8 degrees of freedom, under the assumption of a normal population.
g)
p^=300126=0.42; conditions: np^=126≥5 and n(1−p^)=174≥5.
Standard error: 3000.42×0.58≈0.02850.
Margin: E=1.96×0.02850≈0.0559, so [0.364,0.476].
h)
The interval is symmetric about the estimate: x=212.6+15.0=13.8 and E=215.0−12.6=1.2.
i)
1.96n6≤1⟺n≥(1.96×6)2=138.2976, so n=139.
Pitfall: rounding to 138 gives a margin of 1.0011, above the target.
j)
n≥0.0321.962×0.5×0.5≈1067.1, so n=1068.
p=0.5 makes p(1−p) as large as possible: the size obtained works whatever the true proportion.
k)
σP^=np(1−p)=4000.2×0.8=0.0004=0.02
Points are earned before the solution; after it, you can keep practising.
For you:
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 92, 98, 104 and 110. 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=2. Let X1 and X2 be the two heights measured and X=2X1+X2 their mean.
The figure gives the distribution of the height X of a scallop drawn at random from the tank.
a) Compute the mean μ and the variance σ2 of the population (population variance: divide by N=4).
b) The 16 ordered samples (X1,X2) are equally likely. Write out the distribution of X, then give the number of possible values of X and P(X=101).
c) Compute E(X) and V(X) from this distribution. Compare them with μ and with 2σ2.
d) Prove that, for a sample of size n drawn with replacement, E(X)=μ and V(X)=nσ2. Identify the step that requires the draws to be independent.
e) The two scallops are now drawn WITHOUT replacement: the 6 pairs of distinct scallops are equally likely. Compute V(X) and explain why this difference can be ignored when the population is large.
f) With replacement, compute the standard deviation of X for a sample of 8 scallops. By what factor must n be multiplied to divide it by 2?
Show the solution
Answers
a)μ=101 mm and σ2=45 mm²
b)X∈{92,95,98,101,104,107,110} with probabilities 161,162,163,164,163,162,161; 7 values; P(X=101)=164=0.25
c)E(X)=101=μ and V(X)=22.5=2σ2
d)Linearity of expectation, then additivity of variances, which requires independence: V(X)=n2nσ2=nσ2
e)V(X)=15 mm², that is 22.5×N−1N−n; this factor is almost 1 when n is small compared with N
f)σX=845≈2.37 mm; multiply n by 4
a)
μ=492+98+104+110=4404=101 mm.
Deviations from the mean: −9, −3, 3, 9.
σ2=481+9+9+81=4180=45 mm², so σ=45≈6.71 mm.
Divide by N and not by N−1: these are ALL the values of the population, not a sample.
b)
Each draw has 4 equally likely outcomes, so there are 4×4=16 ordered samples, each with probability 161.
The sum X1+X2 goes from 184 to 220 in steps of 6, so X takes 7 values: 92, 95, 98, 101, 104, 107, 110.
Count the samples: 1, 2, 3, 4, 3, 2, 1 out of 16. For example X=101 comes from (92,110), (110,92), (98,104) and (104,98): P(X=101)=164=0.25.
The population had four equally likely values; the mean has seven, and it concentrates in the centre.
Since the Xi are independent, the variance of their sum is the sum of the variances: V(X1+⋯+Xn)=nσ2.
V(X)=n2nσ2=nσ2, so σX=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,104}, {92,110}, {98,104}, {98,110}, {104,110} give X=95, 98, 101, 101, 104, 107.
E(X)=101 again; deviations −6, −3, 0, 0, 3, 6.
V(X)=636+9+0+0+9+36=690=15 mm²
We recover 22.5×N−1N−n=22.5×32=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: n below 5% of N), removing one individual changes almost nothing, N−1N−n is close to 1 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σ=845=5.625≈2.37 mm
To divide nσ by 2, n must be multiplied by 2, so n by 4: 32 scallops instead of 8.
The precision of a mean is expensive: it improves like the square root of the effort.
Points are earned before the solution; after it, you can keep practising.
For you:
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,000 walleyes from a large reservoir. These measurements are taken to describe the population of walleyes in the reservoir: mean content μ=0.42 mg/kg, standard deviation σ=0.22 mg/kg. The histogram below (density per class of 0.1 mg/kg) shows a clearly right-skewed distribution. The reference value of 0.5 mg/kg used in the questions is set for the exercise.
a) A student models the content X of one walleye by the normal distribution with mean 0.42 and standard deviation 0.22. In this model, compute P(X<0) to four decimal places, then say whether this model is suitable for a single fish.
b) 40 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 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).
e) The 40 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 does not exceed 0.02 mg/kg.
Show the solution
Answers
a)P(X<0)=P(Z<−1.91)≈0.0281; no, a negative content is impossible and the distribution is skewed
b)E(X)=0.42 mg/kg and σX=400.22≈0.0348 mg/kg
c)Independent, identically distributed draws and n=40≥30: X approximately follows the normal distribution N(0.42,0.03482)
d)z≈2.30 and P(X>0.5)≈0.0107
e)Independence: fish from the same bay resemble each other; the probability in d) is probably too optimistic
f)n≥121, so n=121
a)
In the normal model, z=0.220−0.42≈−1.91.
P(X<0)=P(Z<−1.91)=1−0.9719=0.0281
Nearly 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 40 independent draws from the population (exercise 1, question d).
E(X)=μ=0.42 mg/kg
σX=nσ=400.22≈0.0348 mg/kg
These two results require no assumption about the shape of the distribution.
c)
Central limit theorem: if X1,…,Xn are independent, identically distributed, with finite expected value μ and standard deviation σ, then, for n large enough, X approximately follows the normal distribution with mean μ and standard deviation nσ.
“Large enough” translates in practice into n≥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≥30: X approximately follows N(0.42,0.03482), even though X is not normal.
d)
Standardize with the standard error, not with σ:
z=0.03480.5−0.42≈2.30
P(X>0.5)≈1−0.9893=0.0107
A random sample of 40 walleyes has only about a 1% chance of having a mean above 0.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, which gives z≈0.36 and a probability of 0.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σ, and the bay may even be more or less contaminated than the rest.
The calculation in d), which assumes 40 independent pieces of information, is therefore probably too optimistic: it only holds under its conditions.
f)
n0.22≤0.02⟺n≥11⟺n≥121
At least 121 walleyes are needed, three times more than 40, for a standard deviation not even half as large.
Points are earned before the solution; after it, you can keep practising.
For you:
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 8 hours, in parts per billion (ppb). To estimate the mean μ of this maximum over the 920 summer days of the last ten summers, a student draws 36 days at random from this list. Her 36 values give x=45.9 ppb and s=10.9 ppb; their histogram is below.
a) Name the parameter being estimated and give its point estimate.
b) Compute the standard error ns.
c) Build the 95% confidence interval for μ, 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 σ of the population is unknown. Justify the use of z rather than Student's t distribution.
f) A classmate suggests taking instead the 36 consecutive days of a single summer, which are easier to extract. State what this way of proceeding compromises.
Show the solution
Answers
a)The mean μ of the ozone maxima of the 920 summer days; point estimate x=45.9 ppb
b)610.9≈1.82 ppb
c)45.9±3.56, so [42.3,49.5] ppb
d)90%: [42.9,48.9]; 99%: [41.2,50.6]; widths 6.0<7.1<9.4 ppb: more confidence, less precision
e)n=36≥30: the central limit theorem makes X approximately normal and s estimates σ 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 μ of the ozone maxima over the 920 summer days, a fixed but unknown number.
Its point estimate is the sample mean: x=45.9 ppb.
The mean of the 36 days drawn is not the parameter: it would change with another draw.
b)
ns=3610.9=610.9≈1.82 ppb
A summer day typically deviates by 10.9 ppb from the mean; the mean of 36 days, six times less.
c)
Margin: E=1.96×1.817≈3.56 ppb.
[45.9−3.56,45.9+3.56]≈[42.3,49.5] ppb
Write-up: “At the 95% confidence level, the mean of the ozone maxima of summer days lies between 42.3 and 49.5 ppb.”
d)
At 90%: E=1.645×1.817≈2.99, so [42.9,48.9], width 6.0 ppb.
At 99%: E=2.576×1.817≈4.68, so [41.2,50.6], width 9.4 ppb.
Widths: 6.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≥30, two things come into play. The central limit theorem makes X approximately normal, whatever the shape of the histogram. And s, computed on 36 values, is a stable enough estimate of σ to be substituted for σ without changing the distribution.
Student's t distribution with 35 degrees of freedom would in fact give t0.025≈2.03 instead of 1.96: the difference is small, and the n≥30 convention neglects it.
Pitfall: justifying z 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 920 days is precisely what gives the right to write “95%”.
Points are earned before the solution; after it, you can keep practising.
For you:
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 12 tapholes drawn at random in her sugar bush, on the same morning. Results: 2.1, 2.6, 1.8, 2.4, 2.9, 2.2, 1.9, 2.5, 2.3, 2.0, 2.5, 2.4. The figure places these twelve values on an axis.
You are given t0.025,11=2.201 and, for a Student variable T with 11 degrees of freedom, P(−1.96<T<1.96)≈0.924. Maple producers use an empirical rule, the rule of 86: about B86 litres of sap at B °Brix are needed to make one litre of syrup.
a) Compute the mean x and the standard deviation s 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 μ of the sugar bush, bounds to the hundredth.
d) A classmate uses 1.96 instead of 2.201. Compute his interval and give the real confidence level of his method.
e) From c), deduce a 95% interval for μ86, the volume of sap per litre of syrup, bounds to the tenth of a litre. Justify that the bounds may be transformed.
Show the solution
Answers
a)x=2.30 °Brix and s=0.1≈0.316 °Brix
b)σ unknown and n=12<30: Student with 11 degrees of freedom, population assumed normal; the figure shows no strong skewness and no outlier
c)2.30±0.20, so [2.10,2.50] °Brix
d)[2.12,2.48] °Brix; real level about 92.4%, not 95%
e)[2.5086,2.1086]≈[34.4,41.0] L of sap per litre of syrup
Sum of squares: 1.10, so s2=111.10=0.1 and s=0.1≈0.316 °Brix.
Pitfall: dividing by 12, which gives 0.303 and underestimates the spread of the population.
b)
The standard deviation σ of the population is unknown and n=12<30: s varies a lot from one sample to another, and the ratio T=S/nX−μ does not follow a normal distribution.
If the population is NORMAL, T follows Student's t distribution with n−1=11 degrees of freedom, more spread out than the normal.
On the figure, the contents spread from 1.8 to 2.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: ns=120.316≈0.0913 °Brix.
Margin: E=2.201×0.0913≈0.201 °Brix.
[2.30−0.201,2.30+0.201]≈[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.10 and 2.50 °Brix.
d)
With 1.96: E=1.96×0.0913≈0.179, so [2.12,2.48].
This interval contains μ exactly when ∣T∣<1.96, which happens with probability 0.924 with 11 degrees of freedom.
His method is therefore reliable only 92.4% of the time while it claims 95%: the interval is too narrow because it ignores that s itself is uncertain.
Pitfall: taking z “because it is simpler”. On a small sample, that claims a precision one does not have.
e)
The function x↦x86 is strictly decreasing on (0,+∞). So 2.10≤μ≤2.50 is equivalent to 2.5086≤μ86≤2.1086: the two events are THE SAME, and have the same probability of covering the true value, 95%.
2.50186≈34.4 L and 2.09986≈41.0 L
The interval [34.4,41.0] is not centred on the point estimate 2.3086≈37.4 L, because the transformation is not affine.
It concerns μ86, the requirement computed from the mean content, and not the mean of the x86 of the tapholes, which is a different quantity.
Points are earned before the solution; after it, you can keep practising.
For you:
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,000 public ash trees. To estimate the proportion p of ash trees attacked by the emerald ash borer, a team examines 250 of them, drawn at random from the inventory: 85 show signs of infestation (galleries under the bark, D-shaped exit holes, crown dieback). Let X be the number of infested ash trees in the sample and P^=nX the sample proportion.
a) Treating the sampling as drawing with replacement, give the distribution of X, then prove that E(P^)=p and V(P^)=np(1−p). Justify treating it this way.
b) Compute p^, check the conditions for an interval on a proportion and compute the standard error np^(1−p^).
c) Build the 95% confidence interval for p, 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.
Show the solution
Answers
a)X follows the binomial distribution B(250,p); E(P^)=nnp=p, V(P^)=n2np(1−p)=np(1−p); n is about 3% of N
b)p^=0.34; np^=85≥5, n(1−p^)=165≥5; standard error ≈0.0300
c)0.34±0.059, so [0.281,0.399]
d)Between about 2,250 and 3,190 infested ash trees
e)One third: yes, 0.333 is in the interval; half: no, 0.5 is excluded
a)
Each ash tree drawn is infested with probability p, independently of the others (with replacement): X counts the successes of 250 Bernoulli trials, so X follows the binomial distribution B(250,p), with E(X)=np and V(X)=np(1−p).
E(P^)=E(nX)=nnp=p
V(P^)=V(nX)=n21np(1−p)=np(1−p)
P^ is in fact the mean of n Bernoulli variables, with expected value p and variance p(1−p): it is the result of exercise 1 applied to 0s and 1s.
The actual sampling is without replacement, but 8,000250≈3.1%, under the usual 5% rule: removing one ash tree barely changes the proportion among the next ones.
b)
p^=25085=0.34
Conditions: random sample, n=250≥30, np^=85≥5 and n(1−p^)=165≥5; the central limit theorem makes P^ approximately normal.
Standard error: 2500.34×0.66≈0.0300
p^ goes under the square root because p is unknown: this is what distinguishes the interval from the calculation in exercise 0.1 k).
c)
Margin: E=1.96×0.0300≈0.0587.
[0.34−0.0587,0.34+0.0587]≈[0.281,0.399]
At the 95% level, the proportion of infested public ash trees lies between 28.1% and 39.9%.
Pitfall: writing “±5.9%” without specifying that these are percentage points, and not 5.9% of 34%.
d)
Multiply the bounds by N=8,000:
0.2813×8,000≈2,250 and 0.3987×8,000≈3,190
Between about 2,250 and 3,190 public ash trees would be infested: it is this range, and not just 0.34×8,000=2,720, that should be used to budget treatments and removals.
e)
31≈0.333 belongs to [0.281,0.399]: the city's claim is compatible with the sample. Compatible does not mean proven: 0.30 or 0.38 are just as compatible.
0.5 is far above the bound 0.399: “half” is not compatible with the sample at the 95% level. If the true proportion were 0.5, a sample of 250 ash trees would very rarely give 34%.
The next chapter turns this reasoning into a hypothesis test.
Points are earned before the solution; after it, you can keep practising.
For you:
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 30 scallops gives a standard deviation of shell height s=12.5 mm, which will be taken as the value of σ. The figure plots the 95% margin of error of the estimate of the mean height, E=1.96n12.5, as a function of the sample size n.
a) Show that the margin E=znσ is at most a target value E0 if and only if n≥(E0zσ)2.
b) Compute the minimum sample size for a margin of 2 mm at the 95% level.
c) Same question for a margin of 1 mm. By what factor has the size been multiplied?
d) Read on the figure, then compute, the margin obtained with n=100. Describe what the curve shows beyond n=300.
e) She also wants to estimate the proportion p of scallops whose shell is bored by a parasitic worm, with a margin of 0.05 at the 95% level. Show that p(1−p)≤41, then compute the size that works whatever p, and the size that is enough if an earlier study puts p around 0.2.
f) For the mean height, compute the size needed for a margin of 2 mm at the 99% level (z0.005=2.576).
Show the solution
Answers
a)znσ≤E0⟺n≥E0zσ⟺n≥(E0zσ)2
b)n≥150.06, so n=151
c)n≥600.25, so n=601; about 4 times more
d)E=1024.5=2.45 mm; the curve flattens out, returns are diminishing
e)p(1−p)=41−(p−21)2≤41; n=385 whatever p; n=246 if p≈0.2
f)n≥259.21, so n=260
a)
All the quantities are positive, and x↦x2 is increasing on [0,+∞):
znσ≤E0⟺E0zσ≤n⟺n≥(E0zσ)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 (E0zσ)2.
b)
(21.96×12.5)2=12.252=150.0625, so n=151.
Pitfall: rounding to the nearest integer, 150. The margin is then 15024.5≈2.0004 mm: the target is not met. Always round up.
c)
(11.96×12.5)2=24.52=600.25, so n=601.
150.0625600.25=4: dividing the margin by 2 multiplies the size by 4 (after rounding, 151601≈3.98).
This is the n law of exercise 1, seen from the budget side: precision is paid for squared.
d)
The figure gives a margin of about 2.5 mm at n=100; the calculation: E=10024.5=2.45 mm.
Beyond n=300, the curve is almost flat: going from 300 to 600 scallops gains only 30024.5−60024.5≈0.41 mm. Returns are diminishing, and it is often the cost of fieldwork that sets n.
e)
p(1−p)=p−p2=41−(p−21)2≤41, with equality for p=21.
The worst case gives n≥0.0521.962×0.25=384.16, so n=385: this size guarantees the margin whatever the true proportion.
With p≈0.2: n≥0.0521.962×0.2×0.8≈245.86, so n=246.
The prior information saves 139 scallops, provided it is reliable: if p is in fact close to 0.5, the margin obtained will exceed 0.05.
f)
(22.576×12.5)2=16.12=259.21, so n=260.
Going from 95% to 99% with the same margin costs 260−151=109 more scallops.
Points are earned before the solution; after it, you can keep practising.
For you:
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 ng (nanograms) and standard deviation 0.9 ng. It draws 20 independent samples of 36 grains and computes for each one the 95% interval x±1.9636s.
The figure shows the 20 intervals, numbered from top to bottom; the dot of each interval is the mean x of its sample, and the vertical line marks μ=5.0 ng.
a) Count the intervals that contain μ and give the numbers of those that miss it.
b) Give the proportion of intervals that would contain μ if the simulation were repeated a very large number of times, and the mean number of intervals out of 20 that contain it.
c) Justify that the number N of intervals that contain μ follows the binomial distribution B(20,0.95). Compute P(N=20) and P(N≤18). Is the result of a) surprising?
d) Explain why the 20 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] ng, without knowing μ. Choose the correct sentence.
f) The laboratory reruns the simulation with 99% intervals. Give the mean number of intervals out of 20 that would miss μ, and the factor by which their width would be multiplied.
Show the solution
Answers
a)18 intervals contain μ; nos. 4 and 18 miss it
b)95% in the long run; 19 intervals out of 20 on average
c)20 independent trials with the same probability 0.95; P(N=20)≈0.3585; P(N≤18)≈0.2642: no, it is not surprising
d)x (the centre) and s (the width) vary from one sample to another; μ does not
e)The 95% describes the method: this particular interval contains μ or it does not
f)0.2 missed interval out of 20 on average; width multiplied by 1.962.576≈1.31
a)
Look for the intervals that do not cross the vertical line μ=5.0: no. 4, entirely to the left ([4.21,4.86]), and no. 18, which stops just before it ([4.36,4.96]).
20−2=18 intervals contain μ.
b)
By construction, each 95% interval contains μ with probability 0.95 BEFORE the draw. Over a very large number of repetitions, the proportion of intervals that contain μ tends to 0.95 (law of large numbers).
Out of 20, we expect 20×0.95=19 on average.
c)
Each sample is a Bernoulli trial: “the interval contains μ”, with probability 0.95. The 20 samples are drawn independently, so N follows B(20,0.95).
P(N=20)=0.9520≈0.3585
P(N=19)=20×0.9519×0.05≈0.3774
P(N≤18)=1−0.3774−0.3585≈0.2642
About one simulation in four gives 18 successes or fewer: observing 18 is ordinary. The 95% level does not promise 19 in every series of 20.
d)
The centre of an interval is the mean x of its sample, which varies from one draw to another (it is the variable X of exercise 1). Its half-width, 1.966s, depends on the standard deviation s of the sample, which also varies.
What does not move is μ: the vertical line is the same for all 20 intervals.
Pitfall: saying that “μ falls in the interval”. It is the interval that lands, or not, on μ.
e)
Once the sample is drawn, [4.65,5.14] contains μ or does not: nothing random is left. The 95% describes the METHOD, which succeeds in 95% of samples.
The sentence “a 95% chance that μ is between 4.65 and 5.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).
f)
At 99%, each interval misses μ with probability 0.01: we expect 20×0.01=0.2 missed out of 20 on average.
The half-width goes from 1.966s to 2.5766s: factor 1.962.576≈1.31.
μ is missed less often because each interval is wider: safety is paid for in precision, as in exercise 3.
Points are earned before the solution; after it, you can keep practising.
For you:
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 36 pollen grains, x=5.12 ng and s=0.84 ng give the 95% interval [4.85,5.39]: 95% of the grains of this species have a mass between 4.85 and 5.39 ng.” Compute the ratio of the standard deviation of the grains to the standard error.
b) “With 36 days of ozone measurements, our margin is 4 ppb; with 72 days, it will drop to 2 ppb.” Compute the number of days that really gives 2 ppb, the standard deviation staying the same.
c) “Since n=40≥30, the mercury contents of the 40 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,000 than in a population of 20,000.” Compute the 95% margin obtained with 400 birds observed in the worst case p=0.5, for each of the two populations.
Show the solution
Answers
a)The interval estimates the MEAN; the grains are 36=6 times more spread out than the mean
b)Margin divided by 2: n multiplied by 4, that is 144 days
c)The central limit theorem is about X, not about the individual contents
d)2.576>1.96: the 99% interval is wider, so less precise
e)1.964000.25=0.049 in both populations: the margin depends on n, not on N
a)
The interval brackets the MEAN mass μ of the species, not the mass of one grain. Its half-width 1.96×60.84≈0.27 ng is built from the standard error 36s=0.14 ng.
The ratio s/36s=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, 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.96ns: it is inversely proportional to n, not to n.
With 72 days, it only becomes 24≈2.83 ppb.
To divide it by 2, we need n times 2, so n=4×36=144 days.
c)
The central limit theorem says that the MEAN X of 40 independent observations approximately follows a normal distribution. The individual contents keep their skewed distribution, whether the sample has 40 or 4,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.576ns at 99% against 1.96ns at 95%: the 99% interval is 1.962.576≈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 n improves both.
e)
With replacement, or without replacement when n is a small fraction of N, the standard error is np(1−p): N does not appear in it.
For n=400 and p=0.5: E=1.964000.25=1.96×0.025=0.049, in BOTH populations (400 birds are 2% and 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.
Points are earned before the solution; after it, you can keep practising.
For you:
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 45 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 mg/kg, s=0.20 mg/kg; 17 walleyes exceed 0.5 mg/kg. The box plot summarizes the 45 contents.
The reference value of 0.5 mg/kg is set for the exercise; it does not reproduce an official standard. The lake holds several thousand adult walleyes.
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≥30. The box plot shows some skewness: is that an obstacle?
c) Build the 95% confidence interval for the mean content μ, 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.5 mg/kg? Justify.
e) Build the 95% interval for the proportion p of walleyes in the lake above 0.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 μ to within ±0.03 mg/kg at the 95% level. Compute the number of walleyes to catch, keeping s=0.20 mg/kg.
Show the solution
Answers
a)The adult walleyes of the lake; μ, mean content, and p, proportion above 0.5 mg/kg
b)Random, independent, 45≥30, 45 small compared with the population: conditions met; the skewness prevents nothing, the central limit theorem is about X
c)0.46±0.058, so [0.40,0.52] mg/kg
d)No: 0.5 is in the interval
e)p^=4517≈0.378; 17≥5 and 28≥5; [0.236,0.519]
f)Mean between 0.40 and 0.52 mg/kg, between 24% and 52% of the walleyes above the reference value, at the 95% level; limitations: one species, one season, 45 fish
g)n≥170.7, so n=171
a)
The population is the set of adult walleyes in the lake, not the 45 fish caught, which form the sample.
The two parameters, fixed and unknown: the mean content μ and the proportion p of walleyes above 0.5 mg/kg. Their point estimates are x=0.46 and p^=4517.
b)
Conditions: catches at random, spread out in space and time, which makes independence plausible; n=45≥30; 45 walleyes out of several thousand, less than 5%, so it can be treated as drawing with replacement.
The box shows right skewness: median 0.42 below the mean 0.46, long upper whisker up to 0.98. This is not an obstacle: with 45 observations, the central limit theorem makes X approximately normal, and s replaces σ.
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: 450.20≈0.0298 mg/kg.
Margin: E=1.96×0.0298≈0.058 mg/kg.
[0.46−0.058,0.46+0.058]≈[0.40,0.52] mg/kg
d)
No. The interval goes from 0.40 to 0.52 and contains 0.5: a mean content slightly above the reference value is as compatible with the data as a content below it.
That x=0.46 is below 0.5 is not enough: the gap of 0.04 is smaller than the margin.
Pitfall: drawing a conclusion from the point estimate alone, as if it were the true mean.
Standard error: 450.378×0.622≈0.0723; margin: 1.96×0.0723≈0.142.
[0.378−0.142,0.378+0.142]≈[0.236,0.519]
The interval is very wide: 45 fish are enough for a mean, much less so for a proportion.
f)
Sample conclusion: “From 45 walleyes caught at random in the lake, the mean mercury content is estimated at 0.46 mg/kg; at the 95% confidence level, the population mean lies between 0.40 and 0.52 mg/kg, and the proportion of walleyes above the reference value of 0.5 mg/kg between 24% and 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≥(0.031.96×0.20)2≈170.7, so n=171 walleyes.
Dividing the current margin, 0.058, by about 2 takes nearly 4 times as many fish.
Points are earned before the solution; after it, you can keep practising.
For you:
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 600 Canada geese at a migratory stopover site. In the fall, at the same site, it reads the bands of 320 geese observed at random: 48 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 N be the size of the population and p=N600 the proportion of banded geese.
a) Compute the observed proportion p^ and deduce the estimate N^=p^600 of the population size.
b) Check the conditions, then build the 95% confidence interval for p, bounds to the thousandth.
c) Deduce a 95% confidence interval for N, bounds to the nearest ten. Justify the transformation.
d) The interval obtained for N is not centred on 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.02 on p, taking p≈0.15.
Show the solution
Answers
a)p^=32048=0.15 and N^=0.15600=4,000 geese
b)0.15±0.039, so [0.111,0.189]
c)[0.189600,0.111600]≈[3,170,5,410] geese
d)p↦p600 is not affine: the bound 0.111, close to 0, is stretched much more
e)Independence: families observed as a block; the interval in b) is too narrow
f)n≥1224.51, so n=1,225
a)
p^=32048=0.15
If p=N600, then N=p600, hence the estimate N^=0.15600=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≥30, np^=48≥5 and n(1−p^)=272≥5; 320 birds out of a few thousand, the approximation with replacement is acceptable (at 8% of the estimated population, it is even somewhat conservative).
Standard error: 3200.15×0.85≈0.0200; margin: 1.96×0.0200≈0.039.
[0.15−0.039,0.15+0.039]≈[0.111,0.189]
c)
The function p↦p600 is strictly decreasing on (0,1]: 0.111≤p≤0.189⟺0.189600≤N≤0.111600. It is the same event, hence the same confidence level, 95%.
With the unrounded bounds: 0.1891600≈3,173 and 0.1109600≈5,411.
At the 95% level, the stopover site holds between about 3,170 and 5,410 geese.
Pitfall: writing [600/0.111,600/0.189] in that order, an interval whose left bound exceeds its right bound.
d)
The interval for p is symmetric about 0.15, but p600 is not an affine function.
It is convex: near 0, a small drop in p makes N shoot up. The bound 0.111 gives 5,411, that is 1,411 above 4,000, whereas the bound 0.189 gives only 827 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, 320 geese are not 320 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 np(1−p) 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≥0.0221.962×0.15×0.85=1224.51, so n=1,225 geese.
To divide the margin 0.039 by about 2, nearly 4 times as many observations as this fall's 320 are needed.
Points are earned before the solution; after it, you can keep practising.
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.
This chapter comes back in
The chapters that build on it, later in the year or in the years that follow.
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.