ch. 12– part 2 sec 12.6: correlation and regression

19
Ch. 12– part 2 Sec 12.6: Correlation and Regression

Upload: ronald-gardner

Post on 12-Jan-2016

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Ch. 12– part 2Sec 12.6: Correlation and Regression

Page 2: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Intro-- review h.s. algebra, graphing, slope, y-intercept…

Before we get started, let's review algebra: Plot the following lines and discuss the slope

and y-intercept: y=2x-4 y= -2x +4 y= -3x +6 y = (1/2)x -4

Page 3: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Correlation

• r = 1,…

Page 4: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Calculation formula for Correlation

Calculation formula for Correlation (pg 125)

r =

Page 5: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Ex#1: x=hours sleep, y=typing speed

X Y X 2 Y 2 xy

8 30

6 20

12 45

Page 6: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Calculate r

r=

Page 7: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Regression- notes

• Choice of variable names often differ in books. In our book, the equation of the least-squares regression line is y=a+bx

• However, our calculators use y=ax+b. So we’ll use this.– a = slope– b = y-intercept

Page 8: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Directions– correlation/ regression for ex#1 on the TI30XII

1. After turning on, go to EXIT STAT (2nd STATVAR) to clear old work. (It will either clear it or give you an error if it was empty).

2. Go to STAT (2nd DATA)3. Select 2-VAR (Recall, earlier in the semester when we were

doing standard deviations that we selected 1-VAR).4. Go to DATA and input 5. Go to STATVAR. Scroll through to see mans, standard

deviations, and summations for both x and y. At the end is a (the slope of the regression line, known as b1 in our book), b (the y-intercept in the regression line (b0 in our book), and r (the correlation coefficient).

6. Go to EXIT STAT (2nd STATVAR) to clear your work before doing another example or before returning one of my calculators.

Page 9: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Calculator results

• Calculator reads: 26 = 95 = 244 = 3325 = 900 a = slope=4.107 b = -3.929 r = correlation = 0.9972So regression line is = 4.107x – 3.929

Page 10: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Interpretation

y-intercept: If I get no sleep, my typing speed is -3.929

slope: For every hour of sleep, my typing speed goes up 4.107 words per minute.

Page 11: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Prediction

• Y= 4.107x – 3.929

Page 12: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Directions on the TI83 or 84:

1. To make sure r appears, go to CATALOG and select DIAGNOSTIC ON

2. Clear lists: Go to STAT/Edit: Pick 4. Type "ClrList L1" or ClrList L1, L2"

3. Enter data: Go to STAT/Edit Pick 1. Edit. Enter your list of numbers.

4. For regression: Go to STAT/CALC and pick 4. LinReg(ax+b)5. Optional: If r still doesn't appear: Go to STAT/TESTS and

pick E: LinRegTTest and go down to CALCULATE. It will tell you a, b, and r.

Page 13: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Ex #2

Page 14: Ch. 12– part 2 Sec 12.6: Correlation and Regression

r

Page 15: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Example #3 (use a calculator)Predictor: x= snowfall in inchesResponse Variable: y= times snowplow plows

x y Oct 5 1Nov 18 3Dec 25 4Jan 18 4Feb 60 12Mar 12 2Apr 10 1

Page 16: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Page 17: Ch. 12– part 2 Sec 12.6: Correlation and Regression

Example #4predictor X=ave monthly temperatureresponse Y=gas bill

x y Jan 32 250Feb 25 280Mar 39 165Apr 45 130May 59 30Jun 70 25Jul 80 20Aug 85 25Sept 70 45Oct 50 85Nov 40 110Dec 25 180

Page 18: Ch. 12– part 2 Sec 12.6: Correlation and Regression

• Multiple regression– see Minitab demo…

Page 19: Ch. 12– part 2 Sec 12.6: Correlation and Regression

R-Sq

• R 2 gives a percentage for the amount of y that can be predicted from the predictor x

• Ex: