Docsity

Simple Linear Regression: Determining the Linear Relationship and Equation of Best Fit, Exams of Statistics

Toggle sidebar
bg1
Simple Linear Regression
Simple Linear Regression is used to determine the linear
relationship between 2 variables, say x and y. Whereas
correlation measures the strength of this relationship,
Simple Linear Regression also determines the equation of
the best line that fits through the data.
1.5
2.0
2.5
3.0
3.5
4.0
4.5
15 17 19 21 23 25 27 29 31 33
X
Y
The above plot is a plot of the n data points
(x1, y1), (x2, y2), …, (xn, yn),
regarded as a sample of size n from some population.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Simple Linear Regression: Determining the Linear Relationship and Equation of Best Fit and more Exams Statistics in PDF only on Docsity!

Simple Linear Regression

Simple Linear Regression is used to determine the linear relationship between 2 variables, say x and y. Whereas correlation measures the strength of this relationship, Simple Linear Regression also determines the equation of the best line that fits through the data.

15 17 19 21 23 25 27 29 31 33 X

Y

The above plot is a plot of the n data points (x 1 , y 1 ), (x 2 , y 2 ), …, (xn, yn), regarded as a sample of size n from some population.

We can conceptually imagine a plot of the entire population below, where the ellipse represents a region containing, say, 95% of the values in the population. For fixed values of x, we expect y to vary randomly about some central value μy|x.

y

x (^1) x 2 x 3 x

From the n pairs of sample points ( x 1 , y 1 ) , ", ( xn , yn ) we

will estimate this relationship.

15 17 19 21 23 25 27 29 31 33 X

Y

The estimated regression line is

y ˆ^ = b 0 (^) + b x 1

For each of our n pairs of ob ns, from the true linear relationship in the population, we have

yi = β + β 0 1 xi + ε i

and from the relationship estimated from the data we get

yi = b 0 (^) + b x 1 i + ei

ei ' s are called the residuals

y

x

(xi, yi)

ei {

Method of least squares

Minimize the sum of squares of residuals

Let

2 2 0 1 = 1 = 1

= (^) ∑ = (^) ∑ − −

n n i i i i

S e y b b xi

Want to find b 0 (^) and b 1 which minimize S.

ICBS, WALA, that a closed form solution exists:

1 1 1 (^1 ) 2 1 1

1 2 1

= = =

= =

=

=

− ⎛^ ⎞⎛

= ⎝^ ⎠⎝

− ⎛^ ⎞

∑ ∑ ∑

∑ ∑

∑

∑

n n n i i i i i i i n n i i i i n i i i n i i xy xx

n x y x y b n x x

x x y y

x x

S S

b 0 (^) = y − b 1 x

Statistical Assumptions

( ) ( )

2 2 |

i i i y x

N

y x N

ε σ μ σ

& are independent & are independent

i j i j

i j y y i

ε ε ≠ ≠ j

Similarly,

b 0 (^) ~ N (^) ( μ b (^) o ,σ b^2 o )

where

0

0

0

2 2 1 2 2 1

b

n i i b (^) n i i

x

n x x

=

=

μ = β

σ = σ −

∑

∑

An estimate of σ^2 is given by

2 2 1

n i i i

s y n (^) =

− ∑^

y

In fact,

2 2

~ (^) n

n s −

χ σ

And, 2 0

2 1

is independent of

is independent of

b s

b s

Tests of hypothesis

0 1

1 1

β =

β ≠

H

H

Test Statistic:

(^12) 2 1

=

∑ −

n^ n i i

b t t s x x

0 0

1 0

β =

β ≠

H

H

Test Statistic:

0 2 2 2 1 1

= =

∑ ∑ −

n n^ n i i i i

t b t s x n x x

Standard deviation of y ˆ

If we let yˆ 0 denote the predicted value of y when x=x 0 , then ICBS, WALA, that

2 (^2 ) (^0) n (^2) i 1 i

1 (x^ x) Var(y )ˆ n (^) (x x) =

∑

= σ (^) ⎢ + ⎥ ⎢ − ⎥ ⎣ ⎦

where an estimate of σ^2 is

2 2 n i 1 i^ i

ˆ s 1 (y ˆ n 2 =

σ = = (^) ∑ − −

y )^2

This allows us to construct a

100 1 ( − α ) % C.I. forμy|x 0

(^12) 2 0 / 2 n 2 0 n (^2) i 1 i

yˆ t s 1 (x^ x) α − n (^) (x x) =

∑

± ⎢^ + − ⎥