A Breusch-Pagan Test is used to determine if heteroscedasticity is present in a regression model.

The following step-by-step example shows how to perform a Breusch-Pagan Test in SPSS.

**Step 1: Enter the Data**

Suppose we want to fit a multiple linear regression model that uses number of hours spent studying and number of prep exams taken to predict the final exam score of students:

Exam Score = β_{0} + β_{1}(hours) +β_{2}(prep exams)

First, we’ll enter the following dataset into SPSS that contains this information for 20 students:

**Step 2: Fit the Regression Model**

Next, we will fit the multiple linear regression model.

To do so, click the **Analyze** tab, then click **Regression**, then click **Linear**:

In the new window that appears, drag **score** to the **Dependent** panel, then drag **hours** and **prep_exams** to the **Independent** panel:

Then click the **Save** button.

Then check the box next to **Unstandardized** under **Predicted Values** and check the box next to **Unstandardized** under **Residuals**:

Then click **Continue**. Then click **OK**.

A multiple linear regression model will be fit and both the predicted values (PRE_1) for each observation and the residuals (RES_1) will be shown in two new columns in the **Data View** window:

**Step 3: Perform the Breusch Pagan Test**

To determine if heteroscedasticity is a problem in this regression model, we will perform a Breusch-Pagan test.

Before we perform the test, we need to first create a new column that contains the squared residuals.

To do so, click the **Transform** tab and then click **Compute Variable**:

In the new window that appears, type **res_squared** as the **Target Variable** name and then type the formula **RES_1*RES_1** in the **Numeric Expression** box:

Then click **OK**.

The following new variable will created named **res_squared** that contains the squared values from the residual column:

Next, click **Analyze**, then **Regression**, then **Linear** once again.

Then drag **res_squared** into the **Independent** panel and keep **hours** and **prep_exams** in the **Dependent** box:

Then click **OK**.

The following output will appear:

The p-value for the Breusch-Pagan test will be shown under the **Sig** column of the **ANOVA** table.

We can see that the p-value is **.085**.

Since the p-value is not less than 0.05, we fail to reject the null hypothesis of the test.

This means we do not have sufficient evidence to say that heteroscedasticity is present in the regression model.

Thus, it’s safe to interpret the standard errors of the coefficient estimates in the regression summary table.

**What To Do Next**

If you fail to reject the null hypothesis of the Breusch-Pagan test, then heteroscedasticity is not present and you can proceed to interpret the output of the original regression.

However, if you reject the null hypothesis, this means heteroscedasticity is present in the data. In this case, the standard errors that are shown in the output table of the regression may be unreliable.

There are a couple common ways that you can fix this issue, including:

**1. Transform the response variable.**

You can try performing a transformation on the response variable.

For example, you could use the log of the response variable instead of the original response variable. Typically taking the log of the response variable is an effective way of making heteroscedasticity go away.

Another common transformation is to use the square root of the response variable.

**2. Use weighted regression.**

This type of regression assigns a weight to each data point based on the variance of its fitted value.

This gives small weights to data points that have higher variances, which shrinks their squared residuals. When the proper weights are used, this can eliminate the problem of heteroscedasticity.