Section 2.3, Review: Regression line: Predicts or
estimates a y value for a given x value.
Formula yhat= a + b x.
To predict
a y-value for a given x-value, plug the x into the formula and calculate.
To do it graphically, use the Up-and-Over method (Fig. 2.10, p.107):
Find the x, go straight up to the line, then go over to the y-axis; that
y-value is the predicted y.
a is y-intercept.
b
is slope: If x increases one unit, yhat increases b units.
Using SPSS to:
DRAW line(s):
In Chart Editor, (Chart/Options: Fit Line:
Linear Regression)
Calculate
formula, r:
Statistics button: Regression coefficients: check Estimates & Model
Fit (Descriptives is nice too)
Scroll output down to "Coefficients". B column. (Constant)
= a, number under it = b.
Beta column. This number is the correlation coefficient
r.
Regression coefficients
This is SPSS manual 2.1, p. 62.
Subgroups (handout)--defined
by a categorical "grouping" variable.
Graph:
Put the grouping variable into Set Markers By, as you make the scatterplot.
Then in Chart/Options: Fit Line, check Subgroups. You get
all the lines.
Calculate
line formula and correlation coefficient:
Analyze/Regression/Linear, move the grouping variable into
Selection
Variable box.
Then click Rule... You need to choose ONE subgroup, put its
EXACT value in here (e.g. F not f).
To do other subgroups, repeat.
Regression Formula yhat= a + b x. Predicts
or estimates a y value for a given x value.
We all get the same line from a batch of data because we use the "least-squares
best fit" criterion (pp. 107-8): we'll investigate this more closely later.
Facts (pp. 112-14)
| Hand in: Everything needs SPSS unless otherwise
noted!
Using SPSS to find correl. coeff. Hand in the scatterplots, write the r's, other info on your printout. p. 106, 2.28 speed, gas (real) p. 103, 2.23 calories (manual,sec. 0.10 tells how to delete. Save both data files. ) Below: Be sure to write down the Regression line equation! Raw SPSS output isn't enough. Subgroups: For the data of p103, 2.22 (metabolism), Print out a graph with the regression line for all the people, and another with 2 separate lines (M and F: Fit line:Subgroups). Use the "up and over" method of Fig. 2.10 p. 107, with a pencil and straightedge, to predict (graphically) the metabolic rate for a) a person of mass 45 kg. b) a female of mass 45 kg. c) a male of mass 45 kg. Write down your numerical answers, estimated from the graph scale.) Now do: 2.22 metabolism M/F (finding separate r's) Also find the equations of the two (M, F) regression lines. With "facts":
A: Practice fitting lines: Use the text website (as above) and try to fit at least 4 different data sets. Write down on your paper what you discovered (were your judgment errors consistent in any ways--did you have any surprises?) |
Read,
to discuss |
Optional |
| Sievers home | Math151-Fall01/DayS14.htm | 10 pm | 10/01/01 |