Ordinary Least Squares (OLS) is the most common estimation method for linear models—and that’s true for a good reason. As long as your model satisfies the OLS assumptions for linear regression, you can rest easy knowing that you’re getting the best possible estimates.

Regression is a powerful analysis that can analyze multiple variables simultaneously to answer complex research questions. However, if you don’t satisfy the OLS assumptions, you might not be able to trust the results.

In this post, I cover the OLS linear regression assumptions, why they’re essential, and help you determine whether your model satisfies the assumptions.

## What Does OLS Estimate and What are Good Estimates?

First, a bit of context.

Regression analysis is like other inferential methodologies. Our goal is to draw a random sample from a population and use it to estimate the properties of that population.

In regression analysis, the coefficients in the regression equation are estimates of the actual population parameters. We want these coefficient estimates to be the best possible estimates!

Suppose you request an estimate—say for the cost of a service that you are considering. How would you define a reasonable estimate?

- The estimates should tend to be right on target. They should not be systematically too high or too low. In other words, they should be unbiased or correct on average.
- Recognizing that estimates are almost never exactly correct, you want to minimize the discrepancy between the estimated value and actual value. Large differences are bad!

These two properties are exactly what we need for our coefficient estimates!

When your linear regression model satisfies the OLS assumptions, the procedure generates unbiased coefficient estimates that tend to be relatively close to the true population values (minimum variance). In fact, the Gauss-Markov theorem states that OLS produces estimates that are better than estimates from all other linear model estimation methods when the assumptions hold true.

For more information about the implications of this theorem on OLS estimates, read my post: The Gauss-Markov Theorem and BLUE OLS Coefficient Estimates.

## The Seven Classical OLS Assumptions

Like many statistical analyses, ordinary least squares (OLS) regression has underlying assumptions. When these classical assumptions for linear regression are true, ordinary least squares produces the best estimates. However, if some of these assumptions are not true, you might need to employ remedial measures or use other estimation methods to improve the results.

Many of these assumptions describe properties of the error term. Unfortunately, the error term is a population value that we’ll never know. Instead, we’ll use the next best thing that is available—the residuals. Residuals are the sample estimate of the error for each observation.

Residuals = Observed value – the fitted value

When it comes to checking OLS assumptions, assessing the residuals is crucial!

There are seven classical OLS assumptions for linear regression. The first six are mandatory to produce the best estimates. While the quality of the estimates does not depend on the seventh assumption, analysts often evaluate it for other important reasons that I’ll cover.

## OLS Assumption 1: The regression model is linear in the coefficients and the error term

This assumption addresses the functional form of the model. In statistics, a regression model is linear when all terms in the model are either the constant or a parameter multiplied by an independent variable. You build the model equation only by adding the terms together. These rules constrain the model to one type:

In the equation, the betas (βs) are the parameters that OLS estimates. Epsilon (ε) is the random error.

In fact, the defining characteristic of linear regression is this functional form of the *parameters* rather than the ability to model curvature. Linear models can model curvature by including nonlinear *variables* such as polynomials and transforming exponential functions.

To satisfy this assumption, the correctly specified model must fit the linear pattern.

**Related posts**: The Difference Between Linear and Nonlinear Regression and How to Specify a Regression Model

## OLS Assumption 2: The error term has a population mean of zero

The error term accounts for the variation in the dependent variable that the independent variables do not explain. Random chance should determine the values of the error term. For your model to be unbiased, the average value of the error term must equal zero.

Suppose the average error is +7. This non-zero average error indicates that our model systematically underpredicts the observed values. Statisticians refer to systematic error like this as bias, and it signifies that our model is inadequate because it is not correct on average.

Stated another way, we want the expected value of the error to equal zero. If the expected value is +7 rather than zero, part of the error term is predictable, and we should add that information to the regression model itself. We want only random error left for the error term.

You don’t need to worry about this assumption when you include the constant in your regression model because it forces the mean of the residuals to equal zero. For more information about this assumption, read my post about the regression constant.

## OLS Assumption 3: All independent variables are uncorrelated with the error term

If an independent variable is correlated with the error term, we can use the independent variable to predict the error term, which violates the notion that the error term represents unpredictable random error. We need to find a way to incorporate that information into the regression model itself.

