Linear Regression

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Given the table below where x is the amount of new fertilizer applied in kilograms and y is the yield of

kamote in kilograms.

Construct a scatter plot of the data below

X 1 1.5 2 2.5 3 3.5 4 4.5 3.75

Y 25 31 27 28 36 35 32 34 ?

Find the least square estimates of ß0 and ß1

From the least square estimates, approximately how many kilograms of

kamote do you expect from a plot to which 3.75 kg of fertilizer had been applied?

Amount of new
Yield of Kamote (y) X^2 XY
Fertilizer(x)

1 25 1 25

1.5 31 2.25 46.5

2 27 4 54

2.5 28 6.25 70

3 36 9 108

3.5 35 12.25 122.5

4 32 16 128

4.5 34 20.25 153

∑X=22 ∑y=248 ∑x^2=71 ∑xy=707


(  y )( x 2 )  (  x )( xy)
a 
n( x 2 )  ( x ) 2
n (  xy)  (  x )( y )
b 
n( x 2 )  ( x ) 2
y  a  bx

a=((248)(71)-(22)(707)) = 2054 = 24.45

(8(71)-(22)2) 84

b=(8(707)-(22)(248)) = 200 =2.38

(8(71)-(22)2) 84

Y= 24.45+(2.38)x

=24.45+2.38x

=24.45+2.38(3.75)

Y=33.38

Scatter Plot
y
40

35

30

25

20

15

10

0
0 1 2 3 4 5
A communication researcher wanted to measure the effect of television viewing on aggressive
behavior. He questioned a random sample of 14 children as to how many hours of television they
watch daily (X) and then, as a measure of aggression, observed the number of schoolmates they
physically attacked (shoved, pushed or hit) on the playground during a 15-minute recess (Y). The
following results were obtained:

X 0 6 2 4 4 1 1 2 5 5 4 0 2 6 3

Y 0 3 2 3 4 1 0 3 3 2 3 1 3 4 ?

Hours of Watching Measure of X2 XY


Television Daily(x) Aggression(y)

0 0 0 0

6 3 36 18
2 2 4 4

4 3 16 12

4 4 16 16

1 1 1 1

1 0 1 0

2 3 4 6

5 3 25 15

5 2 25 10

4 3 16 12

0 1 0 0

2 3 4 6

6 4 36 24

∑X=42 ∑y=32 ∑X2=184 ∑xy=124

(  y )( x 2 )  (  x )( xy)


a 
n( x 2 )  ( x ) 2
n (  xy)  (  x )( y )
b 
n( x 2 )  ( x ) 2
y  a  bx

a=((32)(184)-(42)(124)) = 680 = 0.84

(14(184)-(42)2) 812

b=(14(124)-(42)(32)) = 392 = 0.48

(14(184)-(42)2) 812

Y= 0.84+(0.48)x

=0.84+0.48x
=0.84+0.48(3)

Y= 2.28

Scatter Plot

Chart Title
4.5
4
3.5
3
2.5
2
1.5
1
0.5
0
0 1 2 3 4 5 6 7

You might also like