wf ed 540, class meeting 6, linear regression, 2016
TRANSCRIPT
Linear regressionDATA ANALYSIS27 SEPTEMBER 2016
Fitting a straight line through a swarm of bivariate data
Equation of a straight line
Y = a + bx
Linear regression lineY
X
(x, y)
e
a y = a + bx + e
b = y / x
Y = + X
Two hypotheses of interest… Is there no relationship between Y
and X in the population?• H0: yx = 0
Is the slope of the line = 0 in the population?• H0: = 0
Hypothesis tested about yx
Null hypothesis is H0: yx = 0
Alternate hypothesis is H1: yx ≠ 0
a = .05 Y = + X
Hypothesis tested about …Null hypothesis is H0: = 0
Alternate hypothesis is H1: ≠ 0
a = .05 Y = + X
Relationship betweencar mpg and car weight
Rscript
Console
Relationship betweencar mpg and car weight
Rscript
Console
a b
Relationship betweencar mpg and car weight
Rscript
Console
Relationship betweencar mpg and car weight
Rscript
Console
Relationship betweencar mpg and car weight
Rscript
Console
Confidence intervalsRscript
Console
Plot with regression line Rscript
Plot
Linear regressionDATA ANALYSIS27 SEPTEMBER 2016