This assumption is also referred to as exogeneity. When this type of correlation exists, there is endogeneity. Violations of this assumption can occur because there is simultaneity between the independent and dependent variables, omitted variable bias, or measurement error in the independent variables.

Violating this assumption biases the coefficient estimate. To understand why this bias occurs, keep in mind that the error term always explains some of the variability in the dependent variable. However, when an independent variable correlates with the error term, OLS incorrectly attributes some of the variance that the error term actually explains to the independent variable instead. For more information about violating this assumption, read my post about confounding variables and omitted variable bias.

## OLS Assumption 4: Observations of the error term are uncorrelated with each other

One observation of the error term should not predict the next observation. For instance, if the error for one observation is positive and that systematically increases the probability that the following error is positive, that is a positive correlation. If the subsequent error is more likely to have the opposite sign, that is a negative correlation. This problem is known both as serial correlation and autocorrelation.

Assess this assumption by graphing the residuals in the order that the data were collected. You want to see a randomness in the plot. In the graph for a sales model, there appears to be a cyclical pattern with a positive correlation.

As I’ve explained, if you have information that allows you to predict the error term for an observation, you need to incorporate that information into the model itself. Serial correlation is most likely to occur in time series models. To resolve this issue, you might need to add an independent variable to the model that captures this information. For the sales model above, we probably need to add variables that explains the cyclical pattern.

Serial correlation reduces the precision of OLS estimates.

## OLS Assumption 5: The error term has a constant variance (no heteroscedasticity)

The variance of the errors should be consistent for all observations. In other words, the variance does not change for each observation or for a range of observations. This preferred condition is known as homoscedasticity (same scatter). If the variance changes, we refer to that as heteroscedasticity (different scatter).

The easiest way to check this assumption is to create a residuals versus fitted value plot. On this type of graph, heteroscedasticity appears as a cone shape where the spread of the residuals increases in one direction. In the graph below, the spread of the residuals increases as the fitted value increases.

Heteroscedasticity reduces the precision of the estimates in OLS linear regression.

**Related post**: Heteroscedasticity in Regression Analysis

Note: When assumption 4 (no autocorrelation) and 5 (homoscedasticity) are both true, statisticians say that the error term is independent and identically distributed (IID) and refer to them as spherical errors.

## OLS Assumption 6: No independent variable is a perfect linear function of other explanatory variables

Perfect correlation occurs when two variables have a Pearson’s correlation coefficient of +1 or -1. When one of the variables changes, the other variable also changes by a completely fixed proportion. The two variables move in unison.

Perfect correlation suggests that two variables are different forms of the same variable. For example, games won and games lost have a perfect negative correlation (-1). The temperature in Fahrenheit and Celsius have a perfect positive correlation (+1).

Ordinary least squares cannot distinguish one variable from the other when they are perfectly correlated. If you specify a model that contains independent variables with perfect correlation, your statistical software can’t fit the model, and it will display an error message. You must remove one of the variables from the model to proceed.

Perfect correlation is a show stopper. However, your statistical software can fit OLS regression models with imperfect but strong relationships between the independent variables. If these correlations are high enough, they can cause problems. Statisticians refer to this condition as multicollinearity, and it reduces the precision of the estimates in OLS linear regression.

**Related post**: Multicollinearity in Regression Analysis: Problems, Detection, and Solutions

## OLS Assumption 7: The error term is normally distributed (optional)

OLS does not require that the error term follows a normal distribution to produce unbiased estimates with the minimum variance. However, satisfying this assumption allows you to perform statistical hypothesis testing and generate reliable confidence intervals and prediction intervals.

The easiest way to determine whether the residuals follow a normal distribution is to assess a normal probability plot. If the residuals follow the straight line on this type of graph, they are normally distributed. They look good on the plot below!

If you need to obtain p-values for the coefficient estimates and the overall test of significance, check this assumption!

## Why You Should Care About the Classical OLS Assumptions

In a nutshell, your linear model should produce residuals that have a mean of zero, have a constant variance, and are not correlated with themselves or other variables.

If these assumptions hold true, the OLS procedure creates the best possible estimates. In statistics, estimators that produce unbiased estimates that have the smallest variance are referred to as being “efficient.” Efficiency is a statistical concept that compares the quality of the estimates calculated by different procedures while holding the sample size constant. OLS is the most efficient linear regression estimator when the assumptions hold true.

