650 likes | 2.17k Views
Linear Regression - Topics. Basics of Linear Regression Variation in Linear Regression Linear Regression Analysis Goodness of Fit Standard Error terms for Linear Regression Hypothesis testing. Regression - Types. Linear Regression.
E N D
Linear Regression - Topics • Basics of Linear Regression • Variation in Linear Regression • Linear Regression Analysis • Goodness of Fit • Standard Error terms for Linear Regression • Hypothesis testing
Linear Regression • A statistical technique that uses a single, independent variable (X) to estimate a single dependent variable (Y). • Based on the equation for a line: Y = b + mX
e = b b + Y X i 0 1 Linear Regression - Model Y ? (the actual value of Yi) Yi X Xi
Linear Regression - Model Population Regression Coefficients for a . . . ˆ Sample Y = b0 + b1Xi + e ˆ Y = b0 + b1Xi
ANOVA CRD - Variation SST is a measure of the total variation of observations. A measure of the differences in observations. SSTR Due to treatments. SST SSE SST = SSTR + SSE Random/unexplained.
Linear Regression - Variation Ice Cream Example Y Y = 2.53
Linear Regression - Variation Ice Cream Example Sample Regression Line Regression Model
Linear Regression - Variation SSR Due to regression. SST SSE SST = SSR + SSE Random/unexplained.
Linear Regression - Variation Y SSE =(Yi-Yi )2 _ SST =(Yi-Y)2 _ SSR = (Yi -Y)2 _ Y X Xi
Determining the Regression Line/Model • Use Excel (or any other popular statistical software) • Select Tools, Data Analysis, Regression • Provide the X range • Provide the Y range • Output the analysis to a new sheet • Manual Calculations
_ SSy =(Yi - Y)2 _ _ SSxy =(Xi - X)(Xi - Y) SSE = S YX n-2 Determining the Regression Line/Model Manual Calculations _ _ SSE =(Yi-Yi )2 SSR = (Yi -Y)2 SST =(Yi-Y)2 _ b1=SSxy/SSx SSx =(Xi - X)2 _ _ b0 = Y – b1X MSE = SSE / df MSR = SSR / df R2 = SSR/SST t-test = b1 / Sb1
Measures of Model Goodness • R2 – Coefficient of Determination • F-test > F-crit or p-value less than alpha • Standard Error • t-test
Hypothesis testing for • Testing to see if the linear relationship between X and Y is significant at the population level. • t-test • Follow the 5-step process • H0: HA: • t-crit, alpha or alpha/2, n-2 df
Standard Error Terms in Linear Regression • Se(standard error of the estimate) A measure of variation around the regression line If the Se is small… Standard deviation Of the Errors • Sb1(standard error of the the sampling distribution of b1) Standard deviation of the slopes A measure of the variation of the slopes from different samples If the Sb1 is small…our b1 estimate is probably very accurate Estimates of … b1 b1 b1
Linear Regression Example • Petfood, Estimate Sales based on Shelf Space • Two sets of samples, 12 observations each • Perform a Regression Analysis on both sets of data Sample1 Sample2