Ch. 10 – Linear Regression (Day 2)

Slides:



Advertisements
Similar presentations
Chapter 3 Examining Relationships Lindsey Van Cleave AP Statistics September 24, 2006.
Advertisements

Residuals.
Linear Regression (C7-9 BVD). * Explanatory variable goes on x-axis * Response variable goes on y-axis * Don’t forget labels and scale * Statplot 1 st.
Chapter 8 Linear regression
Chapter 8 Linear regression
Chapter 8 Linear Regression © 2010 Pearson Education 1.
Scatter Diagrams and Linear Correlation
VCE Further Maths Least Square Regression using the calculator.
Correlation with a Non - Linear Emphasis Day 2.  Correlation measures the strength of the linear association between 2 quantitative variables.  Before.
1 Chapter 3: Examining Relationships 3.1Scatterplots 3.2Correlation 3.3Least-Squares Regression.
Correlation Correlation measures the strength of the LINEAR relationship between 2 quantitative variables. Labeled as r Takes on the values -1 < r < 1.
Ch 3 – Examining Relationships YMS – 3.1
Notes Bivariate Data Chapters Bivariate Data Explores relationships between two quantitative variables.
AP STATISTICS LESSON 3 – 3 LEAST – SQUARES REGRESSION.
Correlation & Regression – Non Linear Emphasis Section 3.3.
Chapter 3 Section 3.1 Examining Relationships. Continue to ask the preliminary questions familiar from Chapter 1 and 2 What individuals do the data describe?
Notes Bivariate Data Chapters Bivariate Data Explores relationships between two quantitative variables.
Relationships If we are doing a study which involves more than one variable, how can we tell if there is a relationship between two (or more) of the.
Stat 13, Tue 5/29/ Drawing the reg. line. 2. Making predictions. 3. Interpreting b and r. 4. RMS residual. 5. r Residual plots. Final exam.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 3 Describing Relationships 3.2 Least-Squares.
Warm-Up Write the equation of each line. A B (1,2) and (-3, 7)
Chapter 2 Examining Relationships.  Response variable measures outcome of a study (dependent variable)  Explanatory variable explains or influences.
AP Statistics HW: p. 165 #42, 44, 45 Obj: to understand the meaning of r 2 and to use residual plots Do Now: On your calculator select: 2 ND ; 0; DIAGNOSTIC.
Residuals Recall that the vertical distances from the points to the least-squares regression line are as small as possible.  Because those vertical distances.
^ y = a + bx Stats Chapter 5 - Least Squares Regression
LEAST-SQUARES REGRESSION 3.2 Least Squares Regression Line and Residuals.
Warm-up O Turn in HW – Ch 8 Worksheet O Complete the warm-up that you picked up by the door. (you have 10 minutes)
Copyright © 2009 Pearson Education, Inc. Chapter 8 Linear Regression.
AP Statistics Review Day 1 Chapters 1-4. AP Exam Exploring Data accounts for 20%-30% of the material covered on the AP Exam. “Exploratory analysis of.
Describing Relationships. Least-Squares Regression  A method for finding a line that summarizes the relationship between two variables Only in a specific.
CHAPTER 3 Describing Relationships
Statistics 101 Chapter 3 Section 3.
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
Section 3.2: Least Squares Regression
Unit 4 Lesson 4 (5.4) Summarizing Bivariate Data
Chapter 5 Lesson 5.3 Summarizing Bivariate Data
Examining Relationships Least-Squares Regression & Cautions about Correlation and Regression PSBE Chapters 2.3 and 2.4 © 2011 W. H. Freeman and Company.
Ch. 10 – Scatterplots, Association and Correlation (Day 1)
Cautions about Correlation and Regression
Warm Up Go ahead and start wrapping up your Guess My Age projects.
Regression and Residual Plots
Day 13 Agenda: DG minutes.
r = The correlation between price and calories is 0. 79
Least-Squares Regression
EQ: How well does the line fit the data?
CHAPTER 3 Describing Relationships
Least-Squares Regression
^ y = a + bx Stats Chapter 5 - Least Squares Regression
CHAPTER 3 Describing Relationships
GET OUT p.161 HW!.
Introduction to Probability and Statistics Thirteenth Edition
Chapter 3 Describing Relationships Section 3.2
Least-Squares Regression
Least-Squares Regression
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
3.2 – Least Squares Regression
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
A medical researcher wishes to determine how the dosage (in mg) of a drug affects the heart rate of the patient. Find the correlation coefficient & interpret.
9/27/ A Least-Squares Regression.
Chapter 3: Describing Relationships
Homework: PG. 204 #30, 31 pg. 212 #35,36 30.) a. Reading scores are predicted to increase by for each one-point increase in IQ. For x=90: 45.98;
Solution to Problem 2.25 DS-203 Fall 2007.
CHAPTER 3 Describing Relationships
Presentation transcript:

