# 5.2 - Writing Hypotheses

5.2 - Writing Hypotheses

The first step in conducting a hypothesis test is to write the hypothesis statements that are going to be tested. For each test you will have a null hypothesis ($H_0$) and an alternative hypothesis ($H_a$).

Null Hypothesis
The statement that there is not a difference in the population(s), denoted as $H_0$
Alternative Hypothesis
The statement that there is some difference in the population(s), denoted as $H_a$ or $H_1$

When writing hypotheses there are three things that we need to know: (1) the parameter that we are testing (2) the direction of the test (non-directional, right-tailed or left-tailed), and (3) the value of the hypothesized parameter.

1. At this point we can write hypotheses for a single mean ($\mu$), paired means($\mu_d$), a single proportion ($p$), the difference between two independent means ($\mu_1-\mu_2$), the difference between two proportions ($p_1-p_2$), a simple linear regression slope ($\beta$), and a correlation ($\rho$).
2. The research question will give us the information necessary to determine if the test is two-tailed (e.g., "different from," "not equal to"), right-tailed (e.g., "greater than," "more than"), or left-tailed (e.g., "less than," "fewer than").
3. The research question will also give us the hypothesized parameter value. This is the number that goes in the hypothesis statements (i.e., $\mu_0$ and $p_0$). For the difference between two groups, regression, and correlation, this value is typically 0.

Hypotheses are always written in terms of population parameters (e.g., $p$ and $\mu$).  The tables below display all of the possible hypotheses for the parameters that we have learned thus far. Note that the null hypothesis always includes the equality (i.e., =).

One Group Mean
Research Question Is the population mean different from $\mu_{0}$? Is the population mean greater than $\mu_{0}$? Is the population mean less than $\mu_{0}$?
Null Hypothesis, $H_{0}$ $\mu=\mu_{0}$ $\mu=\mu_{0}$ $\mu=\mu_{0}$
Alternative Hypothesis, $H_{a}$ $\mu\neq \mu_{0}$ $\mu> \mu_{0}$ $\mu<\mu_{0}$
Type of Hypothesis Test Two-tailed, non-directional Right-tailed, directional Left-tailed, directional

$\mu_{0}$ is the hypothesized population mean
Paired Means
Research Question Is there a difference in the population? Is there a mean increase in the population? Is there a mean decrease in the population?
Null Hypothesis, $H_{0}$ $\mu_d=0$ $\mu_d =0$ $\mu_d=0$
Alternative Hypothesis, $H_{a}$ $\mu_d \neq 0$ $\mu_d> 0$ $\mu_d<0$
Type of Hypothesis Test Two-tailed, non-directional Right-tailed, directional Left-tailed, directional

A paired means test is comparable to conducting a one group mean test on the differences.
One Group Proportion
Research Question Is the population proportion different from $p_0$? Is the population proportion greater than $p_0$? Is the population proportion less than $p_0$?
Null Hypothesis, $H_{0}$ $p=p_0$ $p= p_0$ $p= p_0$
Alternative Hypothesis, $H_{a}$ $p\neq p_0$ $p> p_0$ $p< p_0$
Type of Hypothesis Test Two-tailed, non-directional Right-tailed, directional Left-tailed, directional

$p_{0}$ is the hypothesized population proportion
Difference between Two Independent Means
Research Question Are the population means different? Is the population mean in group 1 greater than the population mean in group 2? Is the population mean in group 1 less than the population mean in groups 2?
Null Hypothesis, $H_{0}$ $\mu_1=\mu_2$ $\mu_1 = \mu_2$ $\mu_1 = \mu_2$
Alternative Hypothesis, $H_{a}$ $\mu_1 \ne \mu_2$ $\mu_1 \gt \mu_2$ $\mu_1 \lt \mu_2$
Type of Hypothesis Test Two-tailed, non-directional Right-tailed, directional Left-tailed, directional

Note: $\mu_1 = \mu_2$ is equivalent to $\mu_1-\mu_2=0$
Difference between Two Proportions
Research Question Are the population proportions different? Is the population proportion in group 1 greater than the population proportion in groups 2? Is the population proportion in group 1 less than the population proportion in group 2?
Null Hypothesis, $H_{0}$ $p_1 = p_2$ $p_1 = p_2$ $p_1 = p_2$
Alternative Hypothesis, $H_{a}$ $p_1 \ne p_2$ $p_1 \gt p_2$ $p_1 \lt p_2$
Type of Hypothesis Test Two-tailed, non-directional Right-tailed, directional Left-tailed, directional

