# 12.2.1 - Hypothesis Testing

12.2.1 - Hypothesis Testing

In testing the statistical significance of the relationship between two quantitative variables we will use the five step hypothesis testing procedure:

1. Check assumptions and write hypotheses

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
2. Calculate the test statistic

Use Minitab Express to compute $r$

3. Determine the p-value

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.

4. Make a decision

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.

5. State a "real world" conclusion.

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 Sales

1. Check assumptions and write hypotheses

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$

2. Calculate the test statistic
 Pearson correlation of Max Daily Temperature (F) and Coffees = -0.741302 P-Value = <0.0001

$r=-0.741302$

3. Determine the p-value

$p<.0001$

4. Make a decision

$p \leq \alpha$ therefore we reject the null hypothesis.

5. State a "real world" conclusion.

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 & Height

Data 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?

1. Check assumptions and write hypotheses

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$

2. Calculate the test statistic

From Minitab Express:

 Pearson correlation of Height (cm) and Age = 0.067883 P-Value = 0.1269

$r=0.067883$

3. Determine the p-value

$p=.1269$

4. Make a decision

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

5. State a "real world" conclusion.

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

 [1] Link ↥ Has Tooltip/Popover Toggleable Visibility