Tests for correlation and for the mean of a normal distribution

A level Maths (Edexcel) · Edexcel 9MA0 · S5.1, S5.3 · Statistics › Statistical hypothesis testing

3 exam-style questions plus unlimited generated ones on this topic, at up to four difficulty levels, with full mark schemes. Notes and Full packs are open to everyone. Practice needs a free account.

Or take a quick quiz: 10 questions on this subtopic in A level Maths (Edexcel), marked as you tap.

Revision notes

Two further tests: whether a population correlation coefficient \(\rho\) is zero, using the sample product moment correlation coefficient \(r\) and a table of critical values, and a test for the mean of a normal distribution with known variance, using \(\bar{X} \sim N\left(\mu, \dfrac{\sigma^2}{n}\right)\)

Key facts

  • Correlation: \(H_0: \rho = 0\); \(H_1: \rho \gt 0\), \(\rho \lt 0\) or \(\rho \ne 0\)
  • Two-tailed correlation test at 5%: use the one-tailed 2.5% critical value
  • \(X \sim N(\mu, \sigma^2) \Rightarrow \bar{X} \sim N\left(\mu, \dfrac{\sigma^2}{n}\right)\)
  • \(z = \dfrac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}\)
  • 5% level: one-tailed \(z = 1.6449\); two-tailed \(z = \pm 1.9600\)
  • 1% level: one-tailed \(z = 2.3263\); two-tailed \(z = \pm 2.5758\)
  • Upper-tail critical region: \(\bar{X} \gt \mu_0 + z \times \dfrac{\sigma}{\sqrt{n}}\)

Notes

Testing for correlation

diagram
  • The sample PMCC, \(r\), is used to test the population correlation coefficient, \(\rho\)
  • \(H_0: \rho = 0\) (no correlation in the population). \(H_1: \rho \gt 0\) or \(\rho \lt 0\) (one-tailed), or \(\rho \ne 0\) (two-tailed).
  • You are given a table of critical values (by sample size \(n\) and significance level) or a p-value. Read the table carefully: a two-tailed test at 5% uses the same critical value as a one-tailed test at 2.5%.
  • Reject \(H_0\) if \(r\) is beyond the critical value in the direction of \(H_1\): \(r\) greater than the critical value for \(\rho \gt 0\), \(r\) less than minus the critical value for \(\rho \lt 0\), and \(|r|\) greater than the critical value for \(\rho \ne 0\)
  • −1−0.500.510.4973r = 0.62do not reject H0reject H0
    H1: ρ > 0, n = 12, 5% level: r = 0.62 is in the critical region
  • A significant result is evidence of linear correlation in the population. It does not show causation, and with a large sample even a weak correlation can be significant.

The sample mean

diagram
  • If \(X \sim N(\mu, \sigma^2)\), the mean of a random sample of size \(n\) has distribution \(\bar{X} \sim N\left(\mu, \dfrac{\sigma^2}{n}\right)\)
  • The standard deviation of \(\bar{X}\) is \(\dfrac{\sigma}{\sqrt{n}}\): larger samples give sample means closer to \(\mu\)
  • 482488494500506512518X̄ ~ N(500, 1.5²)X ~ N(500, 6²)
    Means of samples of 16 vary far less than single values: σ/√n = 6/4 = 1.5

Testing a normal mean

  • \(H_0: \mu = \mu_0\); \(H_1: \mu \gt \mu_0\), \(\mu \lt \mu_0\) or \(\mu \ne \mu_0\). The variance is known, given or assumed unchanged.
  • Under \(H_0\), \(\bar{X} \sim N\left(\mu_0, \dfrac{\sigma^2}{n}\right)\)
  • Either find the p-value, e.g. \(P(\bar{X} \le \bar{x})\), or standardise, \(z = \dfrac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}\), and compare with the critical \(z\) value (e.g. 1.6449 for a 5% one-tailed test).
  • Or find the critical region for \(\bar{X}\), e.g. \(\bar{X} \gt \mu_0 + 1.6449 \times \dfrac{\sigma}{\sqrt{n}}\), and see whether \(\bar{x}\) lies in it.

How to answer each type of question

M = method mark, A = answer mark, B = a mark on its own.

Test for correlation using a critical value

3 to 4 marksGrade C
  1. Write the hypotheses in terms of \(\rho\), defined in context.
  2. Find the critical value for your \(n\) and significance level (half the level for a two-tailed test).
  3. Compare \(r\) with it, decide, and conclude in context.

