## Definitions of Null and Alternative Hypotheses

A null hypothesis is a prediction of no difference between groups or no relationship between variables. In contrast, an alternative hypothesis states there is a difference between groups or a relationship between variables.

Often, we use **H**_{0} to represent the null hypothesis, whereas **H**_{1} represents the alternative hypothesis.

## Hypotheses for Correlation

Correlation is a measure of the relationship between two variables, X and Y. Suppose that you would like to test whether the temperature is correlated with ice cream consumption. You can write the null and alternative hypotheses as follows for the correlation test.

- H
_{0}: Temperature and ice cream consumption are not correlated. - H
_{1}: Temperature and ice cream consumption are correlated.

## Hypotheses for Simple Regression

Simple linear regression has only one X variable. For instance, you would like to predict how age impacts saving. Age is the X (i.e., independent variable) and saving is the Y (i.e., dependent variable).

Y = Ξ²_{0}+ Ξ²_{1}X = Ξ²_{0}+ Ξ²_{1}Aage

The null hypothesis and alternative hypothesis can be written as follows.

- H
_{0}: π½β = 0. - H1: π½β β 0.

## Hypotheses for Multiple Regression

Multiple linear regression has more than one X variable. For instance, you would like to predict how the combination of age and gender impacts saving.

Typically, there are two ways that you can write null and alternative hypotheses for multiple linear regression, namely a single independent variable case and the whole model case.

Y = Ξ²_{0}+ Ξ²_{1}X + Ξ²_{2}X= Ξ²_{0}+ Ξ²_{1}Aage + Ξ²_{2}Gender

### Hypotheses for a Single Variable

You can just choose either of them, either π½β or π½_{2} as the focus of the hypotheses.

- H
_{0}: π½β = 0. - H
_{1}: π½β β 0.

### Hypotheses for the Whole Model

For the whole model, it gets a bit complicated. Let’s start with the null hypothesis, where you can say both π½β and π½_{2} are equal to zero. However, the opposite of that is not that neither π½β nor π½_{2} is equal to zero, but rather at least one of them is unequal to zero. The following is the formula format of the hypothesis.

- H
_{0}: π½β = π½_{2}= 0. - H
_{1}: At least one of them, π½βor π½_{2}β 0.

## Hypotheses for Mean Comparisons

For t-test or ANOVA, the independent variable (i.e., X) is a category. In this case, hypotheses statements are about the comparison between different independent levels.

### Hypotheses for 2 Groups (t-test)

When comparing two groups, you can use a t-test. For instance, if you compare how different font colors (blue vs. black) can impact how long consumers use your App.

The null hypothesis states that blue and black font colors do not differ in terms of how long consumers use the App. In contrast, the alternative hypothesis will state the opposite. You can write the null and alternative hypotheses as follows.

H_{0}: Mean_{blue} = Mean_{black} (or, Mean_{blue} – Mean_{black }=0).

H_{1}: Mean_{blue} β Mean_{black} (or, Mean_{blue} – Mean_{black} β 0).

### Hypotheses for 2 or more Groups (ANOVA)

When comparing more than 2 groups, you need to use ANOVA. For instance, you want to test how 3 different font colors (blue vs. gray vs. black) can impact how long consumers use an App.

In this case, the null hypothesis states that blue, gray, and black font colors do not differ in terms of how long consumers use the App. In contrast, the alternative hypothesis will state that at least one pair of them is not equal. This uses similar logic as the one in the multiple linear regression. You can write the null and alternative hypotheses for ANOVA as follows.

- H
_{0}: Mean_{blue}= Mean_{gray}= Mean_{black}. - H
_{1}: At least one pair of Mean_{blue}, Mean_{gray}, and Mean_{black}is not equal.