# 12.2.1 - Hypothesis Testing

12.2.1 - Hypothesis TestingIn testing the statistical significance of the relationship between two quantitative variables we will use the five step hypothesis testing procedure:

In order to use Pearson's \(r\) both variables must be quantitative and the relationship between \(x\) and \(y\) must be linear

Research Question | Is the correlation in the population different from 0? | Is the correlation in the population positive? | Is the correlation in the population negative? |
---|---|---|---|

Null Hypothesis, \(H_{0}\) | \(\rho=0\) | \(\rho= 0\) | \(\rho = 0\) |

Alternative Hypothesis, \(H_{a}\) | \(\rho \neq 0\) | \(\rho > 0\) | \(\rho< 0\) |

Type of Hypothesis Test | Two-tailed, non-directional | Right-tailed, directional | Left-tailed, directional |

Use Minitab Express to compute \(r\)

Minitab Express will give you the p-value for a two-tailed test (i.e., \(H_a: \rho \neq 0\)). If you are conducting a one-tailed test you will need to divide the p-value in the output by 2.

If \(p \leq \alpha\) reject the null hypothesis, there is evidence of a relationship in the population.

If \(p>\alpha\) fail to reject the null hypothesis, there is not evidence of a relationship in the population.

Based on your decision in Step 4, write a conclusion in terms of the original research question.

# 12.2.1.1 - Example: Temperature & Coffee Sales

12.2.1.1 - Example: Temperature & Coffee SalesData concerning sales at student-run cafe were retrieved from cafedata.xls more information about this data set available at cafedata.txt. Let's determine if there is a statistically significant relationship between the maximum daily temperature and coffee sales.

Maximum daily temperature and coffee sales are both quantitative variables. From the scatterplot below we can see that the relationship is linear.

\(H_0: \rho = 0\)

\(H_a: \rho \neq 0\)

Pearson correlation of Max Daily Temperature (F) and Coffees = -0.741302 |

P-Value = <0.0001 |

\(r=-0.741302\)

\(p<.0001\)

\(p \leq \alpha\) therefore we reject the null hypothesis.

There is evidence of a relationship between the maximum daily temperature and coffee sales in the population.

# 12.2.1.2 - Example: Age & Height

12.2.1.2 - Example: Age & HeightData concerning body measurements from 507 adults retrieved from body.dat.txt for more information see body.txt. In this example we will use the variables of age (in years) and height (in centimeters).

**Research question: **Is there a relationship between age and height in adults?

Age (in years) and height (in centimeters) are both quantitative variables. From the scatterplot below we can see that the relationship is linear (or at least not non-linear).

\(H_0: \rho = 0\)

\(H_a: \rho \neq 0\)

From Minitab Express:

Pearson correlation of Height (cm) and Age = 0.067883 |

P-Value = 0.1269 |

\(r=0.067883\)

\(p=.1269\)

\(p > \alpha\) therefore we fail to reject the null hypothesis.

There is not evidence of a relationship between age and height in the population from which this sample was drawn.