## Linear Regression

Linear regression is a statistical method used to model the relationship between a dependent variable 𝑦 and one or more independent variables 𝑥 by fitting a linear equation of the form:

**Types of Lines of Regression: **

- Line of Regression of y on x
- Line of Regression of x on y

## Line of Regression of y on x

Equation |
y – ȳ = b_{yx}(x – x̄) |

(i) Mean of x (x̄) |
= ∑x/n |

(ii) Mean of y (ȳ) |
= ∑y/n |

(iii) b_{yx} |
= ∑xy - {1\over n}∑x∑y\over ∑x^2 - {1\over n}(∑x)^2 |

= cov(x,y)\over var (x) | |

= cov(x, y)\over σ_x | |

= rσ_y\over σ_x | |

= ∑(x - x̄)(y - ȳ)\over ∑(x - x̄)^2 | |

= ∑uv - {1\over n}∑u∑v\over ∑u^2 - {1\over n}(∑u)^2 |

## Line of Regression of x on y

Equation |
x – x̄ = b_{yx}(y – ȳ) |

(i) Mean of x (x̄) |
= ∑x/n |

(ii) Mean of y (ȳ) |
= ∑y/n |

(iii) b_{yx} |
= ∑xy - {1\over n}∑x∑y\over ∑y^2 - {1\over n}(∑y)^2 |

= cov(x,y)\over var (y) | |

= cov(x, y)\over σ_y | |

= rσ_x\over σ_y | |

= ∑(x - x̄)(y - ȳ)\over ∑(y - ȳ)^2 | |

= ∑uv - {1\over n}∑u∑v\over ∑v^2 - {1\over n}(∑v)^2 |

## Properties of Lines of Regression

- b
_{xy}, b_{yx}and r or ρ (x, y) are of same sign - Square of Coefficient of correlation (r
^{2}) = b_{xy}. b_{yx} - 0 ≤ b
_{xy}. b_{yx}≤ 1 or 0 ≤ r^{2}≤ 1 - If one of b
_{xy}. b_{yx }is numerically greater than one, the other is numerically smaller than one. - The two regression lines intersect at (x̄, ȳ)
- If r = 0, then the lines of regression are parallel to the coordinate axes.
- The angle between two regression lines (θ) is given by tan θ = |{1 - r^2\over b_{xy} + b_{yx}}|