Example. A student takes a random sample of 12 days from the large data set for one UK station and finds that the product moment correlation coefficient between daily mean temperature and daily total sunshine is 0.62. Test, at the 5% level of significance, whether there is evidence of positive correlation between these variables. (For \(n = 12\), the critical value for a one-tailed test at the 5% level is 0.4973.)

Show the model answerHide the model answer
\(H_0: \rho = 0\), \(H_1: \rho \gt 0\), where \(\rho\) is the population correlation coefficient between daily mean temperature and daily total sunshine
(B1)
Critical value 0.4973
(B1)
\(0.62 \gt 0.4973\), so reject \(H_0\)
(M1)
There is evidence to suggest that there is positive correlation between daily mean temperature and daily total sunshine
(A1)

Test a normal mean using a p-value

6 to 7 marksGrade B
  1. Write the hypotheses about \(\mu\)
  2. Under \(H_0\), write \(\bar{X} \sim N\left(\mu_0, \dfrac{\sigma^2}{n}\right)\)
  3. Find the p-value (or \(z\)) and compare.
  4. Decide and conclude in context.

Example. The masses of flour in bags filled by a machine are normally distributed with standard deviation 6 g. The machine is set to a mean of 500 g. An inspector suspects that the mean has decreased. A random sample of 16 bags has mean mass 497.2 g. Test the inspector's suspicion at the 5% level of significance.

Show the model answerHide the model answer
\(H_0: \mu = 500\), \(H_1: \mu \lt 500\)
(B1)
Under \(H_0\), \(\bar{X} \sim N\left(500, \dfrac{6^2}{16}\right)\), i.e. \(N(500, 1.5^2)\)
(M1)
\(P(\bar{X} \le 497.2) = P(Z \le -1.867)\) (M1) \(= 0.0310\)
(A1)
\(0.0310 \lt 0.05\), so reject \(H_0\)
(M1)
There is sufficient evidence to suggest that the mean mass of flour in the bags has decreased
(A1)

Find a critical region for the sample mean

4 marksGrade A
  1. Write the distribution of \(\bar{X}\) under \(H_0\)
  2. Find the \(z\) value(s) for the tail(s).
  3. Critical values: \(\mu_0 \pm z \times \dfrac{\sigma}{\sqrt{n}}\)

Example. \(X \sim N(\mu, 4^2)\). A test of \(H_0: \mu = 30\) against \(H_1: \mu \ne 30\) at the 5% level of significance uses a random sample of 25 observations. Find the critical region for \(\bar{X}\)

Show the model answerHide the model answer
28.4323031.5680.0250.025
\(\bar{X} \sim N(30, 0.8^2)\), since \(\dfrac{4}{\sqrt{25}} = 0.8\)
(M1)
\(z = \pm 1.9600\)
(B1)
\(30 \pm 1.96 \times 0.8\)
(M1)
\(\bar{X} \lt 28.432\) or \(\bar{X} \gt 31.568\)
(A1)

Find the smallest sample size for a significant result

3 to 4 marksGrade A*
  1. Write the standardised statistic in terms of \(n\)
  2. Set it beyond the critical \(z\) value and rearrange for \(\sqrt{n}\)
  3. Square, and round up to a whole number.

Example. For the flour bags above (\(\sigma = 6\) g), find the smallest sample size for which a sample mean of 497.2 g would give evidence at the 1% level that the mean is less than 500 g.

Show the model answerHide the model answer
Need \(\dfrac{497.2 - 500}{6 / \sqrt{n}} \lt -2.3263\)
(M1 B1)
\(\sqrt{n} \gt \dfrac{2.3263 \times 6}{2.8} = 4.985\), so \(n \gt 24.8\)
(M1)
\(n = 25\)
(A1)

Don’t lose marks

  • Writing hypotheses in terms of \(r\) instead of \(\rho\), or \(\bar{x}\) instead of \(\mu\)
  • Using \(\sigma\) instead of \(\dfrac{\sigma}{\sqrt{n}}\) for the sample mean.
  • Entering the variance \(\dfrac{\sigma^2}{n}\) into the calculator instead of the standard deviation \(\dfrac{\sigma}{\sqrt{n}}\)
  • In a two-tailed test, using the critical value for the full significance level (e.g. the one-tailed 5% value for a two-tailed 5% test).
  • Saying that a significant correlation proves causation, or means the correlation is strong.

More tips