Another benefit of satisfying these assumptions is that as the sample size increases to infinity, the coefficient estimates converge on the actual population parameters.

If your error term also follows the normal distribution, you can safely use hypothesis testing to determine whether the independent variables and the entire model are statistically significant. You can also produce reliable confidence intervals and prediction intervals.

Knowing that you’re maximizing the value of your data by using the most efficient methodology to obtain the best possible estimates should set your mind at ease. It’s worthwhile checking these OLS assumptions! The best way to assess them is by using residual plots. To learn how to do this, read my post about using residual plots!

If you’re learning regression and like the approach I use in my blog, check out my eBook!

Justin Tusoe says

hi Jim,

I must say the book is very helpful. i am doing a research on the impact of human capital development on economic growth in Ghana. there are thousands of factors that affect economic growth. How do i choose the right variables?

Jim Frost says

Hi Justin,

First off, thank you so much for buying my ebook about regression analysis! I’m glad you’re finding it is very helpful. One of the themes throughout the book is that you need conduct a lot of research before beginning your analysis. What variables do other similar studies include? Which variables tend to be significant, what are their signs and magnitudes, etc. This will help you gather the correct data and include the correct variables in the model. You need to gain a lot of subject-area knowledge to know which variables you should include.

In the book, chapter 7 discusses how to specify and settle on a final model.

Best of luck with your analysis!

Alberto Javier Vigil-Escalera says

Hi Jim

First of all, thank you for so kindly getting back to me.

A couple of final questions.

In order to detrend the series, do you mean for example differentiating them or using percentage change, like

Year on Year changes?

If that is what you mean, I am doing that: My dependent variable is the % anual change in the SP500 and I am doing the same with the independent variable. (Sorry for my lack of clarity in my explanation)

Also by reading your excellent book, I am already in page 106, I realized that I may have another problem: Which is that the equation that I try to find may be non linear, or if linear, I may need to transform some of the variables. Could this be also an explanation for the heteroscedasticity and the residual correlations that I have in my model?

How do I know which variables I should transform? How do I know what non-linear regression is the one that I should look? Is that also in your book?

Many thanks.

Jim Frost says

Hi again Alberto,

Yes, that’s exactly what I meant. If you’ve done that, I would’ve thought that would’ve also removed the heteroscedasticity. You might have to try other options for resolving that issue, which I cover later in the book, starting on page 213.

You can certainly try a transformation. I have section dedicated to transformations, starting on page 244. Consider that as the last resort though. But, yes, transformations can fit nonlinear relationships, fix heteroscedasticity, and fix residuals issues. However, while that all sounds great, save that until the last. Try the other solutions first. I do provide guidelines, tips, etc. for choosing transformations and for which variables. However, choosing the correct transformation method and variables to transform is a bit trial and error. You can also look to see how other similar studies have handled it.

I hope this helps!

Davidjackline says

This is an awesome and brilliant elaboration. Thank you Jim.

Alberto Javier Vigil-Escalera says

Hi Jim

Thank you very much for your blog, and congratulation for your book, I found it very interesting and easy to understand, specially since I have not a mathematic background, I am just a lawyer that got involved in finance.

My question is: Can I still use the results of a regression that violates the rules on heterokedasticity and residual correlations?

Let me give you a bit of background.

I am doing regression analysis on the SP 500. My depended variable is the monthly SP500 Year on Year return. My independent variables are the usual ones: Activity indicators, Monetary Indicators, Volatility indicators. I have more than 200 monthly observations and I don´t have more than 7 independent variables.

All, dependent variables and independent variables are used in Year on Year changes.

I run the regression and I get a SQ R above 0,7. I looked at F and it looks very significant. Then I looked at the T scores on the independent variables and they are all significant (with the exception of the constant).

Also the regression makes sense from an economic point of view. For example: the more economic activity the higher the returns, the sign (+/-) of the monetary policy also makes economic sense…

I look for Collinearity and there is not. So far so good, I think, but my lucky strike ends right there.

When I checked for Heterokedasticity (B-P) and residual correlation (DW) it shows that both exists.

I know that those are serious problems but I still wonder:

