Least Squares Regression

Slides:



Advertisements
Similar presentations
Least-Squares Regression Section 3.3. Correlation measures the strength and direction of a linear relationship between two variables. How do we summarize.
Advertisements

AP Statistics Section 3.2 C Coefficient of Determination
AP Statistics Section 3.2 B Residuals
AP Statistics.  Least Squares regression is a way of finding a line that summarizes the relationship between two variables.
CHAPTER 3 Describing Relationships
Haroon Alam, Mitchell Sanders, Chuck McAllister- Ashley, and Arjun Patel.
Regression, Residuals, and Coefficient of Determination Section 3.2.
C HAPTER 3: E XAMINING R ELATIONSHIPS. S ECTION 3.3: L EAST -S QUARES R EGRESSION Correlation measures the strength and direction of the linear relationship.
Section 3.2 Least-Squares Regression
Lesson Least-Squares Regression. Knowledge Objectives Explain what is meant by a regression line. Explain what is meant by extrapolation. Explain.
Least-Squares Regression Section 3.3. Why Create a Model? There are two reasons to create a mathematical model for a set of bivariate data. To predict.
AP STATISTICS LESSON 3 – 3 LEAST – SQUARES REGRESSION.
Least-Squares Regression: Linear Regression Section 3.2 Reference Text: The Practice of Statistics, Fourth Edition. Starnes, Yates, Moore.
Least Squares Regression Remember y = mx + b? It’s time for an upgrade… A regression line is a line that describes how a response variable y changes as.
^ y = a + bx Stats Chapter 5 - Least Squares Regression
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 3: Describing Relationships Section 3.2 Least-Squares Regression.
Response Variable: measures the outcome of a study (aka Dependent Variable) Explanatory Variable: helps explain or influences the change in the response.
Chapters 8 Linear Regression. Correlation and Regression Correlation = linear relationship between two variables. Summarize relationship with line. Called.
Describing Bivariate Relationships. Bivariate Relationships When exploring/describing a bivariate (x,y) relationship: Determine the Explanatory and Response.
Describing Relationships
CHAPTER 3 Describing Relationships
Bring project data to enter into Fathom
Chapter 4.2 Notes LSRL.
Sections Review.
LEAST – SQUARES REGRESSION
Statistics 101 Chapter 3 Section 3.
Linear Regression Special Topics.
CHAPTER 3 Describing Relationships
Chapter 3: Describing Relationships
AP Stats: 3.3 Least-Squares Regression Line
LEAST – SQUARES REGRESSION
Ice Cream Sales vs Temperature
Least-Squares Regression
Chapter 3: Describing Relationships
CHAPTER 3 Describing Relationships
^ y = a + bx Stats Chapter 5 - Least Squares Regression
Chapter 3: Describing Relationships
CHAPTER 3 Describing Relationships
Chapter 3: Describing Relationships
The SAT essay: Is Longer Better?
Least Squares Regression
Chapter 3: Describing Relationships
Chapter 3: Describing Relationships
Chapter 3: Describing Relationships
Least-Squares Regression
Chapter 3: Describing Relationships
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
Chapter 3: Describing Relationships
CHAPTER 3 Describing Relationships
Chapter 3: Describing Relationships
Chapter 3: Describing Relationships
CHAPTER 3 Describing Relationships
Chapter 3: Describing Relationships
CHAPTER 3 Describing Relationships
Section 3.2: Least Squares Regressions
Chapter 3: Describing Relationships
Chapter 3: Describing Relationships
Chapter 3: Describing Relationships
CHAPTER 3 Describing Relationships
Chapter 3: Describing Relationships
Chapter 3: Describing Relationships
Least Squares Regression Chapter 3.2
Chapter 3: Describing Relationships
9/27/ A Least-Squares Regression.
Chapter 3: Describing Relationships
Chapter 3: Describing Relationships
Correlation/Regression - part 2
Chapter 3: Describing Relationships
CHAPTER 3 Describing Relationships
Presentation transcript:

Least Squares Regression D3: 3.2a Target Goal: I can make predictions using a least square regression line. Hw: pg 162: 27 – 32, 36, 38, 40, 42, 62

LSRL: least squares regression line a model for the data a line that summarizes the two variables It makes the sum of the squares of the vertical distances of the data points as small as possible

The LSRL minimizes the total area of the squares. The LSRL makes the sum of the squares of these distances as small as possible. The LSRL minimizes the total area of the squares.

Regression Line Straight line Describes how the response variable y changes as the explanatory variable x changes. Use regression line to predict value of y for given value of x. Regression (unlike correlation) requires both an explanatory and response variable.

The dashed line shows how to use the regression line to predict. You can find the vertical distance of each point on the scatterplot from the regression line.

Predictions and Error Error (residual) = observed y – predicted ŷ We are interested in the vertical distance of each point on the scatterplot from the regression line. If we predict 4.9, and the actual value turns out to be 5.1, our error is the vertical distance. Error (residual) = observed y – predicted ŷ

Equation of the least squares regression line We have data on an explanatory variable x and a response variable y for n individuals. From the data, calculate the means x bar, y bar, sx, sy of the two variables, and their correlation r.

The Least Squares Regression Line (LSRL): ŷ = a + bx with slope, b = and intercept, a = y – b

ŷ = a + bx y: the observed value ŷ: the predicted value every LSRL passes through slope: rate of change We will usually not calculate by hand, we will use the calculator.

Exercise: Gas Consumption The equation of the regression line of gas consumption y on the degree-days x is: ŷ = 1.0892 + 0.1890x

Verifying ŷ = 1.0892+0.1890x Use your calculator to find the mean and standard deviation of both x and y and their correlation r from data in the following table.

x bar = = 22.31 Sx = = 17.74 y bar = = 5.306 Sy = = 3.368 r = 0.99526

Using what we’ve found, find the slope b and intercept a of the regression line from these. This Verifies ŷ = 1.0892+0.1890x except for round off error.

Least squares lines on the calculator Use the same data you entered into L1 and L2. (Turn off other plots & graphs.) Define the scatterplot using L1 and L2 and the use ZoomStat to plot.

Press STAT:CALC:(8)LinReg(a+bx):L1,L2,Y1:enter To enter Y1, VARS:Y-VARS:(1)FUNCTION} If r2 and r do not appear on your screen, press 2nd:0 (catalog). Scroll down to “DiagnosticOn” and press enter.

Press GRAPH to overlay the LSRL on the scatterplot. Note: verify LSRL equation at Y1 to be ŷ = 1.0892+0.1890x

Least-Squares Regression Interpreting a Regression Line Consider the regression line from the example “Does Fidgeting Keep You Slim?” Identify the slope and y-intercept and interpret each value in context. Least-Squares Regression The y-intercept a = 3.505 kg is the fat gain estimated by this model if NEA does not change when a person overeats. The slope b = -0.00344 tells us that the amount of fat gained is predicted to go down by 0.00344 kg for each added calorie of NEA.

Least-Squares Regression Prediction We can use a regression line to predict the response ŷ for a specific value of the explanatory variable x. Use the NEA and fat gain regression line to predict the fat gain for a person whose NEA increases by 400 cal when she overeats. Least-Squares Regression We predict a fat gain of 2.13 kg when a person with NEA = 400 calories.

Least-Squares Regression Interpreting Computer Regression Output A number of statistical software packages produce similar regression output. Be sure you can locate the slope b, the y intercept a, and the values of s and r2. Least-Squares Regression

The slope b = -2.9935 tells us that the amount of Pct is predicted to go down by 2.9935 units for each additional pair. The y-intercept a = 157.68 is the Pct estimated by this model when there are no pairs.