Memory tricks

  • Correlation tables: row = sample size, column = significance level. For a two-tailed test, use the one-tailed column for half the level (or the two-tailed heading if the table shows one).
  • The sample mean varies less than single values: divide \(\sigma\) by \(\sqrt{n}\)
  • Comparing \(z\) with the critical \(z\) value, or the p-value with the significance level, always gives the same decision.

Exam technique

  • Define \(\rho\) as the population correlation coefficient between the two named variables.
  • Write the distribution of \(\bar{X}\) under \(H_0\) in full: it usually earns a method mark.
  • Conclude about the population (its mean or its correlation) in context, using ‘evidence’ or ‘suggest’.
  • If asked for an assumption in a test for a mean, the usual one is that the standard deviation is unchanged.

What each grade needs

What you need to be able to do, from the first marks up to the top grade.

  1. Grade E
    Write hypotheses for a correlation test\(H_0: \rho = 0\) and \(H_1: \rho \gt 0\), \(\rho \lt 0\) or \(\rho \ne 0\), with \(\rho\) defined.
  2. Grade D
    Compare \(r\) with a critical valueRead the table for \(n\) and the significance level, then decide whether \(r\) is beyond the critical value.
  3. Grade C
    Carry out a two-tailed correlation testUse the one-tailed critical value for half the significance level and compare \(|r|\) with it.
  4. Grade C
    State the distribution of the sample meanIf \(X \sim N(\mu, \sigma^2)\), then \(\bar{X} \sim N\left(\mu, \dfrac{\sigma^2}{n}\right)\)
  5. Grade B
    Test a normal mean using a p-valueFind \(P(\bar{X} \ge \bar{x})\) or \(P(\bar{X} \le \bar{x})\) under \(H_0\) and compare it with the significance level.
  6. Grade A
    Find a critical region for the sample meanUse \(\mu_0 \pm z\dfrac{\sigma}{\sqrt{n}}\) with the right \(z\) value.
  7. Grade A*
    Find the sample size needed for significanceRearrange the standardised inequality to find the smallest \(n\)

Sample questions

Written for this site in the style of Edexcel exam questions. They are not taken from real past papers.

Question 1Easy2 marks
A researcher collects data on the time spent on a phone each evening and the number of hours slept that night for a random sample of teenagers. The researcher wants to test whether there is negative correlation between the time spent on a phone each evening and the number of hours slept that night.
Write down suitable hypotheses for the test, defining the parameter you use.
[2]
Show the answer and mark scheme
Answer: \(H_0: \rho = 0, \ H_1: \rho \lt 0\), where \(\rho\) is the population product moment correlation coefficient between the time spent on a phone each evening and the number of hours slept that night.
  • B1 for \(H_0: \rho = 0\) with \(\rho\) the population correlation coefficient
  • B1 for \(H_1: \rho \lt 0\)
Question 2Medium7 marks
A teacher records the number of hours of revision and the test mark for a random sample of 18 students. The product moment correlation coefficient between hours of revision and test mark is \(r = 0.42\).
Critical values of the product moment correlation coefficient for a sample of size 18 are 0.4000 (one-tailed test at 5%) and 0.4683 (one-tailed test at 2.5%, or two-tailed test at 5%).
(a) Test, at the 5% level of significance, whether there is evidence of positive correlation between hours of revision and test mark. State your hypotheses clearly.
[4]
(b) A second teacher tests the same data at the 5% level for evidence of correlation, without specifying positive or negative. State the hypotheses and the conclusion of this test.
[2]
(c) Explain why the two conclusions do not contradict each other.
[1]
Show the answer and mark scheme
(a) Answer: \(H_0: \rho = 0\), \(H_1: \rho \gt 0\); \(0.42 \gt 0.4000\), so reject \(H_0\): there is evidence of positive correlation between hours of revision and test mark.
  • B1 for \(H_0: \rho = 0\), \(H_1: \rho \gt 0\)
  • M1 for comparing 0.42 with 0.4000
  • A1 for reject \(H_0\) (significant)
  • A1 for a conclusion in context

Worked solution: \(H_0: \rho = 0\), \(H_1: \rho \gt 0\), where \(\rho\) is the population correlation coefficient. Critical value 0.4000. Since \(0.42 \gt 0.4000\), reject \(H_0\): there is evidence of positive correlation between hours of revision and test mark.

(b) Answer: \(H_0: \rho = 0\), \(H_1: \rho \ne 0\); \(0.42 \lt 0.4683\), so do not reject \(H_0\): insufficient evidence of correlation.
  • B1 for \(H_1: \rho \ne 0\)
  • B1 for \(0.42 \lt 0.4683\), not significant: insufficient evidence of correlation between hours of revision and test mark