Note: $p_1=p_2$ is equivalent to $p_1-p_2=0$
Simple Linear Regression: Slope
Research Question Is the slope in the population different from 0? Is the slope in the population positive? Is the slope in the population negative?
Null Hypothesis, $H_{0}$ $\beta =0$ $\beta= 0$ $\beta = 0$
Alternative Hypothesis, $H_{a}$ $\beta\neq 0$ $\beta> 0$ $\beta< 0$
Type of Hypothesis Test Two-tailed, non-directional Right-tailed, directional Left-tailed, directional
Correlation (Pearson's r)
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

# 5.2.1 - Examples

5.2.1 - Examples

## Example: Rent

Research question: Is the average monthly rent of a one-bedroom apartment in State College, Pennsylvania less than \$900? In this question we are comparing the mean of all State College one-bedroom apartments (i.e. $\mu$) to the value of \$900. This is a single sample mean test. We want to know if the population mean is less than \\$900, so this is a left-tailed test. Our hypotheses are:

• $H_0:\mu=\900$
• $H_a: \mu < \900$

## Example: IQ Scores

Research question: Is the average IQ score of all World Campus STAT 200 students higher than the national average of 100?

In this question we are comparing the mean of all World Campus STAT 200 students (i.e. $\mu$) to the given value of 100. This is a single sample mean test. We want to know if the population mean is greater than 100, so this is a right-tailed test. Our hypotheses are:

• $H_0:\mu = 100$
• $H_a: \mu > 100$

## Example: Weight Loss

Research question: Do participants lose weight following a weight-loss intervention?

Data were collected from one group of participants before and after a weight-loss intervention. Data were paired by participant.  Assuming that $x_1$ is an individual's weight before the intervention and $x_2$ is their weight at the end of the study, if they lost weight then $x_1-x_2$ would be a positive number (i.e., greater than 0). Thus, this is a right-tailed test. Because we are testing their mean difference, the parameter that we should write in our hypotheses is $\mu_d$ where $\mu_d$ is the mean weight change (before-after) in the population.

Our hypotheses are:

• $H_0: \mu_d=0$
• $H_a:\mu_d > 0$

## Example: Gender of College of Science Students

Research question: Is the percent of students enrolled in Penn State's College of Science who identify as women different from 50%?

In this question we are comparing the proportion of all Penn State College of Science students (i.e. $p$) to the given value of 0.5. This is a single sample proportion test. We want to know if the population proportion is different from 0.5, so this is a two-tailed test. Our hypotheses are:

• $H_0:p=0.5$
• $H_a: p ≠ 0.5$

## Example: Dog Ownership Research question: Do the majority of all World Campus STAT 200 students own a dog?

If the majority of all students own a dog, then more than 50% own a dog. In this question we are comparing the population proportion for all World Campus STAT 200 students (i.e. $p$) to the value of 0.5. This is a single sampling proportion test. We want to know if the proportion is greater than 0.5, so this is a right-tailed test. Our hypotheses are:

• $H_0:p=0.5$
• $H_a: p > 0.5$

## Example: Weights of Boys and Girls

Research question: In preschool, are the weights of boys and girls different?

We are comparing the weights of two independent groups: boys and girls. Weight is a quantitative variable so the parameter we are testing is $\mu$. Our research question does not hypothesize which group has the larger weight, so this is a two-tailed test.  Our hypotheses are:

• $H_0: \mu_b = \mu_g$
• $H_a: \mu_b \ne \mu_g$

Note: This is equivalent to $H_0: \mu_b - \mu_g = 0$ and $H_a: \mu_b - \mu_g \ne 0$.

## Example: Smoking by Gender Research question: Is the proportion of men who smoke cigarettes different from the proportion of women who smoke cigarettes in the United States?

In this question we are comparing two independent groups: men and women. The response variable, smoking, is categorical therefore we are comparing proportions. Our research question does not suggest which group smokes more, so we have a two-tailed test. Our hypotheses are:

• $H_0: p_1=p_2$
• $H_a: p_1 \ne p_2$

Note: This is equivalent to $H_0: p_1 - p_2 =0$ and $H_a: p_1 - p_2 \ne 0$

## Example: Predicting SAT-Math using IQ

Research question: Can IQ scores be used to predict SAT-Math scores in the population of all American high school seniors?

SAT-Math and IQ scores are both quantitative variables.  Our research question is about prediction, so we are going to use simple linear regression. The parameter we are testing is $\beta$. Our research question does not state whether we expect the slope to be positive or negative, therefore this is a two-tailed test. Our hypotheses are:

• $H_0: \beta = 0$
• $H_a: \beta \ne 0$

## Example: Relation Between Height and Weight

Research question: Is there a positive relationship between height and weight in the population of all American adults age 25 and older?

The relationship between two quantitative variables is measured using correlation (Pearson's r). The parameter we are testing is $\rho$. A positive relationship would be indicated by a positive correlation coefficient, therefore this is a right-tailed test. Our hypotheses are:

• $H_0: \rho = 0$
• $H_a: \rho > 0$

  Link ↥ Has Tooltip/Popover Toggleable Visibility