...

/

Simple Linear Regression for a Numerical Explanatory Variable

Simple Linear Regression for a Numerical Explanatory Variable

Perform linear regression for a numerical variable in R and learn the principles behind it.

We'll cover the following...

Recall the concepts of algebra that the equation of a line is 𝑦=𝑎+𝑏𝑥𝑦 = 𝑎 + 𝑏 ⋅ 𝑥. (Note that the symbol is equivalent to the * “multiply by” mathematical symbol. We’ll use the symbol in the rest of this course as it’s more succinct.) It’s defined by two coefficients 𝑎𝑎 and 𝑏𝑏. The intercept coefficient 𝑎𝑎 is the value of 𝑦𝑦 when xx = 0. The slope coefficient 𝑏𝑏 for 𝑥𝑥 is the increase in 𝑦𝑦 for every increase of one in 𝑥𝑥. This is also called the rise over run.

However, when defining a regression line, we use a slightly different notation, i.e., the equation of the regression line is y^=b0+b1x\hat y = b_0 + b_1 \cdot x ...