# regression basics predicting a dv with a single iv

Click here to load reader

Post on 17-Dec-2015

217 views

Embed Size (px)

TRANSCRIPT

- Slide 1
- Regression Basics Predicting a DV with a Single IV
- Slide 2
- Questions What are predictors and criteria? Write an equation for the linear regression. Describe each term. How do changes in the slope and intercept affect (move) the regression line? What does it mean to test the significance of the regression sum of squares? R-square? What is R-square? What does it mean to choose a regression line to satisfy the loss function of least squares? How do we find the slope and intercept for the regression line with a single independent variable? (Either formula for the slope is acceptable.) Why does testing for the regression sum of squares turn out to have the same result as testing for R- square?
- Slide 3
- Basic Ideas Jargon IV = X = Predictor (pl. predictors) DV = Y = Criterion (pl. criteria) Regression of Y on X e.g., GPA on SAT Linear Model = relations between IV and DV represented by straight line. A score on Y has 2 parts (1) linear function of X and (2) error. (population values)
- Slide 4
- Basic Ideas (2) Sample value: Intercept place where X=0 Slope change in Y if X changes 1 unit. Rise over run. If error is removed, we have a predicted value for each person at X (the line): Suppose on average houses are worth about $75.00 a square foot. Then the equation relating price to size would be Y=0+75X. The predicted price for a 2000 square foot house would be $150,000.
- Slide 5
- Linear Transformation 1 to 1 mapping of variables via line Permissible operations are addition and multiplication (interval data) Add a constantMultiply by a constant
- Slide 6
- Linear Transformation (2) Centigrade to Fahrenheit Note 1 to 1 map Intercept? Slope? 1209060300 Degrees C 240 200 160 120 80 40 0 Degrees F 32 degrees F, 0 degrees C 212 degrees F, 100 degrees C Intercept is 32. When X (Cent) is 0, Y (Fahr) is 32. Slope is 1.8. When Cent goes from 0 to 100 (run), Fahr goes from 32 to 212 (rise), and 212-32 = 180. Then 180/100 =1.8 is rise over run is the slope. Y = 32+1.8X. F=32+1.8C.
- Slide 7
- Review What are predictors and criteria? Write an equation for the linear regression with 1 IV. Describe each term. How do changes in the slope and intercept affect (move) the regression line?
- Slide 8
- Regression of Weight on Height HtWt 61105 62120 63120 65160 65120 68145 69175 70160 72185 75210 N=10 M=67M=150 SD=4.57SD= 33.99 Correlation (r) =.94. Regression equation: Y=-316.86+6.97X
- Slide 9
- Illustration of the Linear Model. This concept is vital! Consider Y as a deviation from the mean. Part of that deviation can be associated with X (the linear part) and part cannot (the error).
- Slide 10
- Predicted Values & Residuals NHtWtY'Resid 161105108.19-3.19 262120115.164.84 363120122.13-2.13 465160136.0623.94 565120136.06-16.06 668145156.97-11.97 769175163.9411.06 870160170.91-10.91 972185184.840.16 1075210205.754.25 M67150150.000.00 SD4.5733.9931.8511.89 V20.891155.561014.37141.32 Numbers for linear part and error. Note M of Y and Residuals. Note variance of Y is V(Y) + V(res).
- Slide 11
- Finding the Regression Line Need to know the correlation, SDs and means of X and Y. The correlation is the slope when both X and Y are expressed as z scores. To translate to raw scores, just bring back original SDs for both. To find the intercept, use: (rise over run) Suppose r =.50, SD X =.5, M X = 10, SD Y = 2, M Y = 5. Slope InterceptEquation
- Slide 12
- Line of Least Squares We have some points. Assume linear relations is reasonable, so the 2 vbls can be represented by a line. Where should the line go? Place the line so errors (residuals) are small. The line we calculate has a sum of errors = 0. It has a sum of squared errors that are as small as possible; the line provides the smallest sum of squared errors or least squares.
- Slide 13
- Least Squares (2)
- Slide 14
- Review What does it mean to choose a regression line to satisfy the loss function of least squares? What are predicted values and residuals? Suppose r =.25, SD X = 1, M X = 10, SD Y = 2, M Y = 5. What is the regression equation (line)?
- Slide 15
- Partitioning the Sum of Squares Definitions = y, deviation from mean Sum of squares (cross products drop out) Sum of squared deviations from the mean = Sum of squares due to regression + Sum of squared residuals reg error Analog: SS tot =SS B +SS W
- Slide 16
- Partitioning SS (2) SS Y =SS Reg + SS Res Total SS is regression SS plus residual SS. Can also get proportions of each. Can get variance by dividing SS by N if you want. Proportion of total SS due to regression = proportion of total variance due to regression = R 2 (R-square).
- Slide 17
- Partitioning SS (3) Wt (Y) M=150 Y'Resid (Y-Y') Resid 2 1052025108.19-41.811748.076-3.1910.1761 120900115.16-34.841213.8264.8423.4256 120900122.13-27.87776.7369-2.134.5369 160100136.06-13.94194.323623.94573.1236 120900136.06-13.94194.3236-16.06257.9236 14525156.976.9748.5809-11.97143.2809 175625163.9413.94194.323611.06122.3236 160100170.9120.91437.2281-10.91119.0281 1851225184.8434.841213.8260.160.0256 2103600205.7555.753108.0634.2518.0625 Sum = 1500 104001500.010.019129.307-0.011271.907 Variance1155.56 1014.37 141.32
- Slide 18
- Partitioning SS (4) TotalRegressResidual SS104009129.311271.91 Variance1155.561014.37141.32 Proportion of SS Proportion of Variance R 2 =.88 Note Y is linear function of X, so.
- Slide 19
- Significance Testing Testing for the SS due to regression = testing for the variance due to regression = testing the significance of R 2. All are the same. k=number of IVs (here its 1) and N is the sample size (# people). F with k and (N-k-1) df. Equivalent test using R-square instead of SS. Results will be same within rounding error.
- Slide 20
- Review What does it mean to test the significance of the regression sum of squares? R-square? What is R-square? Why does testing for the regression sum of squares turn out to have the same result as testing for R-square?