Professional Documents
Culture Documents
MODELLING
Marnielle A. Salig
Introduction to
Linear Regression
and
Correlation Analysis
Linear Regression
Introduction to Regression Analysis
Regression analysis is used to:
predict the value of a dependent variable based
on the value of at least one independent variable
explain the impact of changes in an independent
variable on the dependent variable
Dependent variable: the variable we wish to explain
Independent variable: the variable used to explain
the dependent variable
Scatter Plots
a.k.a. scatter diagram
shows the relationship between
two variables
Scatter Plot Examples
Linear relationships Nonlinear relationships
y y
x x
y y
x x
Who coined the term ‘regression’?
11
Estimated Regression Model
The sample regression line provides an
estimate of the population regression line
Estimate of the
Estimate of the
Estimated (or regression
regression slope
predicted) y intercept
value
Independent
variable
Age at wedding 21 15 22 22 21 25 30 18 24
No. of children 4 8 3 4 2 3 1 5 6
Age at wedding 21 15 22 22 21 25 30 18 24
No. of children 4 8 3 4 2 3 1 5 6
7 8 9 10
Number of Children
4 5 6
3
3
1 2
10 13 16 19 22 25 28 31 34 37
Age at wedding
2. Obtain the estimated regression line equation.
(X) Age at
21 15 22 22 21 25 30 18 24
wedding
(Y) No. of
4 8 3 4 2 3 1 5 6
children
𝑛
∑ 𝑥 𝑖=21+15+22+22+21+25+30+18+24=198
𝑖=1
𝑛
∑ 𝑦 𝑖= 4+8+3+ 4+2+3+1+5+6=36
𝑖=1
𝑛
2 2 2 2 2 2 2 2 2 2
∑ 𝑥𝑖 =21 +15 +22 +22 +21 +25 +30 +18 +24 =4500
𝑖=1
2. Obtain the estimated regression line equation.
(X) Age at
21 15 22 22 21 25 30 18 24
wedding
(Y) No. of
4 8 3 4 2 3 1 5 6
children
𝑛
∑ 𝑦 𝑖2=42 +82 +32 +4 2+22 +32 +12+5 2+6 2=180
𝑖=1
𝑛
∑ 𝑥𝑖 𝑦𝑖=21( 4)+15 (8)+22 (3)+22 (4)+21 (2)+25 (3)+30 (1)+18 (5 )+24 (6)= 739
𝑖=1
𝑛 𝑛
∑ 𝑥𝑖 ∑ 𝑦𝑖
𝑛=9
𝑥=
´ 𝑖=1
=
198
= 22 𝑦=
´ 𝑖=1
=
36
=4
𝑛 9 𝑛 9
2. Obtain the estimated regression line equation.
If , then
Scores in Final 30 54 40 90 85 82 78 68 60 48 96 35
Exam (Y)