Ch. 10 – Linear Regression (Day 2)

Things to check before you calculate a regression line… Are the two variables quantitative? Like correlation, regression only works for quantitative variables Does the scatterplot indicate a straight line relationship? It doesn’t make sense to create a linear model if the data isn’t linear Are there any outliers? An outlier can throw off the line significantly

Drawing the line on the scatterplot

Residuals (again) Calculating residuals does more than just tell us how far off a single prediction is After we fit a regression model, plotting the residuals for all of the data points helps us to assess how well our model works If the model is a good fit for the data, we should see nothing interesting in the residual plot The residuals are usually plotted against x, but are sometimes plotted against ŷ (the predicted values of y), and occasionally against other variables

Plotting the Residuals Find the residuals for our fertilizer problem Fertilizer Bushels Predicted Bushels Residuals 31 43 33 44 40 45 50 54 59 53 68 80 63 43.0225 –0.0225 43.8535 0.1465 46.762 –1.762 50.917 3.083 54.6565 –1.6565 58.396 0.604 63.382 –0.382

Plotting the Residuals Now plot the residuals against x Residuals Fertilizer(lbs) 30 80 3 -2 30 -2 4 80

On Your Calculator Every time you use your calculator to fit a regression model, it automatically stores a list titled “RESID” containing all of the residuals for that regression You can use this list as the “YList” in your STAT PLOT menu to draw a scatterplot of the residuals against the x values (or anything else)

What the Graph Tells Us This residual plot shows no particular patterns – that’s a good thing! It means that this model appears to be the best we can fit to the data Residuals Fert-ilizer 30 80 3 -2

When Residuals Send a Message If a the residual plot has this pattern, it means that our predictions are less accurate for larger values of x or for larger values of ŷ (or over time, depending on what the residuals are plotted against)

When Residuals Send a Message If a residual plot is curved, it tells us that our data was not as linear as we thought, and perhaps a nonlinear model should be used Residual plots can also accentuate outliers

The Accuracy of the Model We should also look at the size of the residuals – they should be small relative to the size of the values of the response variable Measuring the standard deviation of the residuals (se) gives us a good idea of how closely our predictions match reality Residuals Fert-ilizer 30 80 3 -2

Another example… Draw a scatterplot x y 3 9.4 4 14.9 5 23.2 6 37.2 7 50.1 8 62.9 12

Find the equation of the least squares regression line and draw it on your scatterplot Plot the residuals and comment on the fit of the linear model Since there is a clear pattern, a linear model is not a good fit for this set of data

R2 – The Variation Accounted for by the Model Linear regression is closely connected to correlation Remember that the correlation coefficient (r) tells us how strong an association is between two variables It makes sense that the stronger the linear association, the better a linear model will describe that association In fact, r2 (sometimes shown as R2) tells us something very specific about the usefulness of our model

R2 – The Variation Accounted for by the Model R2 tells us the proportion of the variation in our response variable that is explained by the association it has with the x-variable For the fertilizer problem, r2 = .9568 95.68% of the variation in the number of bushels produced is explained by this model This reminds us that other factors contribute to bushels produced (sun, rain, etc.)

Homework Pg. 551 # 28, 30 Draw a scatterplot Find the Least squares regression line and draw it on your scatterplot Graph a residual plot Interpret R ^2