Download Simple Linear Regression - Research Design and Quantitative Methods - Lecture Slides and more Slides Quantitative Techniques in PDF only on Docsity!
Simple Linear Regression
One reason for assessing correlation is to
identify a variable that could be used
to predict another variable
If that is your intention –
the sample used for the assessment of the correlation must be
‘representative’ of the population within which you wish to make the
predictions.
Assume you would like to predict the scores that each of
you would get on Exam 2 in the course.
If we assume that you are a sample from the ‘population’ of
students who have taken this course, we could look at past performance to predict future performance.
If all you knew was that you were students from the same
population taking the same course – what would you predict for your Exam 2 scores?
For example, it turns out that grades on Exam 1 and grades on Exam 2 are
significantly correlated (r = .64), so they share some variance and knowing a
student’s Exam 1 grade should help predict her Exam 2 grade
Note ‘outlier’
Note that original data set produced this scatter plot
What is the problem?
Note ‘outlier’
Reduces r
from .64 to.
line of best fit (minimizes errors) -
where formula for points on line is
Y = a + bX
a is ‘intercept’: value of Y when X = 0
b is the slope of the line: change in Y
with each change in X
so all predicted scores (Yp) fall on the line of best fit
Y
X
Mean Y
Intercept- a
Y when
X = 0
Mean X
X
Y
slope
Y
X
Mean Y
Intercept- a
Y when
X = 0
Mean X
X
Y
slope Line of Best Fit would
minimize deviations of scores from regression line
The regression line of ‘best fit’
minimizes those errors of prediction
least squares regression line
Sum (Y actual – Y p )^2
by = r(SD y/SDx) If X and Y are converted to z scores, both SDs = 1, so by = r
b y also can be found by Covxy/Varx
- even though r is correlation of X & Y,
b will vary depending on which one is used
to predict other – changes which SD goes on top/bottom of ratio
ay = Mean Y – by (Mean X)
Value of Yp when X = 0
SSregression / SST = r^2
% of total variance in Y accounted for by X or --variance in Y explained by X
SSresidual / SST = 1 – r^2
% unexplained variance in Y (errors)
Variance of errors = SSresidual/df = MSresidual
Standard Error of Estimate = SQRT (MSresidual)
typical amount by which predicted score deviates from actual score Across each value of X, what is the typical deviation of actual from predicted scores of Y
Standard Error of Estimate
For predicting scores for any individual,
can estimate SEE for that prediction from
SEE (^) est = SEE * SQRT 1 + 1 + (X - Mx)^2 N (N-1) * (S (^) x^2 )
the error is higher as the score on X deviates from the Mean X, and with a smaller sample size used for making the estimate
Linear Regression
gpa
iq
A A A A A A A
iq = 53.05 + 16.99 * gpa R-Square = 0.
Mean IQ = 105 This would be your best ‘guess’ for every person if you had no useful predictor
Improvement
in Prediction
using GPA Residual – distance from the line
Residual much greater here
Mean GPA =3.
De scri ptive Statistics
105.0000 10.80123 7 3.0571 .52870 7
iq gpa
Mean St d. Deviation N
Model Summary
.832a^ .692 .630 6.
Model 1
R R Square
Adjusted R Square
Std. Error of the Estimate
a. Predictors: (Constant), gpa
Coefficientsa
53.049 15.702 3.378. 16.993 5.072 .832 3.351.
(Constant) gpa
Model 1
B Std. Error
Unstandardized Coefficients Beta
Standardized Coefficients t Sig.
a. Dependent Variable: iq
Predicted IQ = 53.05 + 16.99 (GPA) + error
approximate 95% CIs are + 2(6.57) for predicting
mean IQ of those with a given GPA
Although listed as R and R^2 in SPSS
regression output, these are, in Simple
Linear Regression analyses, just the
Pearson r and r 2
SPSS will report an ANOVA Table with
Regression output, but for the Simple Linear
Regression, all you need report is the t-value
(which has df = n-p-1; p = # of predictors) that
tests the significance of the single predictor (gpa)
in the Model (is r reliably different from 0).
Note that the Standardized
Coefficient, beta, which is the
regression coefficient when all
variables are standardized (z-
scores) is the same as r
Adjusted R^2 is adjusted for the sample size and
the number of predictors in the model. Since the
sample value will be an inflated estimate of the
value for R^2 in the population, use adjusted R^2
when applying results to the population.
Linear Regression w ith
95.00% Mean Prediction Interval
2.50 3.00 3. gpa
iq
A A A A A A A
iq = 53.05 + 16.99 * gpa
R-Square = 0.
Note that accuracy of predictions decreases as you move away from the means
95% confident that the ‘true’ line of best fit lies within the CIs
If you consider all the lines that might fall in the intervals, can see that variability increases as you move away from the ‘center’ (Mx, My)
Predicting grades for PSYC 6102 Exam 2 from Exam 1 scores
r = +.
Usual convention is to report regression constant and coefficient to 3 decimal places
Linear Regression w ith
95.00% Mean Prediction Interval
60.00 70.00 80.00 90.00 100. exam
exam
A
A A A A
A
A
A
A
A
A A A A
A
A A
A A
A A
A
A
A
A A
A
A
A
A A
A
A A
A A A A A
A
A A
A
A
A
A
A
A A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A A
A
A
A
A
A
A
A
A
A
A A
A
A
A
A A
A
A
A
A A
A
A
A
A A A
A A
AA
A A
A
A
A
A
A
A
A
A
A
A
exam 2 = 38.54 + 0.56 * exam 1
R-Square = 0.
Exam2 = 38.54 + .56 * Exam
R^2 =.