1. Residual serial correlation means that there are still independent variables out there that I still should find. However my Rsq is high and my F is too. So even if I don’t know of all the factors that move the SP 500 I know a good amount of them.

2. My hetorokedasticity makes my estimations of the SP 500 very weak. However, could I still use this model to give me the SP 500 direction instead of using it to find a specific target of return? I mean could I use this model to tell me if the SP 500 could go up or down from here, instead of using it to tell me if it will go up 10% or -15%.

Thanks for your help.

Jim Frost says

Hi Alberto,

First, thanks for buying the book and I’m glad to hear that it was helpful!

The quick answer is that you really should fix both heteroscedasticity and autocorrelation. Both of these condition produce less precise coefficient estimates. And, heteroscedasticity tends to produces p-values for the coefficients that are smaller than they should be. So, you’re thinking they’re significant when they might not be.

I also see an additional potential problem with your model. I think you’re going to have long term positive trends in both economic activity and the S&P 500. When you have trends in your data and perform regression analysis, you’ll get significant results and an inflated R-squared. After all, both things are following long term trends. What you really need to do is detrend the data. Then show how deviations from the trend in the economic activity side of things related to deviations from trends in the S&P 500 side of things. That might also help with your heteroscedasticity (I have a section in the book about handling heteroscedasticity you should read). Consider adding lag variables to reduce the autocorrelation. It might be that previous economic activity relates to the current S&P 500. That might be the type of information you’re seeing in the residuals. There’s a bunch of additional things to consider with using regression analysis with time series data.

Predicting the stock market is very difficult. It’s not surprising that you have a weak model. After all, if it was easy, everyone would be able to make a fortune predicting the market!

Kenji Kitamura says

Thank you very much for you explanation. It became clear!

Kenji Kitamura says

Thank you very much for your great explanation. It is so helpful.

I have a small question.

You state that

“if the average error is +7, this non-zero error indicates that our model systematically underpredicts the observed values.”

The average error is for single linear regression is

E[e|x] = (1/n) Summation of [yi – (a+b1xi)]

Thus, the size of the average error E[e|x] depends on the scale of dependent and independent variables. Therefore, I wonder why you can say +7 is a cut off point for the bias. I understand that we don’t really care about this in practice given that the constant addresses this bias, but just curious about this claim.

Jim Frost says

Hi Kenji,

I see I’m going to have to clarify that text! I was just using +7 as an example, and didn’t mean to make it sound like a cutoff value for bias. If the average residual is anything other than zero, the model is biased to some extent. You want the model to be correct on average, which suggests that the mean of the residuals should equal zero. Note that right after I mention +7, I refer to it as a non-zero value, which is the real problem.

And, you’re correct, as I mention in the post, when you include the constant, the average will always equal zero which eliminates the worry of an overall bias. Although, you can still have local bias, such as when you don’t correctly model curvature.

Farhan says

Thanks Jim…. 😐

MahboobUllah says

The Best

CATHERINE NAMIRIMU says

Thanks Jim, the explanations are far easy to understand. Its very interesting to study from in here.

kwaters126 says

I think you meant to say 4 and 5 here:

“Note: When assumption 5 (no autocorrelation) and 6 (homoscedasticity) are both true, statisticians say that the error term is independent and identically distributed (IID) and refer to them as spherical errors.”

Otherwise, wonderful post

Jim Frost says

Yes! Thank you for catching that! I’m making the change now.

John Grenci says

Hey Jim, I happened to find your site, and hoping you can help me. I am doing a study on predicting home run rates of actual baseball players. so, I set up criteria, certain number of plate appearances, etc. and modeled Home run rate for a year based on their previous home rate (going back 5 years). I also have an age flag. all coefficients are highly significant. I performed a test of normality. the r squared for several thousand observations is a little more than .6, so I think the fit is good. but here is my question, and this question could apply for many contexts, I think. it deals with homoscedasticity. it seems intuitively that this should rarely hold up. why? because isn’t it true that if you have two (or more) ranges of similar values, the variances will be in a similar proportion. in other words, take two rooms of males. one has 30 newborns, and one has 30 20 year olds. you are analyzing their weights. assume the mean weights of the newborns olds is 9, and the mean weights of the 20 year olds is 200. It is certain that the variance of the newborns will be smaller than the variance of the 20 year olds, and my best guess would be that the variances have the same ratio as the ratio of the means (9 to 200). proportion to the . so, when predicting ANYTHING, whether it be advertising predicting revenue, or previous home run rates predicting home run rates for the upcoming season it just seems almost certain that at least in the case of home run rates, the same type of phenomenon will happen. so, much like the weights.. in the 20 year olds, you have some people who weigh 350 pounds, and some that weigh 130. It is IMPOSSIBLE to have that variability among newborns. I gave an extreme example to illustrate my point. thanks John

