












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!













STAT 515 -- Chapter 11: Regression
In statistics, we usually deal with situations having random error, so exact predictions are not possible. This implies a probabilistic relationship between the 2 variables. Example: Y = breathalyzer reading X = amount of alcohol consumed (fl. oz.)
If we gather data ( X , Y ) for several individuals, we can use these data to estimate 0 and 1 and thus estimate the linear relationship between Y and X. First step: Decide if a straight-line relationship between Y and X makes sense. Plot the bivariate data using a scattergram (scatterplot). Once we settle on the “best-fitting” regression line, its equation gives a predicted Y-value for any new X-value. How do we decide, given a data set, which line is the best-fitting line?
Note that usually, no line will go through all the points in the data set. For each point, the error = (Some positive errors, some negative errors) We want the line that makes these errors as small as possible (so that the line is “close” to the points). Least-squares method: We choose the line that minimizes the sum of all the squared errors (SSE). Least squares regression line: Y ˆ ˆ 0 ˆ 1 X where 0 ^ ˆ and 1 ^ ˆ are the estimates of 0 and 1 that produce the best-fitting line in the least squares sense. Formulas for 0 ^ ˆ and ^ ˆ 1 : Estimated slope and intercept:
Example: Avoid extrapolation: predicting/interpreting the regression line for X-values outside the range of X in the data set. Model Assumptions Recall model equation: Y^ ^ ^0 ^ ^1 X ^ To perform inference about our regression line, we need to make certain assumptions about the random error component, . We assume:
(1) The mean of the probability distribution of is 0. (In the long run, the values of the random error part average zero.) (2) The variance of the probability distribution of is constant for all values of X. We denote the variance of by 2 . (3) The probability distribution of is normal. (4) The values of for any two observed Y-values are independent – the value of for one Y-value has no effect on the value of for another Y- value. Picture: Estimating 2 Typically the error variance 2 is unknown. An unbiased estimate of 2 is the mean squared error (MSE), also denoted s 2 sometimes. MSE = SSE
If we reject H 0 and conclude Ha is true, then we conclude that X does provide information for the prediction of Y. Picture: Recall that the estimate 1 ^ ˆ is a statistic that depends on the sample data. This ^ ˆ 1 has a sampling distribution. If our four SLR assumptions hold, the sampling distribution of ^ ˆ^1 is normal with mean 1 and standard deviation which we estimate by
Under H 0 : 1 = 0, the statistic s / SSxx ˆ 1 has a t-distribution with n – 2 d.f. Test for Model Usefulness One-Tailed Tests Two-Tailed Test H 0 : 1 = 0 H 0 : 1 = 0 H 0 : 1 = 0 H 0 : 1 < 0 H 0 : 1 > 0 H 0 : 1 ≠ 0 Test statistic: t = s / SSxx ˆ 1 Rejection region: t < -t t > t t > t/2 or t < -t/ P-value: left tail area right tail area 2*(tail area outside t ) outside t outside t Example: In the drug reaction example, recall 1 ^ ˆ = 0.7. Is the real 1 significantly different from 0? (Use = .05.)
Correlation The scatterplot gives us a general idea about whether there is a linear relationship between two variables. More precise: The coefficient of correlation (denoted r ) is a numerical measure of the strength and direction of the linear relationship between two variables. Formula for r (the correlation coefficient between two variables X and Y ): xx yy xy SS SS SS r
Most computer packages will also calculate the correlation coefficient. Interpreting the correlation coefficient:
Scatterplot of these data: Calculation will show that r = 0 for these data. Are the two variables related? Another caution: Correlation between two variables does not automatically imply that there is a cause-effect relationship between them. Note: The population correlation coefficient between two variables is denoted . To test H 0 : = 0, we simply use the equivalent test of H 0 : 1 = 0 in the SLR model. If this null hypothesis is rejected, we conclude there is a significant correlation between the two variables. The square of the correlation coefficient is called the coefficient of determination, r 2 .
Interpretation: r 2 represents the proportion of sample variability in Y that is explained by its linear relationship with X. SS yy SSE r^2 1 ( r^2 always between 0 and 1) For the drug/reaction time example, r 2 = Interpretation: Estimation and Prediction with the Regression Model Major goals in using the regression model: (1) Determining the linear relationship between Y and X (accomplished through inferences about 1 ) (2) Estimating the mean value of Y , denoted E( Y ), for a particular value of X. Example: Among all people with drug amount 3.5%, what is the estimated mean reaction time? (3) Predicting the value of Y for a particular value of X. Example: For a “new” individual having drug amount 3.5%, what is the predicted reaction time?
where t/2 based on n – 2 d.f. The extra “1” inside the square root shows the prediction interval is wider than the CI, although they have the same center. Note: A “Prediction Interval” attempts to contain a random quantity, while a confidence interval attempts to contain a (fixed) parameter value. The variability in our estimate of E( Y ) reflects the fact that we are merely estimating the unknown 0 and 1. The variability in our prediction of the new Y includes that variability, plus the natural variation in the Y- values. Example (drug/reaction time data): 95% CI for E( Y ) with X = 3.5:
95% PI for a new Y having X = 3.5: