jmaths
IB Mathematics: Applications and Interpretation HL · 13.4: Hypothesis Testing · 13.4.17
Testing for correlation Problem set B Worked solutions
Skills
-
Write down H0 and H1 for each test. Define ρ in each case.
(a) A gardener believes that the more hours of sunshine a week, the more tomatoes she harvests.
- H0 is always ρ = 0. More of one goes with more of the other: positive, H1: ρ > 0.
- H0: ρ = 0, H1: ρ > 0. ρ is the population correlation coefficient between weekly hours of sunshine and number of tomatoes harvested.
(b) A café owner believes that the warmer the day, the fewer cups of hot chocolate he sells.
- H0 is always ρ = 0. One rises as the other falls: negative, H1: ρ < 0.
- H0: ρ = 0, H1: ρ < 0. ρ is the population correlation coefficient between the temperature and cups of hot chocolate sold.
(c) An analyst asks whether there is any link between the population of a town and its number of libraries.
- H0 is always ρ = 0. Any link, in either direction: H1: ρ ≠ 0.
- H0: ρ = 0, H1: ρ ≠ 0. ρ is the population correlation coefficient between a town's population and number of libraries.
-
A restaurant records the number of staff on shift and the customers served per hour on eight evenings. Staff on shift: 3, 4, 5, 6, 7, 8, 9, 10; Customers served per hour: 41, 58, 34, 71, 62, 61, 67, 70. Use your calculator to find r and the p-value for a test with H1: ρ > 0.
- From the calculator: linear regression t test with H1: ρ > 0.
- r = 0.689
- p = 0.0294
-
A park manager records the altitude of seven mountain huts and the number of days per year that the path to each is open. Altitude (hundreds of m): 8, 10, 12, 15, 17, 20, 24; Days open per year: 304, 163, 246, 197, 210, 160, 160. Test, at the 10% significance level, whether there is negative correlation between the altitude of a hut and the days the path is open.
- H0: ρ = 0, H1: ρ < 0. ρ is the population correlation coefficient between the altitude of a hut and the days the path is open.
- From the calculator: linear regression t test with H1: ρ < 0: r = −0.670, p = 0.0498
- p = 0.0498 < 0.1, so reject H0. There is sufficient evidence at the 10% level of negative correlation between the altitude of a hut and the days the path is open.
-
A cinema records the length of nine films and the average audience score. Length (minutes): 85, 92, 98, 105, 112, 120, 134, 150, 168; Audience score (%): 78, 42, 65, 57, 58, 60, 46, 60, 55. Test, at the 5% significance level, whether there is any correlation between the length of a film and the audience score.
- H0: ρ = 0, H1: ρ ≠ 0. ρ is the population correlation coefficient between the length of a film and the audience score.
- From the calculator: linear regression t test with H1: ρ ≠ 0: r = −0.279, p = 0.467
- p = 0.467 > 0.05, so do not reject H0. There is insufficient evidence at the 5% level of correlation between the length of a film and the audience score.
-
Answer these questions about the p-value of a test for correlation.
(a) A student finds a p-value for the correlation between two measurements. State the assumption about the two variables that the p-value depends on.
- The p-value is found from r and the number of pairs.
- It assumes that both variables come from normal populations.
(b) The marks of 30 students in a test are strongly skewed to the right. Explain what this means for a correlation test using these marks.
- Normal data are symmetric; skewed data are not.
- So the assumption fails for this variable and the p-value may be unreliable.
In context
-
A music teacher records the weekly practice time of ten pupils and their mark in a grade exam. Practice (hours per week): 1, 2, 3, 3.5, 4, 5, 6, 7, 8, 9; Exam mark (out of 100): 48, 54, 68, 64, 52, 65, 65, 73, 66, 81. Test, at the 2% significance level, whether more practice is linked to a higher mark. State your hypotheses and your conclusion.
- H0: ρ = 0, H1: ρ > 0. ρ is the population correlation coefficient between weekly practice and music exam mark.
- From the calculator: linear regression t test with H1: ρ > 0: r = 0.810, p = 0.00224
- p = 0.00224 < 0.02, so reject H0. There is sufficient evidence at the 2% level of positive correlation between weekly practice and music exam mark.
-
An agent records the distance from the city centre and the monthly rent of eight flats. Distance (km): 1.0, 2.5, 3.0, 4.5, 6.0, 7.5, 9.0, 11.0; Rent (€ per month): 1357, 1304, 1312, 1389, 1167, 1108, 1105, 1185. The agent claims that rent falls as the distance from the centre grows. Test this claim at the 5% significance level.
(a) State suitable hypotheses, defining ρ.
- Rent falling as distance grows is negative correlation.
- H0: ρ = 0, H1: ρ < 0. ρ is the population correlation coefficient between distance from the city centre and monthly rent.
(b) Use your calculator to find r and the p-value.
- From the calculator: linear regression t test with H1: ρ < 0: r = −0.780, p = 0.0113
(c) State your conclusion in context.
- 0.0113 < 0.05
- p = 0.0113 < 0.05, so reject H0. There is sufficient evidence at the 5% level of negative correlation between distance from the city centre and monthly rent.
-
A shop records the price of nine cycle helmets and the average rating given by customers. Price (€): 20, 25, 30, 35, 45, 55, 65, 80, 95; Rating (out of 5): 3.8, 3.1, 2.9, 2.3, 3.4, 4.0, 3.5, 3.7, 3.9.
(a) Find the correlation coefficient r.
- From the calculator: linear regression t test gives r.
- r = 0.510
(b) Test, at the 1% significance level, whether there is any correlation between price of a cycle helmet and customer rating.
- H0: ρ = 0, H1: ρ ≠ 0. ρ is the population correlation coefficient between price of a cycle helmet and customer rating.
- From the calculator: linear regression t test with H1: ρ ≠ 0: r = 0.510, p = 0.161
- p = 0.161 > 0.01, so do not reject H0. There is insufficient evidence at the 1% level of correlation between price of a cycle helmet and customer rating.
Stretch
-
A baker believes that the more she charges for a cake, the fewer cakes she sells. She records the price and the number sold per day for eight cakes. Price (€): 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.5; Cakes sold per day: 45, 11, 40, 34, 44, 38, 48, 37. Test the belief at the 5% significance level, and comment on the sign of r.
- H0: ρ = 0, H1: ρ < 0. ρ is the population correlation coefficient between price of a cake and cakes sold per day.
- From the calculator: linear regression t test with H1: ρ < 0: r = 0.308, p = 0.771
- 0.771 > 0.05, so do not reject H0. There is insufficient evidence at the 5% level of negative correlation.
- r = 0.308 is positive: the sample shows the opposite trend, which is why p is so large.
-
A librarian records the weekly time that ten students spend in the library and their exam marks. Library time (hours): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; Exam mark (%): 54, 49, 52, 35, 75, 71, 60, 71, 69, 63.
(a) Test, at the 5% significance level, whether there is positive correlation.
- From the calculator: linear regression t test with H1: ρ > 0: r = 0.569, p = 0.0431
- 0.0431 < 0.05: reject H0. Sufficient evidence of positive correlation.
(b) Test, at the 5% significance level, whether there is any correlation.
- From the calculator: linear regression t test with H1: ρ ≠ 0: r = 0.569, p = 0.0862
- 0.0862 > 0.05: do not reject H0. Insufficient evidence of correlation.
(c) Explain why the two conclusions differ.
- The two-tailed p-value is twice the one-tailed value: 0.0862 = 2 × 0.0431.
- The first test commits to a direction before seeing the data. The second does not, so it asks for more.
jmaths.xyz · AI HL · 13.4.17 Testing for correlation