Jim Frost says

Hi John,

I’m glad you found my site! Great questions!

One potential issue I see for your model is the fact that you’re using the model to make predictions and you have an R-squared of 0.6. Now, one thing I never do is have a blanket rule for what an R-squared should be. That might be the perfectly correct R-squared for the subject area. However, R-squared values that aren’t particularly high are often associated with prediction intervals that are too wide to be useful. I’ve written several posts about using regression to make predictions, prediction intervals and precision, etc. that talk about this. One you should check out is my post about how high does your R-squared need to be, and then maybe some of the others.

Now, on to homoscedasticity. First, you should check out my post about heteroscedasticity. It talks about the issues you discuss among along with solutions. You’re absolutely correct that when you have a large range of dependent variable values, you’re more likely to have heteroscedasticity. In contrast, I often use a height-weight dataset as an example, but it’s limited to young teen girls. It’s more restricted and there’s no heteroscedasticity present, which fits in nicely as the converse of your example.

That all said, I’m often surprised at how rarely heteroscedasticity appears outside of extreme cases like one that you describe. Anyway, read that blog post, and if you questions after that, don’t hesitate to ask!

Rainard Mutuku says

Hae Jim, thanks.

Your presentation is well illustrated and precise.

ghazanfar says

sir thanks you make stat easy for me by your good explanations but one thing is confusing me which test is best to check the heteroskedasticity.

Amit says

SInce you replied sir…I am elated to ask some of my doubts sir:

a)Sir we know expectation of errors is zero is a basic assumption but sir we also get Summation of errors=0 as the first constraint from LSM(least square method).Now what is the difference between two…..I think that always linear regression line is going to pass through the center of points but only LSM is going to minimise the errors .but E(e)=0,even if we donot use LSM(OLS)..Am I right?

b)Sometimes,our software predict a line for the curves ,then also our E(e)=0,then we need to add square terms or transformations to meet homoscadasticity ,still E(e)=0…meaning software always try to predict and get E(e)=0

Jim Frost says

Hi Amit,

I’m not 100% sure that I understand your questions. But, yes, the expectation that errors are zero and the summation of errors equaling zero are related. Furthermore, if you include the constant in your model, you’ll automatically satisfy this assumption. Read my post about the regression constant for more information about this aspect.

However, what I find is that while the overall expectation is that the error equals zero, you can have patterns in the residuals where it won’t equal zero for specification ranges. The classic example of that is where you try to fit a straight line to a data that have curvature. You might have ranges of fitted values that systematically under-predict the observed values and other ranges that over-predict it even though the overall expectation is zero. In that case, you need to fit the curvature so that those patterns in the residuals no longer exist. In other words, having an overall expectation equal zero is not sufficient. Check those residual plots for patterns. I talk about this in my post about residual plots.

I don’t know about your software and what it does automatically, but in general the analyst needs to be sure that not only does the overall expectation equals zero, which isn’t a problem when you include the constant, but that there are no ranges of fitted values that systematically over- and under-predict. Again, read my post about checking the residual plots!

I hope this helps!

Uma Shankar says

Hi Jim,

I agree to the point where Y need not follow normal distribution as we don’t know the distribution of population of Y . However the sample statistics i.e. the regression coefficients or the parameter estimates follow norma distribution ( Thanks to Central Limit Theorem – the sampling distribution of sample mean follows normal distribution). In that case, since Y-hat is a linear combination of paramters estimates, it should turn out that y-hat should follow normal distribution right?

The linear combination of normally distributed random variables results in a normal distribution .

Thank you.

Jim Frost says

Hi Uma,

Sorry about the delay in replying!

As it turns out, y-hat doesn’t necessarily follow a normal distribution even though it is a linear combination of parameter estimates.

