Loading subject…
If the $p$-value is less than the significance level, reject $H_0$; otherwise there is insufficient evidence to reject $H_0$.
| Feature | z-test | t-test |
|---|---|---|
| Population deviation | Known | Unknown, estimated by s |
| Reference distribution | Normal | t with n minus 1 df |
| Standard error used | sigma over root n | s over root n |
| Decides the choice | sigma known or not | sigma known or not |
| Sample size role | None for the choice | None for the choice |
A machine is calibrated to fill jars to a mean of $750\text{ g}$ with a known population standard deviation of $8\text{ g}$. A sample of $30$ jars has mean $746\text{ g}$. Test at the $5\%$ level whether the mean fill has changed.
Solution
A bottling line should dispense a mean of $500\text{ ml}$. A sample of $12$ bottles has mean $498.5\text{ ml}$ and unbiased standard deviation $s_{n-1} = 3.2\text{ ml}$. Test at the $5\%$ level whether the mean differs from $500\text{ ml}$.
Solution
Many tests compare two group means rather than one mean against a fixed value, and the design of the data decides which test to run.
| Feature | Unpaired t-test | Paired t-test |
|---|---|---|
| Data structure | Two independent groups | Two measurements per subject |
| What is tested | Difference of two means | Mean of the differences |
| Null hypothesis | mu1 equals mu2 | mu_d equals 0 |
| Key assumption | Equal population variances | Differences are normal |
| Example | Marks of two classes | Weight before and after |
Eight runners record their $5\text{ km}$ times before and after a training block. The differences $d = \text{before} - \text{after}$ (in seconds) have mean $\bar{d} = 1.8$ and unbiased standard deviation $s_{n-1} = 2.4$. Test at the $5\%$ level whether the training reduced times.
Solution
A seed supplier claims a germination rate of $0.9$. A gardener plants $20$ seeds and only $15$ germinate, and suspects the true rate is lower. Test the claim at the $5\%$ level.
Solution
A call centre historically receives a mean of $6$ calls per hour. In one hour after a marketing campaign it receives $11$ calls, and the manager suspects the rate has increased. Test at the $5\%$ level.
Solution
For $10$ students, hours studied and exam score are modelled as bivariate normal, with sample correlation $r = 0.62$. Test at the $5\%$ level whether there is positive linear correlation in the population.
Solution
A coin is tested for bias towards heads with $20$ tosses. Let $X$ be the number of heads and test $H_0\!: p = 0.5$ against $H_1\!: p > 0.5$ at the $5\%$ level. Find the critical region and the exact probability of a Type I error.
Solution
| H0 is true | H0 is false | |
|---|---|---|
| Reject H0 | Type I error (prob alpha) | Correct decision |
| Do not reject H0 | Correct decision | Type II error (prob beta) |
A production line has historically averaged $m = 3$ defects per batch. A test uses the critical region $X \geq 7$ for $H_0\!: m = 3$ against $H_1\!: m > 3$. Find the probability of a Type I error, and the probability of a Type II error if the true mean is actually $m = 5$.
Solution
| Situation | Parameter | Test to use |
|---|---|---|
| Mean, deviation known | mu | z-test |
| Mean, deviation unknown | mu | t-test |
| Two independent group means | mu1 and mu2 | Unpaired t-test |
| Before and after on same subjects | mu_d | Paired t-test |
| A proportion of successes | p | Binomial test, one-tailed |
| A rate of events per interval | m | Poisson test, one-tailed |
| Linear relationship of two variables | rho | Correlation t-test |