Worked solution: \(H_0: \rho = 0\), \(H_1: \rho \ne 0\). Critical value 0.4683 (two-tailed, 5%). Since \(0.42 \lt 0.4683\), do not reject \(H_0\): there is insufficient evidence of correlation.

(c) Answer: They test different alternative hypotheses: a one-tailed test puts all 5% in one tail, so it needs weaker evidence in that direction. The result is borderline, significant for one test but not the other.
  • B1 for the tests have different alternative hypotheses (one-tailed puts all of the 5% in the upper tail, so its critical value is lower); the evidence here is borderline

Worked solution: The first test only looks for positive correlation and puts the whole 5% in the upper tail, giving a lower critical value. The second allows for correlation in either direction, so it needs stronger evidence in each direction. With a borderline value such as 0.42, one test can be significant and the other not.

Question 3Hard9 marks
A machine fills bottles with water. The volume, in ml, of water in a bottle is normally distributed with mean \(\mu\) and standard deviation 4 ml. The machine is set so that \(\mu = 500\).
After the machine is serviced, a random sample of 25 bottles has a mean volume of 498.3 ml.
(a) Test, at the 5% level of significance, whether there is evidence that the mean volume has decreased. State your hypotheses clearly.
[5]
(b) A student writes: “The test proves that the machine now under-fills, and its new mean volume is 498.3 ml.”
Give two criticisms of this statement.
[2]
(c) Explain whether the conclusion would be different if the test had been two-tailed at the 1% level of significance.
[2]
Show the answer and mark scheme
(a) Answer: \(H_0: \mu = 500\), \(H_1: \mu \lt 500\); \(\bar{X} \sim \mathrm{N}(500, 0.8^2)\), \(P(\bar{X} \le 498.3) = 0.0168 \lt 0.05\): reject \(H_0\). There is evidence that the mean volume of water in the bottles has decreased.
  • B1 for \(H_0: \mu = 500\), \(H_1: \mu \lt 500\)
  • M1 for \(\bar{X} \sim \mathrm{N}\left(500, \frac{4^2}{25}\right)\)
  • M1 for \(P(\bar{X} \le 498.3)\) or \(z = \frac{498.3 - 500}{0.8} = -2.125\)
  • A1 for 0.0168 (or \(z = -2.125 \lt -1.6449\), or critical value 498.68)
  • A1 for a conclusion in context: reject \(H_0\); there is evidence that the mean volume has decreased

Worked solution: \(H_0: \mu = 500\), \(H_1: \mu \lt 500\). Under \(H_0\), \(\bar{X} \sim \mathrm{N}\left(500, \frac{16}{25}\right) = \mathrm{N}(500, 0.8^2)\).
\(P(\bar{X} \le 498.3) = P(Z \le -2.125) = 0.0168 \lt 0.05\)⁠.
Reject \(H_0\): there is evidence at the 5% level that the mean volume of water in the bottles has decreased.

(b) Answer: A test gives evidence, not proof (there is a chance of rejecting a true \(H_0\)); 498.3 ml is only the sample mean, an estimate of the new population mean.
  • B1 for a significant result is evidence, not proof: there is up to a 5% chance of rejecting \(H_0\) when it is true
  • B1 for 498.3 is the mean of this sample only; the population mean is unknown (498.3 is an estimate)

Worked solution: A hypothesis test cannot prove anything: with a 5% significance level there is a chance of getting such a sample even if \(\mu = 500\). Also 498.3 ml is the mean of this sample, which only estimates the new population mean; another sample would give a different value.

(c) Answer: Yes: two-tailed at 1% needs a probability below 0.005 in the lower tail (or \(z \lt -2.5758\)); \(0.0168 \gt 0.005\), so \(H_0\) would not be rejected.
  • M1 for comparing 0.0168 with 0.005 (or \(2 \times 0.0168 = 0.0336\) with 0.01, or \(-2.125\) with \(-2.5758\))
  • A1 for not significant: insufficient evidence that the mean volume has changed, so the conclusion would be different

Worked solution: For a two-tailed test at 1%, each tail has 0.5%. \(P(\bar{X} \le 498.3) = 0.0168 \gt 0.005\) (equivalently \(z = -2.125 \gt -2.576\)), so \(H_0\) would not be rejected: there would be insufficient evidence that the mean volume has changed.

More in Statistical hypothesis testing

Stuck? Get 1-to-1 help.

Chhetri Academy tutors GCSE and A level Maths and Science online, with a free 30-minute trial lesson.