*64*

Two commonly used models in statistics are ANOVA and regression models.

These two types of models share the following **similarity:**

- The response variable in each model is continuous. Examples of continuous variables include weight, height, length, width, time, age, etc.

However, these two types of models share the following **difference**:

- ANOVA models are used when the predictor variables are categorical. Examples of categorical variables include level of education, eye color, marital status, etc.
- Regression models are used when the predictor variables are continuous.*

*Regression models can be used with categorical predictor variables, but we have to create dummy variables in order to use them.

The following examples show when to use ANOVA vs. regression models in practice.

**Example 1: ANOVA Model Preferred**

Suppose a biologist wants to understand whether or not four different fertilizers lead to the same average plant growth (in inches) during a one-month period. To test this, she applies each fertilizer to 20 plants and records the growth of each plant after one month.

In this scenario, the biologist should use a one-way ANOVA model to analyze the differences between the fertilizers because there is one predictor variable and it is categorical.

In other words, the values for the predictor variable can be classified into the following “categories”:

- Fertilizer 1
- Fertilizer 2
- Fertilizer 3
- Fertilizer 4

A one-way ANOVA will tell the biologist whether or not the mean plant growth is equal between the four different fertilizers.

**Example 2: Regression Model Preferred**

Suppose a real estate agent wants to understand the relationship between square footage and house price. To analyze this relationship, he collects data on square footage and house price for 200 houses in a particular city.

In this scenario, the real estate agent should use a simple linear regression model to analyze the relationship between these two variables because the predictor variable (square footage) is continuous.

Using simple linear regression, the real estate agent can fit the following regression model:

House price = β_{0} + β_{1}(square footage)

The value for β_{1} will represent the average change in house price associated with each additional square foot.

This will allow the real estate agent to quantify the relationship between square footage and house price.

**Example 3: Regression Model with Dummy Variables Preferred**

Suppose a real estate agent wants to understand the relationship between the predictor variables “square footage” and “home type” (single-family, apartment, townhome) with the response variable of house price.

In this scenario, the real estate agent can use multiple linear regression by converting “home type” into a dummy variable since it’s currently a categorical variable.

The real estate agent can then fit the following multiple linear regression model:

House price = β_{0} + β_{1}(square footage) + β_{2}(single-family) + β_{3}(apartment)

Here’s how we would interpret the coefficients in the model:

**β**The average change in house price associated with one extra square foot._{1}:**β**The average difference in price between a single-family home and a townhome, assuming square footage is held constant._{2}:**β**The average difference in price between a single-family home and an apartment, assuming square footage is held constant._{3}:

Check out the following tutorials to see how to create dummy variables in different statistical software:

**Additional Resources**

The following tutorials offer an in-depth introduction to ANOVA models:

The following tutorials offer an in-depth introduction to linear regression models: