Math 151 , Spring '07, Monday Day 16, March 5,Hit reload.. .After class

HW assignment Day 16
Reading:  Ch. 5, Regression, thru p. 125  Exam 2 will NOT cover the equation of the least-squares line (p. 120) or Fact 2, p.123 except to know that the slope of the line and r have the same sign (+ or -).  (check p. 137:  5.14 through 20, basic line and regression line facts and tools.  21 r and slope signs, 22 is harder--changing units--don't worry about it. 23 If you sketch the graph and draw a line thru the points, you should be able to guesstimate the slope well enough to choose among the 3 answers.)  Rest not on exam: Next, the equation of the least-squares line (p. 120) & Fact 2, p.123. Continuing regression, p. 126-137.
 Regression, Due Wed.  Bring questions for exam, also Problems in this color were given also on W. Day 14, to work ahead.  Repeated here.
 C. Use the SPSS Scatterplot handout and graph  the regression line for govsal on avgpay (as shown, back page), also the lines for the 4 separate groups (either on one graph or on panels.) Print them out and keep them.  Answer questions 6-9, 11, on p. 3 of the handout.  Keep with the previous ones till you can answer all questions.(only 10, 12 to go)
Hand in Wednesday--
p. 118, 5.1  IQ and reading scores. Graph, slope, predict.  notice we don't have a scatterplot of the data, only this straight-line summary.
p. 118, 5.2 equation from info.   As written, this is an algebra problem, not too hard, but not  in the main focus of the course.  I will tell you that the intercept is -50, and  now the question is in the main focus of the course.    That is, what is the slope, and what is the equation?
p. 122, 5.4 (SPSS) Sparrowhawk colonies  Use SPSS to make the scatterplot, with the line, and find r.  Do (c) and (d) by hand.    Now use the "up and over" method of Fig. 5.1, p.116, with a pencil and straightedge to mark the predicted value from (d) on the y-scale. Write down your computed answer next to it.  Make sure the 
 two  methods give consistent answers.
p. 139, 5.24
Penguins diving
p. 148, 5.54 (Applet) regression suitability
p. 140, 5.26 (SPSS) sisters & brothers
p. 146, 5.42 (SPSS) A computer circle game  The last part of the last question, "Give numerical measures that describe the success of the two regressions,"  is asking for you to use Fact 4.

A .  Use the Excel RSquared page. ( R-Squared (or RSquared.xls: ClassMaterial\Math151BPS4e\RegressionDemosExcel BPS4e)If R-Squared doesn't have "repaired 10/3/06 in cell 2-o, use this link: R-Squared2 )). Shift points around and get an r2 close to .8 (80%) (Between .75 and .85 is good enough.).  Note that if r = +.9, then  r2 = .81.   Now shift the points so that r is negative and r2 is close to .8.  Print the resulting page to hand in. (Data and graph)

Income depends on height?! Read the article at the link and answer this.
If your browser doesn't get the link, it's at http://aurora.wells.edu/~srs/Math151-Sp07/tallpeoplewin.htm 
  a)What is "$789", and what kind of analysis did they do? 
  b)What does my footnote at the end tell you about the data that the article did not?

 B. With  the SPSS Scatterplot handout, now do #10 also.  (keep them all till we do #12)
Read, 
to 
discuss
Regression:  Use
http://www.whfreeman.com/bps4e
Correlation and Regression applet  to do p. 148, 5.55 , guessing lines


 Look at this especially, with reference to the r standard deviations in y for every 1 standard deviation in x: A. Open the Excel file RegressionSlope (or in the folder RegressionDemosExcelBPS4e  in ClassMaterial\Math151-BPS4e).  Change x-y values in the yellow boxes and watch the line change.  Change x-values in col. F and watch the "run" (red line) change, in the rightmost 2 graphs. Notice the slope = the coefficient of x = the rise/run = increase in y per unit increase in x.  Fix it so the increase in x (the "run") is exactly 1.   Also, look at the leftmost graph, where the length of the standard deviations are shown, and note that in standard-deviation units, the rise is r s.d.'s in y for each s.d. run in x.  (Fact 2)
Op 
tion 
al 

 

= = = = = = = = = = = = = = = = = = = = = =
Exam 2 this Friday: Day 18 (March 9).  Starts with Ch. 3, Normal distrib.  Thru Ch. 4, and what we cover of Ch.5 today. (All of today's notes, and HW) One sheet of notes: I will give you paper copies of the Normal table.
Sample exam available today (one for each student-- outside my door after class,  and linked Here.(Exam will cover all the problems given)). 
     Solutions: 2 outside my door, 2 on reserve, linked here
 

Jennifer Chi'eng is joining the Math Clinic staff,
specializing in statistics (and will share HW reading with Anna).
   Her hours are

Mondays & Wednesdays
8:30 p.m. - 10:30 p.m.
Thursdays
3:00 p.m. - 7:00 p.m.
Are you having trouble seeing which variable goes on the x axis?  If there is any sense that one is the cause of the other, or can/will be used to predict or estimate the other,   that's the explanatory (x) variable.  The other one is the response (y) variable.  (Sometimes you can choose the x-values and see the response for that x, in the corresponding y:  like the corn plant density problem (It's an experiment, Ch.9.)  Sometimes you can only observe.)  Language: Regress  heating oil ON temperature:  Temperature = x = horizontal, Heating oil = y = vertical.