If the residuals are normally distributed, it implies that the betas are also normally distributed. That part is true. It would also seem to imply that the y-hats are also normally distributed but that’s not necessarily true. However, if you include polynomials to model curvature, they can allow the model to fit nonnormally distributed Ys and yet still produce normally distributed residuals. Even though it is modeling curvature, it is still a linear model. I actually have an example of this using real data, which you can download–using regression to make predictions. I don’t mention it in the post, but the dependent variable is not normally distributed. Because the model provides a good fit, we know that the y-hats are also nonnormal.

I hope this helps!

Uma Shankar says

Expected value of error is still zero as it is assumed that the mean value of error clusters around zero. However the error need not be normally distributed which is not a strict assumption even in OLS regression.

In Linear regression, Y – hat is linear combination of parameter estimates with expected value of error being zero as the errors are assumed to be iids with mean clustered around zero. Same applies here as well. Because errors are independent and all independent variables are exogenous.

My question here is , how can the Y-hat satisfy the normality assumption (it being a sampling distribution)as here, Y-hat is not a linear combination of parameter estimates unlike in Linear regression. How does the inferential statistics work here?

Jim, Please help with the analysis and correct me if I’m wrong here with expected error being zero in the question asked.

Thanks all.

Jim Frost says

Hi Uma,

Neither Y-hat nor Y need to follow the normal distribution. The assumptions all apply to the residuals for both linear and nonlinear regression. While the residuals don’t need to be normally distributed, it is helpful if you want to perform hypothesis testing and generate confidence intervals and prediction intervals. Does that answer your question?

Amit says

If some Y=e^xb is the function then E(e)=0 or not?In other words if it is not linear regression ,will the expectation of errors be zero?Why or why not?

Jim Frost says

Hi Amit,

The assumptions for the residuals from nonlinear regression are the same as those from linear regression. Consequently, you want the expectation of the errors to equal zero. If fit a model that adequately describes the data, that expectation will be zero. Of course, if the model doesn’t fit the data, it might not equal zero. But, that is the goal!

I hope this helps!

Riana says

This is just wonderfully written! Thank you so much! I often heard this iid assumption, but never quite knew what was meant by it! I will definitely read all your other posts.

I hope you will also easily explain the field of time series econometrics and/or asymptotics anytime soon 🙂

Jim Frost says

Hi Riana,

Thank you so much! Your kind words mean a lot to me!

I plan to write about those other topics at a future date, but there’s so much to write about!

Uma Shankar Surreddy says

Hi Jim, Wonderful explanation. I have a doubt, in assumption 2 – “The error term has a population mean of zero”, Isn’t this about residual and not the error/disturbance term ? Because the error/disturbance term ( a population object) is ideally independent or uncorrelated with other errors and their sum is almost never zero. But in the case of a sample statistic like, sample mean, the residuals are not independent and hence make up for a mean value of zero. Please correct me if I’m wrong.

Jim Frost says

Hi Uma,

The error term is an unknown just like the true parameter values. The coefficients estimate the parameters while the residuals estimate the error term. Ideally, the error term has a zero mean and are independent of each other. Because we can’t know the real errors, the best we can do is to have a model that produces residuals with these properties.

So, yes, the error term can and should have a mean of zero. But, we can only use the residuals to estimate these properties. Consequently, the residuals should have a mean of zero and be independent of each other.

I hope this helps!

Giulio Graziani says

This is gold Jim thanks a lot!

Felix Ajayi says

Sir you are simply wonderful. Your post is reader-friendly. Kindly send this piece to my email

f********@*****.com

I want to follow you for a guide to learning and teaching in econometrics and more importantly running the analyses in my academic research.

Regards.

Jim Frost says

Thank you, Felix! That means a lot to me. I removed your email address from your comment for privacy. I don’t have anything to email now, but I’ll save your email address for when that occasion arises. You can always receive alerts about new posts by filling in the subscribe box in the right navigation pane. I don’t seen any junk mail!

Isaac kojo Annan Yalley says

Thanks for making statistics easy and understanding for us

Jim Frost says

You’re very welcome, Isaac. I’m glad my website has been helpful!

Tavares says

Thank You. I appreciated the content

Jim Frost says

You’re very welcome. I’m glad it was helpful!