One estimation procedure preformed by many novice economists is to use OLS to regress quantity on price. Let us assume the following framework (omitting the i subscripts on the variables):
- qd = α0 + α1p + u
- qs = β0 + β1p + v
- qd = qs
If we regress qd on a constant and p in order to try to estimate the demand equation for some good, the OLS estimate of α1 is given by the formula α1OLS =Cov(p,q)/Var(p). I solve Cov(p,q) below:
- Cov(p,q)=Cov(p, α0 + α1p + u)
- = E(α0p + α1p2 + pu) – E(p)*E[α0 + α1p + u]
- = α1Var(p) + Cov(p,u) 
To find Cov(p,u) we can solve the first system of equations above.
- p= [(α0 – β0) + (u – v)]/(β1 – α1)
- Cov(p,u)= Var(u)/(β1 – α1) 
So, substituting  into , we have:
- Cov(p,q)= α1Var(p) + Var(u)/(β1 – α1)
Thus, our bias term for the OLS regression is:
- Cov(p,q)/Var(p) – α1 = Cov(p,u)/Var(p) 
Since we see in equation  that Cov(p,u) is not equal to 0 unless Var(u) = 0—which is unlikely—we know the OLS estimate is biased. This phenomenon is known as simultaneous equation bias or endogeneity bias. The problem is that the error term (u) is correlated with the independent variable (p). The main way to solve this problem is to use an instrumental variables methodology.