HW questions?
Day 14
   Leftover:  Timeplots:  are scatterplots, where the x axis shows time. (Time is often a lurking variable: plot data against order of taking observations)
- - - - - - - - - - -
Regression line: Ch. 6, Predicts or estimates a y (vertical) value for a given x (horizontal) value:   Straight line!
     "Regressing y ON x" .
  P110, 4.28, corn plant density.  Made a regression CURVE!  (Well, broken line...)
"Regression" with no other description means "Least squares best fit line"--STRAIGHT line.

Experimenting  http://www.whfreeman.com/bps4e,  Correlation and Regression Applet.
SPSS--back of handout.  Govsal on avgpay

Formula yhat = a + b x.    Govsal = a + b avgpay   Govsal = 28,569.69 + 2.71*avgpay
         To predict or estimate a y-value for a given x-value, plug the x value into the formula and calculate.
                To do it graphically, use the Up-and-Over method (Fig. 5.1, p.116):
                    Find the x, go straight up to the line, then go over to the y-axis; that y-value is the predicted y.
         Calculating:  Montana (17,895, 55,502)   Govsal = 28,569.69 + 2.71*avgpay
           Predicted Govsal = 28,569.69 + 2.71*17,895 = 28,569.69 + 48,495.45 = 77,065.14  (higher than actual)

(Graphing a straight line:  pick an x-value at one end of the useful range.  Plug in to the formula and calculate the corresponding y.  Graph the (x,y) pair.  Repeat with an x value at the other end of the range.  Connect the 2 dots with a line (see pretest).  Insurance:  Pick a third x and calculate the y.  This point must also lie on the line, if you did it right.)

 a is y-intercept. is slope:  If x increases one unit, yhat increases b units.  
  If you know that yhat increases 12 units for every one that x increases, you know that the slope of the line b = 12. 
            Governor's salaries increase (on the average across the states)  $2.71 for every increase of  $1 of average pay.
     This is a summary  of the linear relationship, in the same way that the mean of a distribution is one summary of the distribution.  Particular states won't match this exactly.

 (In a straight-line relationship, the amount that y increases for one unit increase in x is the same no matter what value of x you start with)  RegressionSlope.xls or in ClassMaterial\Math151-BPS4e \RegressionDemos Excel BPS4e

Income depends on height?!
    What is "$789", and what kind of analysis did they do?  (HW)

We all get the same line from a batch of data because we use the "least-squares best fit" criterion (p. 119): we'll investigate this more closely later.

Facts:  1, 2 lite, 3 first.  Then 4.   Then 2 &Formulas p. 120, from 2&3.  

Facts (Moore pp. 123-125)

  1. Which is explanatory, which is response, is crucial for regression!  The Regression line is trying to predict the "average y" for a given x (with the added requirement that it is a straight line).  See "residual" lines for govsal on avgpay.

  2. Unless the data lies perfectly on a straight line, the line for predicting weight from height -- "regressing weight on height" --(for example) will NOT be the same line as that for predicting height from weight--"regressing height on weight".  (In-class demonstration. Yes, on overhead projector.) (Example 5.3, Fig. 5.4 pp.123-4 is about this. )
     
  3. Lite:  The correlation coefficient r and the slope b of the regression line have the same sign!  + or - .
       Negative/positive:  trend=slope ~association~correlation
    Heavy: A change of one standard deviation in x corresponds to a change of r standard deviations in y, along the regression line.  We'll return to this, after the exam.

  4. The regression line goes through the point given by the two means, (xbar, ybar). http://www.whfreeman.com/bps4e
    We'll return to this, after the exam.

  5. r2 ("Coefficient of Determination") = fraction of the variation in y-values explained/predicted by knowing x and using the least squares regression line.  (Exactly what that means mathematically is hard.  Just get used to it as a measurement.) More:R-Squared (or R-squared tab in ResidualsRSquared.xls: ClassMaterial\Math151\RegressionDemos)

  6. r2 is the square of the correlation coefficient r!  (-, + Sign gets lost.)
    If r = .7, about half (.49) of the variation  in the y's is explained by using the regression line relationship to predict y from x. (If weight and height have a correlation of .7, then half of the variability in weight can be explained by knowing height. Or vice versa...)

Sievers home  Math151-Sp07/Daysp16.htm  3pm 3/5/07
This page belongs to Sally Sievers who is solely responsible for its content. Please see our statement of responsibility.