Probability and Statistics 201-SN1-RE • CEGEP, Montreal
Corrected practice final exam: probability and statistics (201-SN1-RE)
A chapter set announces its topic; a final exam does not, and that is what you need to practise before the exam.This practice final covers the course 201-SN1-RE, Probability and Statistics, competency 0M01 of the revised Science program: descriptive statistics, probability (counting, conditional probability and Bayes' theorem, discrete and continuous random variables, binomial and normal distributions), inference (central limit theorem, confidence intervals and hypothesis tests) and the relationship between two variables (least-squares line, correlation, chi-square test of independence).
What the set covers, the traps it targets
This practice final covers the course 201-SN1-RE, Probability and Statistics, competency 0M01 of the revised Science program: descriptive statistics, probability (counting, conditional probability and Bayes' theorem, discrete and continuous random variables, binomial and normal distributions), inference (central limit theorem, confidence intervals and hypothesis tests) and the relationship between two variables (least-squares line, correlation, chi-square test of independence).
Eleven exercises, 100 marks, three hours, in the proportions of the course specification: descriptive statistics (exercise 1), probability, the largest part (exercises 2 to 6), inference (exercises 7 to 9), regression (exercise 10) and a synthesis problem on an environmental study, road salt and wood frogs (exercise 11). The six cases of the course are all there: interval and test on a mean with a large sample (exercises 11 and 7), with Student's t distribution (exercise 8), and on a proportion (exercise 9).
By the end, you can prove what the course proves (Bayes' theorem in exercise 3, E(aX+b) and V(aX+b) in exercise 4, the expected value of a density by an improper integral in exercise 5, V(X)=nσ2 in exercise 7), choose the right distribution and write a decision in context. Pitfalls covered: the standard deviation divided by n (exercise 1), counting twice when counting “at least one” (exercise 2), confusing P(L∣C) with P(C∣L), mutually exclusive with independent (exercise 3), adding a fixed cost to a standard deviation (exercise 4), forgetting the continuity correction (exercise 6), modelling one house with the normal distribution (exercise 7), comparing with 1.96 with 9 measurements or choosing H1 after the fact (exercise 8), putting p^ in the standard error of a test (exercise 9), extrapolating a line (exercise 10) and reading causation into a chi-square test (exercise 11).
The thread of the exam: deciding under uncertainty starts with naming the model. Every calculation rests on a stated assumption, independence, normality, drawing with or without replacement, sample size, and the conclusion is only as good as the assumption. Do the exam in one sitting, calculator in hand, before opening a single solution; each exercise names the course sets to review.
•DESCRIPTIVE: s2=n−1∑ni(ci−x)2 for a sample; median and percentiles by interpolation, Pk=L+nc100kn−F×a; z=sx−x; outlier outside [Q1−1.5IQR,Q3+1.5IQR].
•COUNTING: A(n,k)=(n−k)!n! if order matters, (kn)=k!(n−k)!n! otherwise; permutations of identical objects n1!n2!⋯n!; “at least one” through the complement.
•PROBABILITY: P(A∣B)=P(B)P(A∩B); total probability over a partition; Bayes P(Bj∣A)=∑iP(Bi)P(A∣Bi)P(Bj)P(A∣Bj). Independent: P(A∩B)=P(A)P(B); mutually exclusive: P(A∩B)=0.
•RANDOM VARIABLES: E(X)=∑xipi or ∫xf(x)dx; V(X)=E(X2)−E(X)2; E(aX+b)=aE(X)+b, V(aX+b)=a2V(X); a density is nonnegative with integral 1, F(x)=∫−∞xf(t)dt.
•DISTRIBUTIONS: binomial P(X=k)=(kn)pk(1−p)n−k, E=np, V=np(1−p); normal z=σx−μ, table of Φ with z to two decimals; approximation if np≥5 and n(1−p)≥5, with the continuity correction.
•INFERENCE: x±zns (n≥30); x±tα/2,n−1ns (n<30, normal population); p^±znp^(1−p^). Test: z or t=s/nx−μ0, z=p0(1−p0)/np^−p0; H1 chosen before the data.
•TWO VARIABLES: a=SxxSxy, b=y−ax, r=SxxSyySxy; chi-square ∑E(O−E)2, E=nrow×column≥5, (r−1)(c−1) degrees of freedom for r rows and c columns.
Part A: descriptive statistics (/8)
Exercise 1: The diameter of black spruces in a sample plot: grouped data and position
9 answers to check
During a forest inventory, a team marks out a 400 m² sample plot at random in a 300-hectare black spruce stand and measures the diameter at breast height (DBH, taken 1.3 m above the ground) of each of the 50 black spruces in the plot. The data, which are fictitious, are grouped into 4 cm classes in the histogram below; these 50 trees are treated as a sample of the black spruces of the stand.
Conventions: divisor n−1 for the standard deviation of a sample; median and percentiles by interpolation within their class, Pk=L+nc100kn−F×a, where L is the lower boundary of the class, F the cumulative frequency before it, nc its frequency and a its width.
a) Identify the population, the sample and the type of the variable studied.
b) Calculate the mean and the standard deviation of the DBH from the class midpoints.
c) Identify the modal class, then calculate the median by interpolation.
d) Compare the mean and the median, then describe the shape of the distribution using the histogram.
e) Calculate the 90th percentile P90 and interpret it.
f) One spruce in the plot measures 29.0 cm. Calculate its z-score, then say whether it is unusual according to the ∣z∣>2 benchmark.
Show the solution
Answers
a)Population: the black spruces of the stand; sample: the 50 trees; quantitative continuous variable
b)x=18.0 cm, s=5.24 cm
c)Modal class [16,20); median 17.6 cm
d)x> median: slight right skew
e)P90=25.6 cm
f)z=2.10: unusual according to the benchmark
a)
Population: the black spruces of the stand, the trees the inventory is about.
Sample: the 50 spruces of the plot.
Variable: the DBH, quantitative CONTINUOUS: it is a length, which can take any value in an interval; the tape that rounds to the millimetre does not change its nature.
Caveat: a plot is a cluster sample; neighbouring trees resemble each other more than trees drawn one by one across the whole stand, and the estimate is less precise than n=50 would suggest.
b)
Class midpoints: 10, 14, 18, 22, 26, 30.
∑nici=6×10+13×14+15×18+9×22+5×26+2×30=900
x=50900=18.0 cm
∑ni(ci−x)2=6×64+13×16+15×0+9×16+5×64+2×144=1344
s2=491344=27.43, so s=5.24 cm.
Pitfall: dividing by n=50 gives 5.18 cm, the standard deviation of a population; these 50 trees are a sample.
c)
The modal class is [16,20), the tallest bar of the histogram (15 trees).
Cumulative frequencies: 6, 19, 34. The observation of rank 2n=25 falls in [16,20), with F=19 and nc=15.
median=16+1525−19×4=17.6 cm
d)
x=18.0 cm is slightly above the median, 17.6 cm.
The histogram stretches further to the right: from the midpoint of the modal class (18 cm), there are 14 cm to the boundary 32 cm, against 10 cm to the boundary 8 cm, and the two large trees of [28,32) pull the mean up.
The distribution is slightly skewed to the right. The gap between mean and median, 0.4 cm, is small compared with s=5.24 cm: the skewness is weak.
e)
10090×50=45; the cumulative frequencies are 34 before [20,24) and 43 before [24,28): the 45th tree is in [24,28), with F=43 and nc=5.
P90=24+545−43×4=25.6 cm
About 90% of the spruces in the sample have a DBH below 25.6 cm.
f)
z=5.2429.0−18.0=2.10
∣z∣>2: the tree is unusual according to this benchmark, one of the largest in the plot.
Caveat: the ∣z∣>2 benchmark comes from bell-shaped distributions; here, by interpolation in [28,32), about 48.5 trees out of 50, that is 97%, have a DBH below 29.0 cm, which confirms an extreme position without making it a measurement error.
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 B: probability (/43)
Exercise 2: Camera traps: choosing the sites, counting the sequences
6 answers to check
To monitor the Canada lynx, a team of biologists has 5 motion-triggered cameras and has identified 12 candidate sites in its study area, numbered 1 to 12 on the map below. Four of them, sites 7, 8, 11 and 12, are in a wetland. At most one camera is installed per site.
a) The five cameras are identical. Calculate the number of ways to choose the sites that receive a camera, justifying the counting tool you use.
b) The cameras are now of five different models, and we record which model goes on which site. Calculate the number of possible installations.
c) With identical cameras, calculate the number of choices of five sites that include at least one wetland site.
d) Calculate the number of choices of five sites that include exactly two wetland sites.
e) Show, by classifying the choices according to their number of wetland sites, that k=0∑4(k4)(5−k8)=(512).
f) The five sites are drawn at random from the twelve, all choices being equally likely. Calculate the probability that exactly two sites are in a wetland.
g) One camera records six triggers in a night: three white-tailed deer, two red foxes and one lynx. Calculate the number of possible sequences of species, in the order of the triggers.
Show the solution
Answers
a)(512)=792 (combination)
b)A(12,5)=95,040
c)792−56=736
d)(24)(38)=336
e)56+280+336+112+8=792: partition by the number k of wetland sites
f)P=3314≈0.4242
g)3!2!1!6!=60
a)
We choose a SET of 5 sites out of 12: order does not matter (the cameras are identical) and there is no repetition (at most one camera per site). This is a combination.
(512)=5!7!12!=12012×11×10×9×8=792
b)
Model 1 has 12 possible sites, model 2 has 11, and so on: order now matters, this is a permutation (arrangement).
A(12,5)=12×11×10×9×8=95,040=5!×792
Each set of 5 sites gives 5!=120 ways to distribute the models.
c)
We use the complement: “no wetland site” means choosing the 5 sites among the 8 others.
(512)−(58)=792−56=736
Pitfall: counting “one wetland site, then 4 arbitrary sites”, 4×(411)=1320, counts several times the same choice when it has two or more wetland sites.
d)
Two sites among the 4 wetland sites AND three among the 8 others: multiplication principle.
(24)(38)=6×56=336
e)
Every choice of 5 sites contains exactly k wetland sites, for a single k between 0 and 4: the five cases form a partition of the (512) choices.
For a fixed k, we choose k wetland sites and 5−k others: (k4)(5−k8) choices (multiplication principle).
Addition principle: 56+280+336+112+8=792=(512).
f)
The 792 choices are equally likely, and 336 of them are favourable.
P=792336=3314≈0.4242
g)
A sequence is a permutation of 6 objects some of which are identical: 3 deer, 2 foxes, 1 lynx.
3!2!1!6!=12720=60
Pitfall:6!=720 would count as different two sequences that differ only by swapping two deer, which are indistinguishable on the list of species.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 3: Wild cat identification software: Bayes and conditional independence
8 answers to check
The photos of wild cats taken by the cameras of exercise 2 are sorted by software. On a cat photo taken at random, the animal is a bobcat, Lynx rufus (R), with probability 0.55, a Canada lynx (C) with probability 0.30 and a stray domestic cat (D) with probability 0.15. Let L be the event “the software displays the label Canada lynx”. The tree gives P(L∣R), P(L∣C) and P(L∣D), estimated on photos already identified by experts. Fictitious data.
a) Prove, from the definition of a conditional probability, that P(C∣L)=P(R)P(L∣R)+P(C)P(L∣C)+P(D)P(L∣D)P(C)P(L∣C).
b) Calculate P(L).
c) Calculate P(C∣L) and P(R∣L).
d) Are the events C and R mutually exclusive? Are they independent? Justify.
e) The same animal is photographed twice in a row. Assume that, the species being fixed, the two labels are independent. Calculate the probability that the animal is a Canada lynx given that both photos carry the label L.
f) Without knowing the species, are the events L1 “the first photo is labelled L” and L2 “the second photo is labelled L” independent? Justify with a calculation.
Show the solution
Answers
a)Definition, multiplication rule and total probability over the partition R, C, D
f)P(L1∩L2)≈0.2466=0.3172≈0.1005: not independent
a)
Definition: P(C∣L)=P(L)P(C∩L), and likewise P(C∩L)=P(C)P(L∣C) (multiplication rule).
R, C, D form a partition of the sample space: they are pairwise mutually exclusive and their union is certain. Hence L=(L∩R)∪(L∩C)∪(L∩D), a union of mutually exclusive events.
Law of total probability: P(L)=P(R)P(L∣R)+P(C)P(L∣C)+P(D)P(L∣D).
Substituting the numerator and the denominator gives the stated formula, which assumes P(L)>0.
b)
P(L)=0.55×0.08+0.30×0.90+0.15×0.02
P(L)=0.044+0.270+0.003=0.317
c)
P(C∣L)=0.3170.270≈0.8517 and P(R∣L)=0.3170.044≈0.1388
Nearly 14% of the photos labelled “Canada lynx” actually show a bobcat: the software rarely mislabels a bobcat (8%), but bobcats are almost twice as numerous.
Pitfall: confusing P(L∣C)=0.90 with P(C∣L)=0.85.
d)
Mutually exclusive: yes, an animal is not of both species at once, P(C∩R)=0.
Independent: no, because P(C)P(R)=0.30×0.55=0.165=0=P(C∩R).
Two mutually exclusive events with nonzero probabilities are always dependent: knowing that it is a bobcat RULES OUT the Canada lynx.
e)
For each species, the probability of two labels L is the square of P(L∣⋅) (independence given the species).
The second label raises the probability from 0.85 to 0.99: Bayes applied twice, the posterior distribution after the first photo serving as the prior for the second.
Caveat: two successive photos of the same animal share the angle, the light and the distance; their errors are probably linked, and 0.9855 is an optimistic bound, valid within the assumed model.
f)
P(L1∩L2)=0.24658 (part e) and P(L1)P(L2)=0.3172≈0.1005.
The two numbers differ: L1 and L2 are NOT independent.
A first label L makes a Canada lynx more likely, hence a second label L as well. Independence given the species does not imply independence outright.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 4: Testing swabs in pools: a random variable with two values
9 answers to check
To monitor avian influenza in wild ducks, a laboratory receives swabs taken from birds. To save tests, it groups them in pools of k=5: it mixes the five swabs and runs a single test on the mixture. If the mixture is negative, the five swabs are declared negative. If it is positive, each of the five swabs is then tested separately, for six tests in all.
Model adopted: each swab is positive with probability p=0.05, independently of the others, and the test of the mixture is positive if and only if at least one swab is. Let X be the number of tests run for one pool.
a) Give the probability distribution of X.
b) Calculate E(X), then the mean number of tests per swab, and compare with one test per swab.
c) Calculate V(X) using V(X)=E(X2)−E(X)2, then the standard deviation σ(X).
d) Prove that, for any discrete random variable X and any real numbers a and b, E(aX+b)=aE(X)+b and V(aX+b)=a2V(X).
e) Each test costs 30 dollars and preparing a pool costs 12 dollars. Express the cost C of a pool in terms of X, then calculate E(C) and σ(C).
f) The laboratory can choose the pool size k. Show that the mean number of tests per swab is g(k)=k1+1−0.95k, then find the integer k between 2 and 10 that minimizes it.
Show the solution
Answers
a)P(X=1)=0.955≈0.7738, P(X=6)≈0.2262
b)E(X)≈2.1311; 0.4262 test per swab
c)V(X)≈4.376, σ(X)≈2.092
d)Linearity of the sum and ∑pi=1; b cancels in the deviations
The constant b shifts all the values without spreading them: it disappears from the variance.
e)
C=30X+12, in dollars.
E(C)=30×2.1311+12≈75.93 dollars
σ(C)=∣30∣σ(X)≈30×2.0919≈62.76 dollars
Pitfall: adding 12 to the standard deviation; a fixed cost does not change the spread.
f)
For a pool of k swabs: X=1 with probability 0.95k, X=k+1 otherwise.
E(X)=0.95k+(k+1)(1−0.95k)=1+k(1−0.95k), and per swab g(k)=kE(X)=k1+1−0.95k.
Values: g(4)≈0.4355; g(5)≈0.4262; g(6)≈0.4316; g decreases from k=2 to 5, then increases up to 10.
The minimum is reached at k=5: small pools require many tests of mixtures, large pools are too often positive.
Caveat: the model assumes the swabs are independent and that mixing loses no sensitivity; birds from the same pond infect one another, and diluting a weakly positive swab can mask it.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 5: The area burned by lightning fires: a density on an infinite interval
9 answers to check
In an intensive protection zone, forest fires started by lightning are detected and put out quickly, so most of them stay small. A team models the area X burned by such a fire, in hectares, by a continuous random variable with density f(x)=(1+x)4k for x≥0 and f(x)=0 for x<0, where k is a constant. The figure shows f for the value of k established in a).
a) Show that k=3.
b) Find the cumulative distribution function F(x)=P(X≤x) for x≥0, then calculate P(X>1) and P(0.5≤X≤2).
c) Calculate the median of X.
d) Calculate the expected value E(X) using integration by parts.
e) Calculate E(X2), then the variance and the standard deviation of X. Compare the expected value and the median, and interpret.
f) A fire has already burned more than 1 hectare when a crew arrives. Calculate the probability that it exceeds 2 hectares.
g) During one season, 12 lightning fires break out in the zone, and their areas are assumed independent. Calculate the probability that at least 3 of them exceed 1 hectare.
Show the solution
Answers
a)∫0+∞(1+x)4kdx=3k=1, so k=3
b)F(x)=1−(1+x)−3; P(X>1)=0.125; P(0.5≤X≤2)≈0.2593
c)m=32−1≈0.260 ha
d)E(X)=0.5 ha
e)E(X2)=1, V(X)=0.75, σ≈0.866 ha; E(X)≈2m: strong right skew
f)278≈0.2963
g)Y∼B(12,0.125), P(Y≥3)≈0.1820
a)
A density is nonnegative with total integral 1: f≥0 requires k≥0, then
The bracket tends to 0 because (1+b)3b→0. E(X)=0.5 hectare.
e)
By parts again, u=x2 and v=−(1+x)31; the bracket tends to 0:
E(X2)=∫0+∞(1+x)32xdx, and with w=1+x: 2∫1+∞w3w−1dw=2[−w1+2w21]1+∞=2×21=1
V(X)=E(X2)−E(X)2=1−0.25=0.75 and σ(X)=0.75≈0.866 hectare.
E(X)=0.5 ha is almost twice the median 0.26 ha: the distribution is strongly skewed to the right. A few large fires weigh heavily in the mean, while the typical fire stays small.
Caveat: the density gives a nonzero probability to huge fires; in reality, the area is bounded by the zone, and the model only holds for the order of magnitude of the fires observed.
f)
P(X>2∣X>1)=P(X>1)P(X>2)=1/81/27=278≈0.2963
The event X>2 is contained in X>1, hence the intersection equals X>2.
Without the condition, P(X>2)≈0.0370: a fire that has already passed 1 ha is eight times more likely to pass 2 ha than a fire that is just starting.
g)
Each fire exceeds 1 ha with probability q=0.125 (part b), independently of the others: the number Y of such fires follows the binomial distribution B(12,0.125).
Caveat: fires from the same storm, in dry and windy weather, have linked areas; independence is an assumption of the model.
The cumulative distribution function F(x)=1−(1+x)−3: the median is read where F equals 0.5, near 0.26 ha.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 6: Tagged salmon smolts pass a dam: from the normal to the binomial distribution
8 answers to check
On a salmon river with a hydroelectric dam, biologists follow the downstream migration of smolts, the young Atlantic salmon heading for the sea. The length L of a smolt is modelled by a normal distribution with mean μ=14.6 cm and standard deviation σ=1.1 cm (fictitious values). An acoustic transmitter can only be implanted in a fish at least 13 cm long.
For the normal distribution, round z to two decimals and read the table of Φ(z)=P(Z≤z). This course's criterion for the normal approximation of a binomial: np≥5 and n(1−p)≥5.
a) Calculate the proportion of smolts that can receive a transmitter.
b) The biologists set aside the smallest 10% of smolts. Calculate the minimum length kept, given that the table gives Φ(−1.28)≈0.10.
c) Assume that each tagged smolt passes the dam alive with probability 0.93, independently of the others. 10 smolts are tagged, and N denotes the number of survivors. Justify the use of a binomial distribution for N, then calculate the probability that they all survive, and the probability that at least 9 survive.
d) 400 smolts are tagged and X denotes the number of survivors. Calculate E(X) and σ(X), then check the conditions for the normal approximation.
e) Calculate P(X≤360) using the normal approximation, with the continuity correction.
f) This year, 360 of the 400 tagged smolts passed the dam. Does this result cast doubt on the survival rate of 0.93? Justify.
Show the solution
Answers
a)z≈−1.45; P(L≥13)≈0.9265
b)ℓ≈13.19 cm
c)P(N=10)≈0.4840, P(N≥9)≈0.8483
d)E(X)=372, σ(X)≈5.10; np=372, n(1−p)=28
e)P(X≤360)≈Φ(−2.25)=0.0122
f)Yes: about 1.2% under the stated rate (exact: 1.55%), the rate becomes doubtful
a)
z=1.113−14.6≈−1.45
P(L≥13)=1−Φ(−1.45)=Φ(1.45)=0.9265
About 92.7% of smolts are at least 13 cm long.
b)
We look for ℓ such that P(L<ℓ)=0.10, that is z=−1.28.
ℓ=μ+zσ=14.6−1.28×1.1≈13.19 cm
Pitfall: taking z=+1.28, which gives the 90th percentile, 16.01 cm.
c)
N follows a binomial distribution B(10,0.93): n=10 fixed trials, two outcomes (survives or not), the same probability p=0.93, trials independent by assumption.
P(N=10)=0.9310≈0.4840
P(N≥9)=0.9310+10×0.07×0.939≈0.4840+0.3643=0.8483
Caveat: smolts migrate in groups; a predator waiting at the turbine outlet strikes several at once, and independence remains a modelling assumption.
d)
E(X)=np=400×0.93=372
σ(X)=np(1−p)=26.04≈5.10
np=372≥5 and n(1−p)=28≥5: the approximation by the normal distribution N(372,5.102) is accepted under the course's criterion.
e)
X is an integer: X≤360 corresponds to Y≤360.5 for the normal variable Y.
z=5.10360.5−372≈−2.25
P(X≤360)≈Φ(−2.25)=0.0122
Pitfall: without the correction, z=−2.35 and we find 0.0094, which leaves out half of the bar at 360.
f)
If the survival rate were 0.93, 360 survivors or fewer would be observed only about one year in 80.
The result is therefore hard to reconcile with 0.93: it casts doubt on this rate, without saying why (exceptional year, predation, turbine flow).
Note: the exact calculation with the binomial distribution gives P(X≤360)≈0.0155. With p close to 1, the distribution is somewhat skewed and the normal approximation underestimates this tail; the conclusion does not change.
This is already the reasoning of a hypothesis test, which exercises 7 to 9 make formal.
Points are earned before the solution; after it, you can keep practising.
For you:
Part C: inference (/26)
Exercise 7: Radon in basements: the central limit theorem and a test on a mean
10 answers to check
Radon, a radioactive gas produced by the uranium in soils and rocks, builds up in basements. A regional (fictitious) survey measured the annual mean radon concentration in 600 basements; the histogram below groups them into classes of 50 Bq/m³. Assume that, for all the houses of the region, the mean is μ=95 Bq/m³ and the standard deviation is σ=80 Bq/m³. In Canada, the guideline recommends taking action in a house above 200 Bq/m³.
Useful values: z0.05=1.645 and z0.01=2.326, which leave an area of 0.05 and 0.01 to their right; table of Φ with z rounded to two decimals.
a) Can the concentration X of one house be modelled by the normal distribution with mean 95 and standard deviation 80? Justify using the histogram and the calculation of P(X<0) in this model.
b) Let X1,…,Xn be the concentrations of n houses drawn at random with replacement, and X their mean. Prove that E(X)=μ and V(X)=nσ2.
c) 50 houses are drawn at random. State what the central limit theorem allows us to say about X, then calculate P(X>120).
d) A municipality built on granite bedrock wants to know whether the mean concentration of its houses exceeds the regional mean. On 40 houses drawn at random, it obtains x=118 Bq/m³ and s=86 Bq/m³. State the hypotheses, then calculate the test statistic.
e) Conclude at the 5% significance level, then at the 1% level, and calculate the P-value of the test.
f) The mayor announces: “The test proves that our houses exceed the guideline.” Choose the correct conclusion.
Show the solution
Answers
a)No: skewed distribution, and P(X<0)≈0.1170 would be absurd
b)Linearity of E; independence: V(∑Xi)=nσ2, hence nσ2
c)X approximately normal, σX≈11.31; P(X>120)≈0.0136
d)H0:μ=95, H1:μ>95; z≈1.69
e)Reject at 5%, do not reject at 1%; P-value ≈0.0455
f)The test compares the mean with 95; it says nothing about one house or about the 200 guideline
a)
No. The histogram is strongly skewed to the right: a mode near 0, a long tail up to 450 Bq/m³.
In the normal model: z=800−95≈−1.19 and P(X<0)=Φ(−1.19)=0.1170.
This model would give 11.7% of houses a NEGATIVE concentration, which is impossible: the normal distribution does not describe one house.
b)
Drawing with replacement: the Xi are independent and all have the distribution of the population, with expected value μ and variance σ2.
E(X)=n1(E(X1)+⋯+E(Xn))=n1×nμ=μ (linearity of expectation).
V(X)=n21(V(X1)+⋯+V(Xn))=n2nσ2=nσ2: V(aY)=a2V(Y), and the variance of a sum of INDEPENDENT variables is the sum of the variances.
c)
The 50 measurements are independent and identically distributed, and n=50≥30: by the central limit theorem, X approximately follows a normal distribution, even though X does not.
Its expected value is 95 and its standard deviation, the standard error, is 5080≈11.31 Bq/m³.
z=11.31120−95≈2.21 and P(X>120)=1−Φ(2.21)=1−0.9864=0.0136
Pitfall: dividing by σ=80 instead of the standard error would give z≈0.31; this is a question about the MEAN of 50 houses, not about one house.
d)
Parameter: μ, the mean concentration of the municipality's houses.
H0:μ=95 against H1:μ>95 (right-tailed: the study is looking for an excess).
n=40≥30: by the central limit theorem, we use the normal distribution, with s in place of σ.
z=s/nx−μ0=86/40118−95=13.6023≈1.69
e)
At the 5% level: z=1.69>1.645, we reject H0.
At the 1% level: z=1.69<2.326, we do not reject H0.
P-value: P(Z≥1.69)=1−Φ(1.69)=1−0.9545=0.0455, between 0.01 and 0.05, which explains the two decisions.
At the 5% level, the data allow us to conclude that the mean concentration of the municipality exceeds the regional mean; at the 1% level, they do not.
f)
The test is about the municipal MEAN and compares it with 95 Bq/m³, not with 200 Bq/m³.
It says nothing about the proportion of houses above 200 Bq/m³: with such a skewed distribution, a mean of 118 is consistent with a majority of houses below the guideline and a few far above it.
Only a measurement in each house tells whether it must take action.
Pitfall: declaring the test invalid because the concentrations are not normal; with n=40, the central limit theorem makes the statistic approximately normal.
The statistic under H0: z≈1.69 falls in the 5% rejection region, but not beyond 2.326, the 1% critical value.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 8: The calcium of a spring: Student's t interval and test
9 answers to check
A karst spring supplies a village's water system. An old hydrogeological report gave a mean calcium concentration of 48.0 mg/L. This year, a CEGEP laboratory takes 9 samples on dates drawn at random during the season and measures the calcium by titration. Results, in mg/L (fictitious data): 46.2, 48.1, 48.4, 45.8, 47.5, 45.7, 48.6, 47.3, 47.2.
Assume that the concentrations of the season follow a normal distribution. Values of Student's t distribution with 8 degrees of freedom: t0.025,8=2.306 and t0.05,8=1.860, which leave an area of 0.025 and 0.05 to their right.
a) Calculate the mean x and the standard deviation s of the sample.
b) Explain why Student's t distribution is used rather than the normal distribution, and give its number of degrees of freedom.
c) Construct the 95% confidence interval for the mean concentration μ of the season.
d) Test H0:μ=48.0 against H1:μ=48.0 at the 5% level: test statistic, critical value and written decision.
e) A student compares the statistic with 1.96. Would his decision be different? Explain his error.
f) After seeing the data, a technician proposes to test H1:μ<48.0 instead, which would lead to a rejection. Explain why this approach is refused.
g) Check that the decision in d) agrees with the interval in c), and say why.
Show the solution
Answers
a)x=47.20 mg/L, s≈1.091 mg/L
b)n<30 and σ unknown, population assumed normal: Student's t with 8 df
c)CI95%=[46.36,48.04] mg/L
d)t≈−2.20, ∣t∣<2.306: we do not reject H0
e)Yes, 1.96 would lead to a rejection: it is the value of the normal distribution, not of Student's t with 8 df
f)The direction of H1 is set before the data; chosen afterwards, the real risk doubles
g)48.0∈[46.36,48.04] and no rejection: a two-tailed test and the interval always agree
a)
∑xi=424.8, so x=9424.8=47.20 mg/L.
Deviations from the mean: −1.0, 0.9, 1.2, −1.4, 0.3, −1.5, 1.4, 0.1, 0, whose squares add up to 9.52.
s=89.52=1.19≈1.091 mg/L
b)
The sample is small (n=9<30) and the standard deviation of the population is unknown: it is estimated by s, which adds uncertainty.
If the population is normal, T=S/nX−μ follows Student's t distribution with n−1=8 degrees of freedom, which is more spread out than the normal distribution.
The plot of the 9 values shows neither strong skewness nor an isolated value: the normality assumption is plausible, without being proved by so few data.
c)
Standard error: 9s=31.091≈0.3636 mg/L.
Margin of error: 2.306×0.3636≈0.839 mg/L.
CI95%=[47.20−0.84,47.20+0.84]=[46.36,48.04] mg/L
d)
t=s/nx−μ0=0.363647.20−48.0≈−2.20
Two-tailed test at 5%: reject if ∣t∣>t0.025,8=2.306.
∣t∣=2.20<2.306: we do not reject H0.
At the 5% level, the data do not allow us to conclude that the mean calcium concentration has changed since the report. Nor do they prove that it stayed at 48.0 mg/L: with 9 measurements, a real difference of nearly 1 mg/L easily goes unnoticed.
e)
Yes: with 1.96, ∣t∣=2.20>1.96 would lead to rejecting H0.
Pitfall:1.96 is the critical value of the normal distribution; with 8 degrees of freedom, Student's t distribution has heavier tails, and the critical value rises to 2.306. Using 1.96 makes a Type I error more often than 5% of the time.
f)
The direction of H1 is set BEFORE seeing the data, from the question of the study, here “has the concentration changed?”, which is two-sided.
Choosing the side afterwards, the side where x falls, amounts to testing in both directions and keeping only the better one: the true Type I error risk of this approach is 2×5%=10%, not 5%.
The rejection obtained this way (t=−2.20<−1.860) therefore does not have the stated value.
g)
μ0=48.0 lies in [46.36,48.04], barely, and the test does not reject H0, barely too.
This is expected: ∣t∣≤2.306 is equivalent to ∣x−μ0∣≤2.306ns, that is, to μ0∈[x−2.306ns,x+2.306ns]. A two-tailed test at level α and the interval with confidence level 1−α always reach the same decision.
Under H0, T follows Student's t distribution with 8 df (purple), more spread out than the normal distribution (grey dashes). t≈−2.20 goes past −1.96 but not past −2.306: no rejection.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 9: Ticks and Lyme disease: interval and test on a proportion
9 answers to check
In a region where Lyme disease is spreading, a public health team collects blacklegged ticks by dragging a white cloth through the vegetation of sites drawn at random. It analyzes 300 adult ticks: 63 carry the bacterium that causes the disease, Borrelia burgdorferi. Last year, the same survey had estimated this proportion at 15%. Fictitious data.
Useful values: z0.025=1.96 and z0.01=2.326; table of Φ with z rounded to two decimals.
a) Calculate the proportion p^ of infected ticks in the sample, then the 95% confidence interval for the proportion p in the region.
b) Choose the correct interpretation of the 95% confidence level.
c) Test at the 1% level whether the proportion of infected ticks has increased since last year: hypotheses, conditions, test statistic and decision.
d) Calculate the P-value of the test and write the conclusion.
e) Next year, the team wants a margin of error of at most 3 percentage points at 95%. Calculate the required sample size, taking p^ as the prior estimate, then without any prior estimate.
Show the solution
Answers
a)p^=0.21; CI95%=[0.164,0.256]
b)95% of samples give an interval that contains p
c)H1:p>0.15; z≈2.91>2.326: reject H0
d)P-value ≈0.0018: the proportion has increased (1% level)
e)n=709; without an estimate, n=1068
a)
p^=30063=0.21
Conditions: n=300≥30, np^=63≥5 and n(1−p^)=237≥5.
Estimated standard error: 3000.21×0.79≈0.0235; margin of error: 1.96×0.0235≈0.046.
CI95%=[0.21−0.046,0.21+0.046]=[0.164,0.256]
b)
p is a fixed, unknown number; it is the interval that varies from one sample to another.
95% is the proportion of possible samples for which the METHOD produces an interval that contains p. The interval [0.164,0.256] itself either contains p or does not.
c)
H0:p=0.15 against H1:p>0.15 (right-tailed: the study is looking for an increase).
Conditions under H0: np0=45≥5 and n(1−p0)=255≥5.
The standard error is calculated UNDER H0, with p0: 3000.15×0.85≈0.02062.
z=0.020620.21−0.15≈2.91>2.326: we reject H0 at the 1% level.
Pitfall: putting p^ in the standard error gives z≈2.55; the decision is the same here, but the statistic is no longer that of the test.
Caveat: ticks collected at the same site are not quite independent; drawing many sites at random limits this cluster effect.
d)
P-value: P(Z≥2.91)=1−Φ(2.91)=1−0.9982=0.0018, well below 0.01.
At the 1% level, the data allow us to conclude that the proportion of ticks carrying Borrelia burgdorferi in the region has increased since last year.
The test does not say by how much: the interval in a) places the current proportion between about 16% and 26%.
e)
We want 1.96np(1−p)≤0.03, that is n≥0.0321.962p(1−p).
With p=0.21: n≥0.00093.8416×0.1659≈708.1, so n=709 ticks (rounded UP).
Without a prior estimate, take p=0.5, which makes p(1−p) as large as possible: n≥0.00093.8416×0.25≈1067.1, so n=1068.
Pitfall: rounding 708.1 to 708 would give a margin slightly above 3 points.
The 95% confidence interval does not contain p0=0.15, last year's proportion: consistent with the rejection in the test.
Points are earned before the solution; after it, you can keep practising.
For you:
Part D: relationship between two variables (/8)
Exercise 10: Dissolved oxygen and temperature: the least-squares line and its limits
10 answers to check
On seven dates in the same year, a team measures around noon, at the same point of a well-mixed river, the water temperature x (in °C) and the dissolved oxygen concentration y (in mg/L). Fictitious but plausible data:
Given: ∑xi=105, ∑yi=70.6, ∑xi2=1919, ∑yi2=727.22 and ∑xiyi=987.1. Notation: Sxx=∑xi2−n(∑xi)2, Sxy=∑xiyi−n∑xi∑yi, and Syy likewise.
a) Calculate Sxx and Sxy, then the slope a and the intercept b of the least-squares line y^=ax+b.
b) Prove that the least-squares line passes through the mean point (x,y) and that the sum of the residuals ei=yi−y^i is zero, given that b=y−ax.
c) Calculate the correlation coefficient r and the coefficient of determination r2, then interpret r2.
d) Estimate the dissolved oxygen concentration when the water is at 17 °C.
e) The residuals are, in order of temperature: 0.22, −0.05, −0.11, −0.19, −0.05, −0.02, 0.20. Describe their pattern and what it indicates.
f) A student predicts the dissolved oxygen during a heat wave when the water reaches 32 °C. Calculate the prediction, then criticize it.
g) Choose the correct statement about causation.
Show the solution
Answers
a)Sxx=344, Sxy=−71.9; a≈−0.2090, b≈13.22
b)ax+b=y and ∑ei=n(y−ax−b)=0
c)r≈−0.9954, r2≈0.991: 99% of the variation explained
d)y^(17)≈9.67 mg/L (interpolation)
e)Arc: positive at the ends, negative in the middle; slight curvature
f)y^(32)≈6.53 mg/L: extrapolation, probably an underestimate
g)Association only, no proof of causation; the physical mechanism supports it
a)
Sxx=1919−71052=1919−1575=344
Sxy=987.1−7105×70.6=987.1−1059=−71.9
a=SxxSxy=344−71.9≈−0.2090 mg/L per °C
x=15, y=770.6≈10.086, so b=y−ax≈10.086+0.2090×15≈13.22 mg/L
y^=13.22−0.209x: each additional degree goes with, on average, 0.21 mg/L less oxygen.
b)
At x=x: y^=ax+b=ax+y−ax=y, so the line passes through (x,y).
∑ei=∑(yi−axi−b)=ny−anx−nb=n(y−ax−b)=0
The points above and below the line balance out exactly.
c)
Syy=727.22−770.62≈15.169
r=SxxSyySxy=344×15.169−71.9≈−0.9954 and r2≈0.991
Very strong negative linear relationship: about 99% of the variation in dissolved oxygen between these seven dates is explained by the line in terms of temperature.
d)
17 °C is within the observed range (4 to 25 °C): this is an interpolation.
y^=13.22−0.2090×17≈9.67 mg/L
e)
The residuals are positive at both ends and negative in the middle: they form an arc, not a shapeless cloud.
The relationship is slightly CURVED (convex): the line is a good summary within the range, despite r2=0.99, but it is not the exact form of the relationship.
An r close to −1 does not guarantee that a line is the right model: the residuals must be examined.
f)
y^=13.22−0.2090×32≈6.53 mg/L
This is an EXTRAPOLATION: 32 °C lies outside the observed range, where nothing guarantees that the relationship stays the same.
The positive residuals at the ends show that the data curve back above the line: extended, the line probably underestimates the dissolved oxygen at 32 °C, in this model of well-mixed water.
Pitfall: a prediction outside the range of the observed x values does not have the reliability that r2 suggests.
g)
Regression measures an association; on its own, it does not prove that temperature causes the drop.
Here, a known physical mechanism, the solubility of a gas, which decreases as the water warms, supports a causal link; yet other factors vary with the season (photosynthesis, decomposition, flow) and also contribute.
The least-squares line passes through the mean point (green). The residuals, too small to read at this scale, are given in e); extending the line beyond 25 °C (red) is not guaranteed.
Points are earned before the solution; after it, you can keep practising.
For you:
Part E: synthesis problem (/15)
Exercise 11: Synthesis problem: road salt and wood frogs
15 answers to check
The salt spread on roads in winter runs off into nearby wetlands. To measure its effect, an ecology team draws at random 40 ponds among those of a region located less than 200 m from a road. Fictitious data.
Document 1. Chloride concentration measured in spring in the 40 ponds, in mg/L: minimum 18, Q1=46, median 78, Q3=152, maximum 610; the two highest values are 340 and 610; mean x=112 and standard deviation s=96. Fourteen ponds exceed 120 mg/L, the benchmark for prolonged exposure used by the study. The box plot below summarizes these data.
Document 2. In the same spring, the team records in each pond the presence or absence of wood frog egg masses, by chloride class: low (under 50 mg/L), medium (from 50 to 120 mg/L), high (over 120 mg/L).
Useful values: z0.025=1.96; chi-square distribution with 2 degrees of freedom, χ0.05,22=5.991 and χ0.01,22=9.210, values that leave an area of 0.05 and 0.01 to their right.
Document 2
Low
Medium
High
Total
Egg masses present
10
8
3
21
Egg masses absent
2
6
11
19
Total
12
14
14
40
a) Using document 1, calculate the interquartile range and the fences beyond which a concentration is called an outlier, then say how many ponds are outliers.
b) Describe the shape of the distribution, then say which measure, the mean or the median, best describes a typical pond.
c) Construct the 95% confidence interval for the mean chloride concentration μ of the ponds of the region, justifying the method despite the skewness.
d) A technician returns to 3 of the 40 ponds, drawn at random without replacement. Calculate the probability that at least one of them exceeds 120 mg/L.
e) For document 2, calculate the expected counts under the hypothesis of independence between the presence of egg masses and the chloride class, then check the condition for applying the chi-square test.
f) Carry out the chi-square test of independence: hypotheses, degrees of freedom, statistic and decision at the 5% and 1% significance levels.
g) Choose the conclusion the study allows you to write, and justify it using the proportions of egg masses by class.
Show the solution
Answers
a)IQR=106 mg/L; fences −113 and 311; 2 outlying ponds (340 and 610)
b)Strongly skewed to the right (x=112>78, the median): the median
c)CI95%≈[82.25,141.75] mg/L
d)1−98802600≈0.7368
e)6.3, 7.35, 7.35 / 5.7, 6.65, 6.65: all ≥5
f)2 df; χ2≈10.12>9.210: independence rejected at 5% and at 1%
Fences: Q1−1.5IQR=46−159=−113 and Q3+1.5IQR=152+159=311 mg/L.
No concentration is below −113; above 311, there are 340 and 610: 2 outlying ponds.
Outlier does not mean wrong: these two ponds may lie at the foot of a salt depot or a steep slope; we keep them, and we check them.
b)
The median (78) is much closer to Q1 (32 mg/L away) than to Q3 (74 mg/L away), the right whisker stretches out to 610, and x=112>78, the median: the distribution is strongly skewed to the right.
The median better describes a typical pond: the mean is pulled up by a few very salty ponds.
c)
n=40≥30 and the ponds are drawn at random: by the central limit theorem, X is approximately normal despite the skewness of the concentrations; with a large n, σ is replaced by s.
Standard error: 4096≈15.18 mg/L; margin of error: 1.96×15.18≈29.75 mg/L.
CI95%=[112−29.75,112+29.75]≈[82.25,141.75] mg/L
Caveat: with such a stretched distribution, n=40 is just enough; the two outliers weigh heavily on x and on s.
d)
Complement: none of the 3 ponds exceeds 120 mg/L, that is, 3 ponds chosen among the 26 others.
P=1−(340)(326)=1−98802600≈1−0.2632=0.7368
Pitfall: a binomial 1−(4026)3≈0.7254 would assume drawing WITH replacement; without replacement among 40 ponds, we count.
10.12>5.991 and 10.12>9.210: we reject H0 at both levels.
The largest contributions come from the extreme classes: too many egg masses in low-salt water, too few in very salty water, compared with independence.
g)
Proportions of ponds with egg masses: 1210≈83% in the low class, 148≈57% in the medium class, 143≈21% in the high class.
Conclusion: at the 1% level, the data show a relationship between the salinity of the ponds and the presence of wood frog egg masses; egg masses are rarer in the saltiest ponds.
The study is an OBSERVATIONAL study: it does not prove that salt CAUSES the absence of egg masses. The very salty ponds are probably also closer to busier roads (noise, road mortality, sediments); only a controlled experiment, or accounting for these factors, would settle it.
It holds for the ponds near roads in this region, the population the 40 ponds come from.
Chi-square distribution with 2 degrees of freedom. Below, the right tail enlarged: χ2≈10.12 exceeds 5.991 (5%) and 9.21 (1%).
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.
Looking for a probability and statistics tutor in Montreal?
Get in touch for a first session. We prepare the final exam on complete papers, working first on what earns the most marks: naming the model, choosing the right distribution and writing the conclusion in context.