JC2 · H2 Mathematics · Notes
Work with sampling distributions, CLT probabilities, unbiased estimates, coded and frequency data, combined samples and required sample sizes.
Sampling and Hypothesis Testing summary and formula sheet: every method on 4 pages
Mr Ian Ang’s summary of the whole sampling and hypothesis testing chapter on four pages.
Page 1 of 4 Notation, unbiased estimates and the CLT Part 1: sampling
H2 Math summary notes
Sampling and Hypothesis Testing formulas and methods, section by section
Page 1 of 4Notation, unbiased estimates and the CLTPart 1: sampling
Notation and unbiased estimates: the mean, s squared, and the 1-Var Stats on the GC
- The population has mean and variance . The unbiased estimates are of and of , where , and (sample variance).
- With , and : and .
- With , sample mean and sample standard deviation : .
- Warning: write the whole phrase "Unbiased estimate of population variance, ".
- GC, data in a table (L1 , L2 frequency): STAT, CALC, 1: 1-Var Stats. Read and ; is .
- For hypothesis testing, use , not .
Combining two samples: add the sums and the sizes first
- Sample 1: , , . Sample 2: , , . Combine them.
- New mean .
- New .
- Warning: add the sums and the sizes first; never average the two .
The CLT: sum and mean, with sigma squared given or estimated by s squared
- is not normal, with mean and variance , and is large (). Then and approximately. If is given, use it; if not given, use .
- Mean mass g, standard deviation g, sample of . Find and . As is large, and .
- and .
- With , find the least so that . Here . Enter and use the GC table: at and at .
- So the least .
CLT with a binomial variable: one box is binomial, the mean of 60 boxes is approximately normal
- is the number of faulty items in a box. For 60 boxes, find .
- and .
- is large, so and .
- Warning: the CLT is for the mean of 60 boxes; one box is binomial, not normal.
Page 2 of 4Setting up and carrying out a testPart 2: hypothesis tests
Setting up the hypotheses: H0 is always an equality, and the claim decides H1
| the claim | ||
|---|---|---|
| at least 40 (overstated) | ||
| at most 40 (understated) | ||
| is 40 (or has changed) |
- is always an equality: (the population mean and the claimed value).
- "At least" and "at most" keep the equality in .
- or gives a one tail test; gives a two tail test.
- "Increased" and "faster" mean you want .
The five steps and the GC Z-Test, with a one tail test at 5%
- The mean time is claimed to be at most minutes. , and . Test at whether it is more. Let be the time (min) and the population mean.
- Unbiased estimate of population mean: . Unbiased estimate of population variance: .
- Step 1: and . Step 2: at level of significance. Step 3: is large, so by the CLT, under , and .
- Step 4: using GC, -value . Step 5: -value , so we reject and conclude there is sufficient evidence, at significance level, that the mean time exceeds minutes. If the -value : do not reject ; insufficient evidence (same sentence).
- Z-Test on the GC: STAT, TESTS, 1: Z-Test. Inpt: Stats, : , : , : , : , : , Calculate. For , key the root of the variance only, with no .
A two tail test, sigma known: H1 is not equal, and the GC Z-Test gives the two tail p-value
- The mean is claimed to be , , and . Is the mean different? Test at .
- , , level. Under , .
- Using GC, -value . Since , do not reject .
- Insufficient evidence, at significance level, that the mean is not .
- The GC Z-Test with gives the two tail -value.
One tail and two tail: the p-value is doubled or halved, and the total area stays 5%
- With the same , , and : one tail to two tail, the -value is doubled; two tail to one tail, the -value is halved. For the significance level, the total area stays .
- , , , . Test , then , at . For : -value , reject .
- For : -value , so do not reject .
- A test of is significant at . Is it significant at ? Is significant at ? At : necessarily true, since -value .
- : not necessarily, because doubles to , but doubles to .
Page 3 of 4Rejection regions, unknowns and the words
Rejecting H0: p-value and z-value, for a left tail, right tail and two tail test
- Reject if -value significance level. The -value and the significance level are both areas.
- Critical at : invNorm. Two tail: invNorm.
- (left tail): -value , reject if . (right tail): -value , reject if .
- (two tail): -value , reject if .
- . Reject when is in the critical region.
Critical region of x bar: use invNorm, not z, and answer as a range of x bar
| key in | critical region | |
|---|---|---|
| , LEFT: | ||
| , RIGHT: | ||
| , CENTRE: and | or |
- , , , level. Find the critical region. Under , .
- "Critical region" is a range of : use invNorm, not . Key in invNorm(area, , , Tail).
- For key in , LEFT: , so . For key in , RIGHT: , so .
- For key in , CENTRE: and , so or .
- Reject when is inside the region. Answer as a range of .
Finding an unknown: k, n and the level, from the rejection condition
- , , , , . is rejected at . Find . Reject: , so , giving .
- , , , . is not rejected at . Find the greatest . Not rejected: , so and .
- So and the greatest . is an integer: keep the inequality.
- The smallest level of significance at which is rejected is the -value.
- For the -value in section 6, .
What the words mean: p-value, significance level, unbiased estimate, random sample and assumptions
- -value: the probability that the sample mean time is more than or equal to minutes when the population mean time is minutes; or, the smallest level of significance at which is rejected.
- Significance level : with probability we wrongly conclude (the mean time exceeds ) when in fact is true (the mean is ).
- Unbiased estimate: , the mean of the estimator equals the population parameter.
- Random sample: items selected independently, each with an equal chance of being selected.
- Assumptions: large means none about , and you write "since is large, the sample mean can be approximated by a normal distribution using the CLT". small: assume is normal.
Page 4 of 4Pictures: the normal curves for the tests
The five step test, drawn: the shaded tail is the p-value
- The test has and , with sample mean .
- Under , . The curve is centred at and is marked on the axis to the right.
- The shaded area to the right of is the p-value, .
- : is in the right tail, so reject .
Critical region, one tail: invNorm gives the boundary of the 5% right tail
- The alternative is and , at the level.
- The shaded right tail has area and starts at .
- .
- The critical region is .
Critical region, two tail: the 5% is split 2.5% in each tail
- The alternative is , so the is split each side.
- Each shaded tail has area , with ends at and on either side of .
- gives both ends.
- The critical region is or .
Two tail test, drawn: both tails shaded and the p-value doubled
- The test has and , with .
- The curve is centred at , with on the left and its mirror on the right. Each shaded tail has area .
- Both tails are shaded: the p-value is .
- : do not reject .
One tail p-value doubled: add the mirror tail for a two tail test
- The test has , with , and .
- The curve is centred at . The orange tail below has area and the blue mirror tail above has area .
- One tail: orange, , reject.
- Two tail: add blue, .
Worked examples
Sampling and Hypothesis Testing worked examples
Mr Ian’s worked examples for the chapter, with the full working.
Is the question about one observation, a total or a mean?
A sample mean is random before the sample is drawn. The observed mean is a number calculated from the data. For independent observations with common mean and variance , a total has variance ; a mean has variance . The population variance itself does not decrease when more data are collected.
The normal population case is exact
Four independent packet masses
A packet mass X has distribution g. Four packets are chosen independently. Find the probability their mean mass exceeds 105 g, and express the same event in terms of their total T.
Equivalently means . Standardising T gives , the same result. Normality is exact for any sample size here because the individual masses are normal.
Use the CLT when individual observations are not normal
Average heads over fifty games
In one game, the number of fair coins tossed is 1, 2 or 3 with probabilities . Let X count heads. Its distribution is . Independent games are played. Estimate the probability that the average over 50 games exceeds one head.
Compute the population moments from the game model, not from a sample estimate:
The sample is large enough for a CLT approximation in this bounded, independent game model:
This distribution is approximate. Standardise using its standard deviation:
The theorem approximates the distribution of the mean; it does not change X into a normal variable. Independence, a common underlying distribution and finite variance matter. A fixed rule such as “n is at least 20” is not a universal guarantee.
The same method applies to money
A mean net gain in repeated games
A game gives net gain Y of $10, $0 or −$2 with probabilities . Estimate the probability that the total net gain from 50 independent games is at most $50.
A total of at most $50 is a mean of at most $1. By the CLT, approximately,
The high probability of staying below $50 does not make the game attractive: its expected net gain is negative. State the money conclusion using the mean net gain, rather than just a chance of reaching a selected threshold.
Unbiased estimates from coded data
Data are given as deviations from fifty
A random sample of 40 lengths x cm has and . Find unbiased estimates of the population mean and variance.
Set . Add 50 back to the mean; a translation leaves variance unchanged:
Do not treat as : the chosen centre 50 differs from the sample mean 52. The correction removes this difference.
An estimator is unbiased when its expectation over repeated random samples equals the population parameter. It need not equal that parameter in a particular sample.
A frequency is a count of observations
Use all ten observations, not five row labels
A sample of lengths has values 8, 9, 10, 11 and 12 cm, with frequencies 1, 2, 4, 2 and 1 respectively. Find the unbiased estimates of the mean and variance.
| Length (cm) | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|
| Frequency | 1 | 2 | 4 | 2 | 1 |
The data are centred conveniently at their mean:
A calculator standard deviation with denominator n gives . For the unbiased variance estimate, square the standard deviation calculated with denominator n − 1, or multiply the denominator-n variance by . Check the calculator’s convention rather than relying on the label alone.
Combine raw totals, not sample variances
Two groups with different means
One sample has ; another has . Here both are unbiased variance estimates. Find the mean and unbiased variance estimate of the combined sample.
Recover each sum of squares by rearranging the variance formula:
Now combine the sufficient raw totals:
A weighted average of 4 and 9 misses variation between the group means. The combined sample is more spread out because its two groups have different centres.
Choose n for a required precision
Within two seconds with probability at least 0.95
Independent filling times have distribution seconds. Find the least n such that the sample mean is within two seconds of 50 with probability at least 0.95.
The central 95% of a standard normal lies between . Therefore,
Thus the least n is 139. At n = 138 the probability is about 0.9498; at n = 139 it is about 0.9506. This is a central-area requirement: using the one-sided 0.95 quantile 1.645 would choose too small a sample.
How n changes the same two-second requirement
n = 144: standard error 1.000 s; |Z| < 2.000; probability 0.9545.
The graph uses a fixed Z scale. As n grows, the same ±2-second band reaches farther in standard-error units.
Variation: a one-sided requirement
For the same filling times, require . Use the one-sided cutoff :
The chosen side and area decide the quantile. Both examples are exact because the individual filling times are normal.
Before you finish
Keep , , and the variance of the mean separate. For coded data undo the shift in the mean; for frequency data count observations; for combined samples combine sums and sums of squares. For an approximation, say why it is appropriate and name the sampling distribution being approximated.