Simple Linear Regression

Size: px
Start display at page:

Download "Simple Linear Regression"

Transcription

1 Simple Linear Regression OI CHAPTER 7 Important Concepts Correlation (r or R) and Coefficient of determination (R 2 ) Interpreting y-intercept and slope coefficients Inference (hypothesis testing and confidence intervals) on y-intercept (! " ), slope (! # ), and mean response ($ % =! " +! # () Prediction for a new value of the response, % =! " +! # ( + ) Extrapolation = using the model to make predictions for (-values outside the range of observed data Checking regression assumptions Detecting outliers and influential points: leverage (hat values) and Cook s distance 2 Manatee Deaths Example: Manatees Manatee Deaths vs. Powerboat Registrations Least-squares regression line ŷ = x Linear Regression in R Estimated regression coefficients Powerboat Registrations (in thousands) 3 4 Interpret Regression Coefficients ŷ = x How do we interpret the intercept? If a year has no powerboat registrations (x = 0), we would expect about -41 manatee deaths. (not meaningful). Not a valid prediction since the number of powerboat registrations in the data set only ranged from about 450,000 to 700,000, so predicting for x = 0 is extrapolating outside the range of observed data. 5 Interpret Regression Coefficients ŷ = x How do we interpret the slope? For every additional 1000 powerboat registrations, we estimate the average number of manatee deaths would increase by That is, for every additional eight thousand powerboat registrations, we predict approximately one (0.12 8) additional manatee death. 6

2 Predictions Let x = 500. Then ŷ = (500) =18.57 Interpretation? 1. An estimate of the average number of manatee deaths across all years with 500,000 powerboat registrations is about 19 deaths. 2. A prediction for the number of manatee deaths in one particular year with 500,000 powerboat registrations is about 19 deaths. Residuals (Prediction Errors) Individual y values can be written as: y = predicted value + prediction error or y = fitted value + residual or y = ŷ + residual For each observation, residual = observed predicted = y ŷ 7 8 Manatee Deaths Ex: Manatees ŷ = x Residual = Vertical distance from the observed point to the regression line. Manatee Deaths vs. Powerboat Registrations Observation (526, 15): Observed Response = 15 Predicted Response = (526) = 24.3 Residual = = 9.3 Observation (559, 34): Observed Response = 34 Predicted Response = (559) = Residual = = Powerboat Registrations (in thousands) 9 What do we mean by least squares? Basic Idea: Minimize how far off we are when we use the line to predict y, based on x, by comparing to the actual y. Definition: The least squares regression line is the line that minimizes the sum of the squared residuals for all points in the data set. The sum of squared errors = SSE is that minimum sum: n SSE = ( y i ŷ i ) 2 = (residual) 2 i=1 all values 10 Ex: Manatees Least squares regression line: ŷ = x x y ŷ Residual (447) = = (460) = = (481) = = 5.4 Can compute the residuals for all 14 observations. Positive residual => observed value higher than predicted. Negative residual => observed value lower than predicted. The least squares regression line is such that SSE = (-1.4) 2 + (5.0) 2 + (5.4) 2 + is as small as possible. 11 Properties of Correlation: r Magnitude of r indicates the strength (how close are the points to the regression line?) of the linear relationship. Values close to 1 or close to 1 à strong linear relationship Values close to 0 à no or weak linear relationship Sign of r indicates the direction (when one variable increases, does the other generally increase (positive association) or generally decrease (negative association)) of the linear association. r > 0 à positive linear association r < 0 à negative linear association 12

3 General Guidelines for Describing Strength Manatees Value of r Strength of Linear relationship -1.0 to -0.5 OR 0.5 to 1.0 Strong linear relationship -0.5 to -0.3 OR 0.3 to 0.5 Moderate linear relationship -0.3 to -0.1 OR 0.1 to 0.3 Weak linear relationship -0.1 to 0.1 No or very weak linear relationship The table above serves only as a rule of thumb (many experts may somewhat disagree on the choice of boundaries). Number of Manatee Deaths Manatee Deaths vs. Powerboat Registrations r = Very strong positive linear association Source: Powerboat Registrations (in thousands) 14 Measuring Strength of Linear Association The following scatterplots are arranged from strongest positive linear association (on the left) to those with virtually no linear association (in the middle) to those with the strongest negative linear association (on the right). Measuring Strength of Linear Association Positive ß None à Negative Strong ß Weak Weak à Strong Take a couple minutes and try to guess the correlation for each plot. 15 Get more practice at guessing the correlation and impress your friends here: l 16 Formula for r (p. 338 footnote) 1 r = n -1 å æ x æ ö i - x ö ç yi - y ç è sx øè s y ø We will have R calculate for us! But we can still learn from the formula We re looking at an (almost) average of the products of the standardized (z) scores for x with each respective standardized (z) score for y. What does this mean? (Draw picture) 17 1 r = n -1 Formula for r å æ x æ ö i - x ö ç yi - y ç è sx øè s y ø The formula also shows us that: Order of x and y doesn t matter. It doesn t matter which of the two variables is called the x variable, and which is called the y variable, the correlation doesn t care. Correlation is unitless. Doesn t change when the measurement units are changed (since it uses standardized observations in its calculation). 18

4 Warning! The correlation coefficient only measures the strength and direction of a linear association. x = Month (January = 1, February = 2, etc.) y = Raleigh s average monthly temperature r =.257 Even though the strength of the relationship between month and rainfall is very strong, its correlation is only 0.257, indicating a weak linear relationship. 19 R-squared (coefficient of determination): r 2 Squared correlation r 2 is between 0 and 1 and indicates the proportion of variation in the response (y) explained by knowing x. SSTO = sum of squares total = sum of squared differences between observed y values and y. We will break SSTO into two pieces, SSE + SSR: SSE = sum of squared residuals (error), unexplained SSR = sum of squares due to regression or explained = sum of squared differences between fitted values and y. Copyright 2004 Brooks/Cole, a division of Thomson Learning, Inc., modified by S. Hancock Oct ŷ New interpretation: r 2 SSTO = SSR + SSE Question: How much of the total variability in the y values (SSTO) is explained by the regression model (SSR)? How much better can we predict y when we know x than when we don t? r 2 = SSR SSR +SSE = SSR SSE =1 SSTO SSTO Copyright 2004 Brooks/Cole, a division of Thomson Learning, 21Inc., modified by S. Hancock Oct Example: Chug Times x = body weight (lbs); y = time to chug a 12-oz drink (sec) Total variation summed over all points = SSTO = 36.6 Unexplained part summed over all points = SSE = 13.9 Explained by knowing x summed = SSR = 22.7 ChugTime Scatterplot of ChugTime vs Weight Weight = mean y r 2 =1 SSE SSTO = SSR SSTO = = 0.62 Interpretation: 62% of the variability in chug times is explained by knowing the weight of the person. 22 Breakdown of Calculations y = 66.4 /13 = 5.11 ŷ = x Example: Manatees r 2 in R output ( ) 2 ŷ ( ) 2 x y y y ( ŷ y) y ŷ ( ) 2 = ( ) 2 = 1.40 ( ) 2 = ( ) 2 = ( ) 2 = 0.20 ( ) 2 = ( ) 2 = ( ) 2 = ( ) 2 = ( ) 2 = ( ) 2 = 0.91 ( ) 2 = 0.41 SUM: 66.4 SSTO = SSR = SSE = SSTO = SSR + SSE => = Note: SSTO does not have anything to do with the fitted model nor with x; it s just a measure of the variability in y (used in calculating standard deviation of y-values). 23 r = 0.94 à r 2 = 0.89 Interpretation: About 89% of the variability in the number of manatee deaths (response variable) can be explained by the number of powerboat registrations (explanatory variable). 24

5 26 What to check for? REGRESSION DIAGNOSTICS Simple linear regression model assumptions: 1. Linearity 2. Constant variance 3. Normality 4. Independence Outliers? Influential points? Other predictors? Scatterplots with lowess curve The best plot to start with is a scatterplot of Y vs. X. Add the least-squares regression line. Add a smoothed curve (not restricted to a line follows the general pattern of the data) lowess curve = locally weighted regression scatterplot smoothing Similar to a moving average Fits least-squares lines around each neighborhood of points, makes predictions, and smooths the predictions. R function: lines(lowess(y~x)) Residuals vs. Fitted Values (Or residuals vs. X) Check linearity and constant variance assumptions, and look for outliers. Good: No pattern; random scatter. Equal spread around the horizontal line at zero (mean of the residuals). Bad: Pattern (curved, etc.) à indicates linearity not met. Funneling (spread increases or decreases with X) à indicates non-constant variance Residuals vs. Fitted Values - GOOD Residuals vs. Fitted Values - BAD Points look randomly scattered around zero. No evidence of nonlinear pattern or unequal variances. Plot on the left shows evidence of non-constant variance. Plot on the right shows evidence of nonlinear relationship.

6 31 32 Residuals vs. Time or Obs. Number If data is available on the time observations were collected, a plot of residuals vs. time can help us check the independence assumption. Good: No pattern over time. Bad: Pattern (e.g., increasing/decreasing or cyclical) over time à indicates dependence in data points (points closer together in time more similar than points further apart in time). Independence Assumption In general, the independence assumption is checked by knowledge of how the data were collected. Example: Suppose we want to predict blood pressure from amount of fat consumed in the diet. Incorrect sampling à sample entire families à results in dependent observations. Why? Use a random sample to ensure independence of observations. Residuals vs. Other Predictor Check if the other predictor helps explain the leftovers from our model. If there is a pattern (e.g., increasing with values of other predictor), may indicate that this other predictor helps predict Y in addition to original X try adding it to the model (multiple linear regression à introduced in Chapter 6) 33 Normal Probability Plot (Normal Quantile- Quantile Plot) of Residuals Plots the sample quantiles (y-axis) vs. quantiles we would expect from a standard normal distribution (x-axis). Best plot to use for checking normality assumption. Good: Points follow a straight line. Bad: Points deviate in a systematic fashion from a straight line à indicates violation of normality assumption Normal Probability Plots of Residuals Examples of bad and good normal probability plots (see also Figure 3.9 on p. 112) What to do if assumptions are not met? Two choices: 1. Abandon simple linear regression model and use a more appropriate model (future courses). 2. Employ some transformation on the data so that the simple linear regression model is appropriate for the transformed data. Can transform X or Y or both. Make sure to run regression diagnostics on the model fit with transformed data to check assumptions. Can make interpretations more complex.

7 Transformations Nonlinear pattern with constant error variance à Try transforming X 37 Residuals are inverted U à use X ' = X or X ' = log(x) Upper plots show data and residual plot before transformation; lower plots show after. 38 Residuals are U-shaped and association between X and Y is positiveà use X ' = X 2 or X ' = exp(x) 39 Residuals are U-shaped and association between X and Y is negativeà use X ' =1/ X or X ' = exp( X) 40 Transformations Non-constant error variance à Try transforming Y May also help to transform X in addition to Y. 41 Box-Cox Transformations Power transformation on Y à Transformed Y = Most commonly used: Y ' = Y λ λ = 2 Y ' = Y 2 λ = 0.5 Y ' = Y λ = 0 Y ' = log(y ) (by definition) λ = 0.5 Y ' =1/ Y λ = 1 Y ' =1/Y 42 Remember: Notation log means log base e

8 43 44 Box-Cox Transformations Find maximum likelihood estimate of λ. R function to find best λ = boxcox Need to load the MASS R library. Plots likelihood function à look at value of λ where likelihood is highest. Best to choose a value of λ that is easy to interpret (e.g., choose λ = 0 rather than λ = 0.12) Detecting Outliers and Influential Points Outlier = observation that does not follow the overall pattern of the data set à easy to see in scatterplots for SLR; harder to find in multiple linear regression Influential point = observation that, when removed, changes the model fit substantially (e.g., coefficient estimates, correlation) Tools for detecting outliers and influential points: Residual plots Leverage = measures how far away an observation is from the mean of the predictors à high leverage = potential to be an influential point Cook s distance = measures how much of an influence an individual observation has on the fitted coefficients (how much they change when the observation is removed) à high Cook s distance = influential point

Simple Linear Regression for the Advertising Data

Simple Linear Regression for the Advertising Data Revenue 0 10 20 30 40 50 5 10 15 20 25 Pages of Advertising Simple Linear Regression for the Advertising Data What do we do with the data? y i = Revenue of i th Issue x i = Pages of Advertisement in i

More information

Lecture 11: Simple Linear Regression

Lecture 11: Simple Linear Regression Lecture 11: Simple Linear Regression Readings: Sections 3.1-3.3, 11.1-11.3 Apr 17, 2009 In linear regression, we examine the association between two quantitative variables. Number of beers that you drink

More information

appstats27.notebook April 06, 2017

appstats27.notebook April 06, 2017 Chapter 27 Objective Students will conduct inference on regression and analyze data to write a conclusion. Inferences for Regression An Example: Body Fat and Waist Size pg 634 Our chapter example revolves

More information

Section 3: Simple Linear Regression

Section 3: Simple Linear Regression Section 3: Simple Linear Regression Carlos M. Carvalho The University of Texas at Austin McCombs School of Business http://faculty.mccombs.utexas.edu/carlos.carvalho/teaching/ 1 Regression: General Introduction

More information

BIVARIATE DATA data for two variables

BIVARIATE DATA data for two variables (Chapter 3) BIVARIATE DATA data for two variables INVESTIGATING RELATIONSHIPS We have compared the distributions of the same variable for several groups, using double boxplots and back-to-back stemplots.

More information

Introduction to Linear regression analysis. Part 2. Model comparisons

Introduction to Linear regression analysis. Part 2. Model comparisons Introduction to Linear regression analysis Part Model comparisons 1 ANOVA for regression Total variation in Y SS Total = Variation explained by regression with X SS Regression + Residual variation SS Residual

More information

Nature vs. nurture? Lecture 18 - Regression: Inference, Outliers, and Intervals. Regression Output. Conditions for inference.

Nature vs. nurture? Lecture 18 - Regression: Inference, Outliers, and Intervals. Regression Output. Conditions for inference. Understanding regression output from software Nature vs. nurture? Lecture 18 - Regression: Inference, Outliers, and Intervals In 1966 Cyril Burt published a paper called The genetic determination of differences

More information

Inferences for Regression

Inferences for Regression Inferences for Regression An Example: Body Fat and Waist Size Looking at the relationship between % body fat and waist size (in inches). Here is a scatterplot of our data set: Remembering Regression In

More information

Recall, Positive/Negative Association:

Recall, Positive/Negative Association: ANNOUNCEMENTS: Remember that discussion today is not for credit. Go over R Commander. Go to 192 ICS, except at 4pm, go to 192 or 174 ICS. TODAY: Sections 5.3 to 5.5. Note this is a change made in the daily

More information

3. Diagnostics and Remedial Measures

3. Diagnostics and Remedial Measures 3. Diagnostics and Remedial Measures So far, we took data (X i, Y i ) and we assumed where ɛ i iid N(0, σ 2 ), Y i = β 0 + β 1 X i + ɛ i i = 1, 2,..., n, β 0, β 1 and σ 2 are unknown parameters, X i s

More information

Chapter 3: Describing Relationships

Chapter 3: Describing Relationships Chapter 3: Describing Relationships Section 3.2 The Practice of Statistics, 4 th edition For AP* STARNES, YATES, MOORE Chapter 3 Describing Relationships 3.1 Scatterplots and Correlation 3.2 Section 3.2

More information

Chapter 16. Simple Linear Regression and Correlation

Chapter 16. Simple Linear Regression and Correlation Chapter 16 Simple Linear Regression and Correlation 16.1 Regression Analysis Our problem objective is to analyze the relationship between interval variables; regression analysis is the first tool we will

More information

Chapter 3. Diagnostics and Remedial Measures

Chapter 3. Diagnostics and Remedial Measures Chapter 3. Diagnostics and Remedial Measures So far, we took data (X i, Y i ) and we assumed Y i = β 0 + β 1 X i + ǫ i i = 1, 2,..., n, where ǫ i iid N(0, σ 2 ), β 0, β 1 and σ 2 are unknown parameters,

More information

HOMEWORK (due Wed, Jan 23): Chapter 3: #42, 48, 74

HOMEWORK (due Wed, Jan 23): Chapter 3: #42, 48, 74 ANNOUNCEMENTS: Grades available on eee for Week 1 clickers, Quiz and Discussion. If your clicker grade is missing, check next week before contacting me. If any other grades are missing let me know now.

More information

Relationships Regression

Relationships Regression Relationships Regression BPS chapter 5 2006 W.H. Freeman and Company Objectives (BPS chapter 5) Regression Regression lines The least-squares regression line Using technology Facts about least-squares

More information

y n 1 ( x i x )( y y i n 1 i y 2

y n 1 ( x i x )( y y i n 1 i y 2 STP3 Brief Class Notes Instructor: Ela Jackiewicz Chapter Regression and Correlation In this chapter we will explore the relationship between two quantitative variables, X an Y. We will consider n ordered

More information

Chapter 16. Simple Linear Regression and dcorrelation

Chapter 16. Simple Linear Regression and dcorrelation Chapter 16 Simple Linear Regression and dcorrelation 16.1 Regression Analysis Our problem objective is to analyze the relationship between interval variables; regression analysis is the first tool we will

More information

Chapter 27 Summary Inferences for Regression

Chapter 27 Summary Inferences for Regression Chapter 7 Summary Inferences for Regression What have we learned? We have now applied inference to regression models. Like in all inference situations, there are conditions that we must check. We can test

More information

Chapter 3: Describing Relationships

Chapter 3: Describing Relationships Chapter 3: Describing Relationships Section 3.2 The Practice of Statistics, 4 th edition For AP* STARNES, YATES, MOORE Chapter 3 Describing Relationships 3.1 Scatterplots and Correlation 3.2 Section 3.2

More information

Review of Regression Basics

Review of Regression Basics Review of Regression Basics When describing a Bivariate Relationship: Make a Scatterplot Strength, Direction, Form Model: y-hat=a+bx Interpret slope in context Make Predictions Residual = Observed-Predicted

More information

Chapter 2: Looking at Data Relationships (Part 3)

Chapter 2: Looking at Data Relationships (Part 3) Chapter 2: Looking at Data Relationships (Part 3) Dr. Nahid Sultana Chapter 2: Looking at Data Relationships 2.1: Scatterplots 2.2: Correlation 2.3: Least-Squares Regression 2.5: Data Analysis for Two-Way

More information

The Model Building Process Part I: Checking Model Assumptions Best Practice

The Model Building Process Part I: Checking Model Assumptions Best Practice The Model Building Process Part I: Checking Model Assumptions Best Practice Authored by: Sarah Burke, PhD 31 July 2017 The goal of the STAT T&E COE is to assist in developing rigorous, defensible test

More information

Mathematics for Economics MA course

Mathematics for Economics MA course Mathematics for Economics MA course Simple Linear Regression Dr. Seetha Bandara Simple Regression Simple linear regression is a statistical method that allows us to summarize and study relationships between

More information

Chapter 9. Correlation and Regression

Chapter 9. Correlation and Regression Chapter 9 Correlation and Regression Lesson 9-1/9-2, Part 1 Correlation Registered Florida Pleasure Crafts and Watercraft Related Manatee Deaths 100 80 60 40 20 0 1991 1993 1995 1997 1999 Year Boats in

More information

Keller: Stats for Mgmt & Econ, 7th Ed July 17, 2006

Keller: Stats for Mgmt & Econ, 7th Ed July 17, 2006 Chapter 17 Simple Linear Regression and Correlation 17.1 Regression Analysis Our problem objective is to analyze the relationship between interval variables; regression analysis is the first tool we will

More information

Looking at data: relationships

Looking at data: relationships Looking at data: relationships Least-squares regression IPS chapter 2.3 2006 W. H. Freeman and Company Objectives (IPS chapter 2.3) Least-squares regression p p The regression line Making predictions:

More information

The following formulas related to this topic are provided on the formula sheet:

The following formulas related to this topic are provided on the formula sheet: Student Notes Prep Session Topic: Exploring Content The AP Statistics topic outline contains a long list of items in the category titled Exploring Data. Section D topics will be reviewed in this session.

More information

The Model Building Process Part I: Checking Model Assumptions Best Practice (Version 1.1)

The Model Building Process Part I: Checking Model Assumptions Best Practice (Version 1.1) The Model Building Process Part I: Checking Model Assumptions Best Practice (Version 1.1) Authored by: Sarah Burke, PhD Version 1: 31 July 2017 Version 1.1: 24 October 2017 The goal of the STAT T&E COE

More information

Lectures on Simple Linear Regression Stat 431, Summer 2012

Lectures on Simple Linear Regression Stat 431, Summer 2012 Lectures on Simple Linear Regression Stat 43, Summer 0 Hyunseung Kang July 6-8, 0 Last Updated: July 8, 0 :59PM Introduction Previously, we have been investigating various properties of the population

More information

Information Sources. Class webpage (also linked to my.ucdavis page for the class):

Information Sources. Class webpage (also linked to my.ucdavis page for the class): STATISTICS 108 Outline for today: Go over syllabus Provide requested information I will hand out blank paper and ask questions Brief introduction and hands-on activity Information Sources Class webpage

More information

Objectives. 2.3 Least-squares regression. Regression lines. Prediction and Extrapolation. Correlation and r 2. Transforming relationships

Objectives. 2.3 Least-squares regression. Regression lines. Prediction and Extrapolation. Correlation and r 2. Transforming relationships Objectives 2.3 Least-squares regression Regression lines Prediction and Extrapolation Correlation and r 2 Transforming relationships Adapted from authors slides 2012 W.H. Freeman and Company Straight Line

More information

1. Create a scatterplot of this data. 2. Find the correlation coefficient.

1. Create a scatterplot of this data. 2. Find the correlation coefficient. How Fast Foods Compare Company Entree Total Calories Fat (grams) McDonald s Big Mac 540 29 Filet o Fish 380 18 Burger King Whopper 670 40 Big Fish Sandwich 640 32 Wendy s Single Burger 470 21 1. Create

More information

Chapter 8. Linear Regression. Copyright 2010 Pearson Education, Inc.

Chapter 8. Linear Regression. Copyright 2010 Pearson Education, Inc. Chapter 8 Linear Regression Copyright 2010 Pearson Education, Inc. Fat Versus Protein: An Example The following is a scatterplot of total fat versus protein for 30 items on the Burger King menu: Copyright

More information

Unit 6 - Introduction to linear regression

Unit 6 - Introduction to linear regression Unit 6 - Introduction to linear regression Suggested reading: OpenIntro Statistics, Chapter 7 Suggested exercises: Part 1 - Relationship between two numerical variables: 7.7, 7.9, 7.11, 7.13, 7.15, 7.25,

More information

Warm-up Using the given data Create a scatterplot Find the regression line

Warm-up Using the given data Create a scatterplot Find the regression line Time at the lunch table Caloric intake 21.4 472 30.8 498 37.7 335 32.8 423 39.5 437 22.8 508 34.1 431 33.9 479 43.8 454 42.4 450 43.1 410 29.2 504 31.3 437 28.6 489 32.9 436 30.6 480 35.1 439 33.0 444

More information

Estimating σ 2. We can do simple prediction of Y and estimation of the mean of Y at any value of X.

Estimating σ 2. We can do simple prediction of Y and estimation of the mean of Y at any value of X. Estimating σ 2 We can do simple prediction of Y and estimation of the mean of Y at any value of X. To perform inferences about our regression line, we must estimate σ 2, the variance of the error term.

More information

Summarizing Data: Paired Quantitative Data

Summarizing Data: Paired Quantitative Data Summarizing Data: Paired Quantitative Data regression line (or least-squares line) a straight line model for the relationship between explanatory (x) and response (y) variables, often used to produce a

More information

UNIT 12 ~ More About Regression

UNIT 12 ~ More About Regression ***SECTION 15.1*** The Regression Model When a scatterplot shows a relationship between a variable x and a y, we can use the fitted to the data to predict y for a given value of x. Now we want to do tests

More information

Statistical View of Least Squares

Statistical View of Least Squares May 23, 2006 Purpose of Regression Some Examples Least Squares Purpose of Regression Purpose of Regression Some Examples Least Squares Suppose we have two variables x and y Purpose of Regression Some Examples

More information

Simple Linear Regression for the MPG Data

Simple Linear Regression for the MPG Data Simple Linear Regression for the MPG Data 2000 2500 3000 3500 15 20 25 30 35 40 45 Wgt MPG What do we do with the data? y i = MPG of i th car x i = Weight of i th car i =1,...,n n = Sample Size Exploratory

More information

Simple Linear Regression. (Chs 12.1, 12.2, 12.4, 12.5)

Simple Linear Regression. (Chs 12.1, 12.2, 12.4, 12.5) 10 Simple Linear Regression (Chs 12.1, 12.2, 12.4, 12.5) Simple Linear Regression Rating 20 40 60 80 0 5 10 15 Sugar 2 Simple Linear Regression Rating 20 40 60 80 0 5 10 15 Sugar 3 Simple Linear Regression

More information

Chapter 14. Linear least squares

Chapter 14. Linear least squares Serik Sagitov, Chalmers and GU, March 5, 2018 Chapter 14 Linear least squares 1 Simple linear regression model A linear model for the random response Y = Y (x) to an independent variable X = x For a given

More information

Regression Analysis. Regression: Methodology for studying the relationship among two or more variables

Regression Analysis. Regression: Methodology for studying the relationship among two or more variables Regression Analysis Regression: Methodology for studying the relationship among two or more variables Two major aims: Determine an appropriate model for the relationship between the variables Predict the

More information

7.0 Lesson Plan. Regression. Residuals

7.0 Lesson Plan. Regression. Residuals 7.0 Lesson Plan Regression Residuals 1 7.1 More About Regression Recall the regression assumptions: 1. Each point (X i, Y i ) in the scatterplot satisfies: Y i = ax i + b + ɛ i where the ɛ i have a normal

More information

Start with review, some new definitions, and pictures on the white board. Assumptions in the Normal Linear Regression Model

Start with review, some new definitions, and pictures on the white board. Assumptions in the Normal Linear Regression Model Start with review, some new definitions, and pictures on the white board. Assumptions in the Normal Linear Regression Model A1: There is a linear relationship between X and Y. A2: The error terms (and

More information

Lecture 18: Simple Linear Regression

Lecture 18: Simple Linear Regression Lecture 18: Simple Linear Regression BIOS 553 Department of Biostatistics University of Michigan Fall 2004 The Correlation Coefficient: r The correlation coefficient (r) is a number that measures the strength

More information

Statistical View of Least Squares

Statistical View of Least Squares Basic Ideas Some Examples Least Squares May 22, 2007 Basic Ideas Simple Linear Regression Basic Ideas Some Examples Least Squares Suppose we have two variables x and y Basic Ideas Simple Linear Regression

More information

Linear Regression. Linear Regression. Linear Regression. Did You Mean Association Or Correlation?

Linear Regression. Linear Regression. Linear Regression. Did You Mean Association Or Correlation? Did You Mean Association Or Correlation? AP Statistics Chapter 8 Be careful not to use the word correlation when you really mean association. Often times people will incorrectly use the word correlation

More information

Announcements. Lecture 18: Simple Linear Regression. Poverty vs. HS graduate rate

Announcements. Lecture 18: Simple Linear Regression. Poverty vs. HS graduate rate Announcements Announcements Lecture : Simple Linear Regression Statistics 1 Mine Çetinkaya-Rundel March 29, 2 Midterm 2 - same regrade request policy: On a separate sheet write up your request, describing

More information

Ch 13 & 14 - Regression Analysis

Ch 13 & 14 - Regression Analysis Ch 3 & 4 - Regression Analysis Simple Regression Model I. Multiple Choice:. A simple regression is a regression model that contains a. only one independent variable b. only one dependent variable c. more

More information

Correlation and Regression

Correlation and Regression Correlation and Regression October 25, 2017 STAT 151 Class 9 Slide 1 Outline of Topics 1 Associations 2 Scatter plot 3 Correlation 4 Regression 5 Testing and estimation 6 Goodness-of-fit STAT 151 Class

More information

Regression: Main Ideas Setting: Quantitative outcome with a quantitative explanatory variable. Example, cont.

Regression: Main Ideas Setting: Quantitative outcome with a quantitative explanatory variable. Example, cont. TCELL 9/4/205 36-309/749 Experimental Design for Behavioral and Social Sciences Simple Regression Example Male black wheatear birds carry stones to the nest as a form of sexual display. Soler et al. wanted

More information

Inference for Regression Inference about the Regression Model and Using the Regression Line, with Details. Section 10.1, 2, 3

Inference for Regression Inference about the Regression Model and Using the Regression Line, with Details. Section 10.1, 2, 3 Inference for Regression Inference about the Regression Model and Using the Regression Line, with Details Section 10.1, 2, 3 Basic components of regression setup Target of inference: linear dependency

More information

Linear Regression and Correlation. February 11, 2009

Linear Regression and Correlation. February 11, 2009 Linear Regression and Correlation February 11, 2009 The Big Ideas To understand a set of data, start with a graph or graphs. The Big Ideas To understand a set of data, start with a graph or graphs. If

More information

Applied Regression Analysis

Applied Regression Analysis Applied Regression Analysis Lecture 2 January 27, 2005 Lecture #2-1/27/2005 Slide 1 of 46 Today s Lecture Simple linear regression. Partitioning the sum of squares. Tests of significance.. Regression diagnostics

More information

ST Correlation and Regression

ST Correlation and Regression Chapter 5 ST 370 - Correlation and Regression Readings: Chapter 11.1-11.4, 11.7.2-11.8, Chapter 12.1-12.2 Recap: So far we ve learned: Why we want a random sample and how to achieve it (Sampling Scheme)

More information

Chapter 8. Linear Regression. The Linear Model. Fat Versus Protein: An Example. The Linear Model (cont.) Residuals

Chapter 8. Linear Regression. The Linear Model. Fat Versus Protein: An Example. The Linear Model (cont.) Residuals Chapter 8 Linear Regression Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 8-1 Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fat Versus

More information

CHAPTER 3 Describing Relationships

CHAPTER 3 Describing Relationships CHAPTER 3 Describing Relationships 3.1 Scatterplots and Correlation The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers Scatterplots and Correlation Learning

More information

Regression. Marc H. Mehlman University of New Haven

Regression. Marc H. Mehlman University of New Haven Regression Marc H. Mehlman marcmehlman@yahoo.com University of New Haven the statistician knows that in nature there never was a normal distribution, there never was a straight line, yet with normal and

More information

AMS 7 Correlation and Regression Lecture 8

AMS 7 Correlation and Regression Lecture 8 AMS 7 Correlation and Regression Lecture 8 Department of Applied Mathematics and Statistics, University of California, Santa Cruz Suumer 2014 1 / 18 Correlation pairs of continuous observations. Correlation

More information

36-309/749 Experimental Design for Behavioral and Social Sciences. Sep. 22, 2015 Lecture 4: Linear Regression

36-309/749 Experimental Design for Behavioral and Social Sciences. Sep. 22, 2015 Lecture 4: Linear Regression 36-309/749 Experimental Design for Behavioral and Social Sciences Sep. 22, 2015 Lecture 4: Linear Regression TCELL Simple Regression Example Male black wheatear birds carry stones to the nest as a form

More information

Applied Regression Modeling: A Business Approach Chapter 3: Multiple Linear Regression Sections

Applied Regression Modeling: A Business Approach Chapter 3: Multiple Linear Regression Sections Applied Regression Modeling: A Business Approach Chapter 3: Multiple Linear Regression Sections 3.4 3.6 by Iain Pardoe 3.4 Model assumptions 2 Regression model assumptions.............................................

More information

Lecture 2 Linear Regression: A Model for the Mean. Sharyn O Halloran

Lecture 2 Linear Regression: A Model for the Mean. Sharyn O Halloran Lecture 2 Linear Regression: A Model for the Mean Sharyn O Halloran Closer Look at: Linear Regression Model Least squares procedure Inferential tools Confidence and Prediction Intervals Assumptions Robustness

More information

Unit 6 - Simple linear regression

Unit 6 - Simple linear regression Sta 101: Data Analysis and Statistical Inference Dr. Çetinkaya-Rundel Unit 6 - Simple linear regression LO 1. Define the explanatory variable as the independent variable (predictor), and the response variable

More information

Chapter 8. Linear Regression /71

Chapter 8. Linear Regression /71 Chapter 8 Linear Regression 1 /71 Homework p192 1, 2, 3, 5, 7, 13, 15, 21, 27, 28, 29, 32, 35, 37 2 /71 3 /71 Objectives Determine Least Squares Regression Line (LSRL) describing the association of two

More information

LAB 3 INSTRUCTIONS SIMPLE LINEAR REGRESSION

LAB 3 INSTRUCTIONS SIMPLE LINEAR REGRESSION LAB 3 INSTRUCTIONS SIMPLE LINEAR REGRESSION In this lab you will first learn how to display the relationship between two quantitative variables with a scatterplot and also how to measure the strength of

More information

Chapter 4: Regression Models

Chapter 4: Regression Models Sales volume of company 1 Textbook: pp. 129-164 Chapter 4: Regression Models Money spent on advertising 2 Learning Objectives After completing this chapter, students will be able to: Identify variables,

More information

Inference for Regression Simple Linear Regression

Inference for Regression Simple Linear Regression Inference for Regression Simple Linear Regression IPS Chapter 10.1 2009 W.H. Freeman and Company Objectives (IPS Chapter 10.1) Simple linear regression p Statistical model for linear regression p Estimating

More information

9 Correlation and Regression

9 Correlation and Regression 9 Correlation and Regression SW, Chapter 12. Suppose we select n = 10 persons from the population of college seniors who plan to take the MCAT exam. Each takes the test, is coached, and then retakes the

More information

Correlation & Simple Regression

Correlation & Simple Regression Chapter 11 Correlation & Simple Regression The previous chapter dealt with inference for two categorical variables. In this chapter, we would like to examine the relationship between two quantitative variables.

More information

Objectives Simple linear regression. Statistical model for linear regression. Estimating the regression parameters

Objectives Simple linear regression. Statistical model for linear regression. Estimating the regression parameters Objectives 10.1 Simple linear regression Statistical model for linear regression Estimating the regression parameters Confidence interval for regression parameters Significance test for the slope Confidence

More information

STA 108 Applied Linear Models: Regression Analysis Spring Solution for Homework #6

STA 108 Applied Linear Models: Regression Analysis Spring Solution for Homework #6 STA 8 Applied Linear Models: Regression Analysis Spring 011 Solution for Homework #6 6. a) = 11 1 31 41 51 1 3 4 5 11 1 31 41 51 β = β1 β β 3 b) = 1 1 1 1 1 11 1 31 41 51 1 3 4 5 β = β 0 β1 β 6.15 a) Stem-and-leaf

More information

Regression and correlation. Correlation & Regression, I. Regression & correlation. Regression vs. correlation. Involve bivariate, paired data, X & Y

Regression and correlation. Correlation & Regression, I. Regression & correlation. Regression vs. correlation. Involve bivariate, paired data, X & Y Regression and correlation Correlation & Regression, I 9.07 4/1/004 Involve bivariate, paired data, X & Y Height & weight measured for the same individual IQ & exam scores for each individual Height of

More information

Chapter 6: Exploring Data: Relationships Lesson Plan

Chapter 6: Exploring Data: Relationships Lesson Plan Chapter 6: Exploring Data: Relationships Lesson Plan For All Practical Purposes Displaying Relationships: Scatterplots Mathematical Literacy in Today s World, 9th ed. Making Predictions: Regression Line

More information

Chi-square tests. Unit 6: Simple Linear Regression Lecture 1: Introduction to SLR. Statistics 101. Poverty vs. HS graduate rate

Chi-square tests. Unit 6: Simple Linear Regression Lecture 1: Introduction to SLR. Statistics 101. Poverty vs. HS graduate rate Review and Comments Chi-square tests Unit : Simple Linear Regression Lecture 1: Introduction to SLR Statistics 1 Monika Jingchen Hu June, 20 Chi-square test of GOF k χ 2 (O E) 2 = E i=1 where k = total

More information

Lecture 19: Inference for SLR & Transformations

Lecture 19: Inference for SLR & Transformations Lecture 19: Inference for SLR & Transformations Statistics 101 Mine Çetinkaya-Rundel April 3, 2012 Announcements Announcements HW 7 due Thursday. Correlation guessing game - ends on April 12 at noon. Winner

More information

9. Linear Regression and Correlation

9. Linear Regression and Correlation 9. Linear Regression and Correlation Data: y a quantitative response variable x a quantitative explanatory variable (Chap. 8: Recall that both variables were categorical) For example, y = annual income,

More information

STA 302 H1F / 1001 HF Fall 2007 Test 1 October 24, 2007

STA 302 H1F / 1001 HF Fall 2007 Test 1 October 24, 2007 STA 302 H1F / 1001 HF Fall 2007 Test 1 October 24, 2007 LAST NAME: SOLUTIONS FIRST NAME: STUDENT NUMBER: ENROLLED IN: (circle one) STA 302 STA 1001 INSTRUCTIONS: Time: 90 minutes Aids allowed: calculator.

More information

Topic - 12 Linear Regression and Correlation

Topic - 12 Linear Regression and Correlation Topic 1 Linear Regression and Correlation Correlation & Regression Univariate & Bivariate tatistics U: frequenc distribution, mean, mode, range, standard deviation B: correlation two variables Correlation

More information

K. Model Diagnostics. residuals ˆɛ ij = Y ij ˆµ i N = Y ij Ȳ i semi-studentized residuals ω ij = ˆɛ ij. studentized deleted residuals ɛ ij =

K. Model Diagnostics. residuals ˆɛ ij = Y ij ˆµ i N = Y ij Ȳ i semi-studentized residuals ω ij = ˆɛ ij. studentized deleted residuals ɛ ij = K. Model Diagnostics We ve already seen how to check model assumptions prior to fitting a one-way ANOVA. Diagnostics carried out after model fitting by using residuals are more informative for assessing

More information

Basic Business Statistics 6 th Edition

Basic Business Statistics 6 th Edition Basic Business Statistics 6 th Edition Chapter 12 Simple Linear Regression Learning Objectives In this chapter, you learn: How to use regression analysis to predict the value of a dependent variable based

More information

Chapter 7. Linear Regression (Pt. 1) 7.1 Introduction. 7.2 The Least-Squares Regression Line

Chapter 7. Linear Regression (Pt. 1) 7.1 Introduction. 7.2 The Least-Squares Regression Line Chapter 7 Linear Regression (Pt. 1) 7.1 Introduction Recall that r, the correlation coefficient, measures the linear association between two quantitative variables. Linear regression is the method of fitting

More information

Linear Regression. Simple linear regression model determines the relationship between one dependent variable (y) and one independent variable (x).

Linear Regression. Simple linear regression model determines the relationship between one dependent variable (y) and one independent variable (x). Linear Regression Simple linear regression model determines the relationship between one dependent variable (y) and one independent variable (x). A dependent variable is a random variable whose variation

More information

Unit 10: Simple Linear Regression and Correlation

Unit 10: Simple Linear Regression and Correlation Unit 10: Simple Linear Regression and Correlation Statistics 571: Statistical Methods Ramón V. León 6/28/2004 Unit 10 - Stat 571 - Ramón V. León 1 Introductory Remarks Regression analysis is a method for

More information

Correlation and Regression

Correlation and Regression Correlation and Regression Dr. Bob Gee Dean Scott Bonney Professor William G. Journigan American Meridian University 1 Learning Objectives Upon successful completion of this module, the student should

More information

Multicollinearity occurs when two or more predictors in the model are correlated and provide redundant information about the response.

Multicollinearity occurs when two or more predictors in the model are correlated and provide redundant information about the response. Multicollinearity Read Section 7.5 in textbook. Multicollinearity occurs when two or more predictors in the model are correlated and provide redundant information about the response. Example of multicollinear

More information

AP Stats ~ 3A: Scatterplots and Correlation OBJECTIVES:

AP Stats ~ 3A: Scatterplots and Correlation OBJECTIVES: OBJECTIVES: IDENTIFY explanatory and response variables in situations where one variable helps to explain or influences the other. MAKE a scatterplot to display the relationship between two quantitative

More information

Inference for Regression

Inference for Regression Inference for Regression Section 9.4 Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Department of Mathematics University of Houston Lecture 13b - 3339 Cathy Poliak, Ph.D. cathy@math.uh.edu

More information

Chapter Learning Objectives. Regression Analysis. Correlation. Simple Linear Regression. Chapter 12. Simple Linear Regression

Chapter Learning Objectives. Regression Analysis. Correlation. Simple Linear Regression. Chapter 12. Simple Linear Regression Chapter 12 12-1 North Seattle Community College BUS21 Business Statistics Chapter 12 Learning Objectives In this chapter, you learn:! How to use regression analysis to predict the value of a dependent

More information

INFERENCE FOR REGRESSION

INFERENCE FOR REGRESSION CHAPTER 3 INFERENCE FOR REGRESSION OVERVIEW In Chapter 5 of the textbook, we first encountered regression. The assumptions that describe the regression model we use in this chapter are the following. We

More information

Regression Model Building

Regression Model Building Regression Model Building Setting: Possibly a large set of predictor variables (including interactions). Goal: Fit a parsimonious model that explains variation in Y with a small set of predictors Automated

More information

Multiple Linear Regression for the Supervisor Data

Multiple Linear Regression for the Supervisor Data for the Supervisor Data Rating 40 50 60 70 80 90 40 50 60 70 50 60 70 80 90 40 60 80 40 60 80 Complaints Privileges 30 50 70 40 60 Learn Raises 50 70 50 70 90 Critical 40 50 60 70 80 30 40 50 60 70 80

More information

Analysing data: regression and correlation S6 and S7

Analysing data: regression and correlation S6 and S7 Basic medical statistics for clinical and experimental research Analysing data: regression and correlation S6 and S7 K. Jozwiak k.jozwiak@nki.nl 2 / 49 Correlation So far we have looked at the association

More information

STAT 512 MidTerm I (2/21/2013) Spring 2013 INSTRUCTIONS

STAT 512 MidTerm I (2/21/2013) Spring 2013 INSTRUCTIONS STAT 512 MidTerm I (2/21/2013) Spring 2013 Name: Key INSTRUCTIONS 1. This exam is open book/open notes. All papers (but no electronic devices except for calculators) are allowed. 2. There are 5 pages in

More information

CS 5014: Research Methods in Computer Science

CS 5014: Research Methods in Computer Science Computer Science Clifford A. Shaffer Department of Computer Science Virginia Tech Blacksburg, Virginia Fall 2010 Copyright c 2010 by Clifford A. Shaffer Computer Science Fall 2010 1 / 207 Correlation and

More information

Introduction and Single Predictor Regression. Correlation

Introduction and Single Predictor Regression. Correlation Introduction and Single Predictor Regression Dr. J. Kyle Roberts Southern Methodist University Simmons School of Education and Human Development Department of Teaching and Learning Correlation A correlation

More information

7. Do not estimate values for y using x-values outside the limits of the data given. This is called extrapolation and is not reliable.

7. Do not estimate values for y using x-values outside the limits of the data given. This is called extrapolation and is not reliable. AP Statistics 15 Inference for Regression I. Regression Review a. r à correlation coefficient or Pearson s coefficient: indicates strength and direction of the relationship between the explanatory variables

More information

Announcements. Lecture 10: Relationship between Measurement Variables. Poverty vs. HS graduate rate. Response vs. explanatory

Announcements. Lecture 10: Relationship between Measurement Variables. Poverty vs. HS graduate rate. Response vs. explanatory Announcements Announcements Lecture : Relationship between Measurement Variables Statistics Colin Rundel February, 20 In class Quiz #2 at the end of class Midterm #1 on Friday, in class review Wednesday

More information

Business Statistics. Lecture 9: Simple Regression

Business Statistics. Lecture 9: Simple Regression Business Statistics Lecture 9: Simple Regression 1 On to Model Building! Up to now, class was about descriptive and inferential statistics Numerical and graphical summaries of data Confidence intervals

More information

Multiple Regression. Dr. Frank Wood. Frank Wood, Linear Regression Models Lecture 12, Slide 1

Multiple Regression. Dr. Frank Wood. Frank Wood, Linear Regression Models Lecture 12, Slide 1 Multiple Regression Dr. Frank Wood Frank Wood, fwood@stat.columbia.edu Linear Regression Models Lecture 12, Slide 1 Review: Matrix Regression Estimation We can solve this equation (if the inverse of X

More information