introduction to linear regression

This post briefly tells the general idea of linear regression. Examples are also included.

This post will cover:

  • Fundamental Knowledge before Get Started
  • Simple Linear Regression

Fundamental Knowledge

Before get started, recall some basic things in statistic:
$newcommand{uE}{mathop{}negthinspacemathrm{E}}
newcommand{ucov}{mathop{}negthinspacemathrm{Cov}}
newcommand{uvar}{mathop{}negthinspacemathrm{Var}}$

Expected Value

Properties:

Variance and Covariance

Definition of variance:

Definition of covariance:

Properties:


And there’s a significant property when calculate the variance of summation of random variables:

which also has a special form when $Y_i$ are mutually independent:

Coefficient of Correlation

In case that we might use this later, the definition of coefficient of correlation is introduced here:

When $Y$ and $Z$ are independent, we know $ucov(Y,Z)=0, rho(Y,Z)=0$.