05 02 Simple Lin Reg
05 02 Simple Lin Reg
Simple linear regression is an approach for predicting a quantitative response Y on the basis of a single predictor
variable X. It assumes that there is approximately a linear relationship between X and Y .
Model Equation
𝒀 ≈𝛽0 + 𝛽1 𝑋
𝛽0 is known as Intercept
𝛽1 is known as slope
Together 𝛽0 and 𝛽1 known as the model coefficients or parameters.
Introduction
For House Price data
• X will represent Room_num
• Y will represent Price
Price ≈𝛽0 + 𝛽1 × Room_num
Start-Tech Academy
Simple Linear Regression
• Our goal is to obtain coefficient estimates 𝛽0 and 𝛽𝟏 such that the linear
model fits the available data well
• Total number of rows (Data Point) ⇒ 𝑛 = 506
• Data ⇒ 𝑥1, 𝑦1 , 𝑥2, 𝑦2 , 𝑥3, 𝑦3 , ………………… 𝑥506, 𝑦506
• Lets call calculated 𝑦 value as 𝑦
Estimating the 𝑦1 = 𝛽0 + 𝛽𝟏 𝑥1
Coefficients 𝑦2 = 𝛽0 + 𝛽𝟏 𝑥2
𝑦506 = 𝛽0 + 𝛽𝟏 𝑥506
• The difference between residual the ith observed response value and the
ith response value that is predicted by our linear model is known as residual
𝑒𝑖 = 𝑦𝑖 − 𝑦𝑖
Start-Tech Academy
Simple Linear Regression
Residual –
The difference between residual the ith observed response value and the ith
response value that is predicted by our linear model is known as residual
𝑒𝑖 = 𝑦𝑖 − 𝑦𝑖
Residual
Start-Tech Academy
Simple Linear Regression
Start-Tech Academy
Simple Linear Regression
Model
Start-Tech Academy