Stat 112 Notes 4 Today: Review of p-values for one-sided tests

Slides:



Advertisements
Similar presentations
Lesson 10: Linear Regression and Correlation
Advertisements

Objectives 10.1 Simple linear regression
Stat 112: Lecture 7 Notes Homework 2: Due next Thursday The Multiple Linear Regression model (Chapter 4.1) Inferences from multiple regression analysis.
Simple Linear Regression. Start by exploring the data Construct a scatterplot  Does a linear relationship between variables exist?  Is the relationship.
Class 15: Tuesday, Nov. 2 Multiple Regression (Chapter 11, Moore and McCabe).
Class 5: Thurs., Sep. 23 Example of using regression to make predictions and understand the likely errors in the predictions: salaries of teachers and.
Chapter 13 Introduction to Linear Regression and Correlation Analysis
Lecture 19: Tues., Nov. 11th R-squared (8.6.1) Review
The Simple Regression Model
Chapter Topics Types of Regression Models
Lecture 16 – Thurs, Oct. 30 Inference for Regression (Sections ): –Hypothesis Tests and Confidence Intervals for Intercept and Slope –Confidence.
Stat Notes 5 p-values for one-sided tests Caution about forecasting outside the range of the explanatory variable (Chapter 3.7.2) Fitting a linear.
CHAPTER 3 Describing Relationships
Stat Notes 4 Chapter 3.5 Chapter 3.7.
Chapter 14 Introduction to Linear Regression and Correlation Analysis
Forecasting Outside the Range of the Explanatory Variable: Chapter
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 12-1 Chapter 12 Simple Linear Regression Statistics for Managers Using.
Correlation and Regression
Chap 12-1 A Course In Business Statistics, 4th © 2006 Prentice-Hall, Inc. A Course In Business Statistics 4 th Edition Chapter 12 Introduction to Linear.
EQT 373 Chapter 3 Simple Linear Regression. EQT 373 Learning Objectives In this chapter, you learn: How to use regression analysis to predict the value.
Chapter 4 Linear Regression 1. Introduction Managerial decisions are often based on the relationship between two or more variables. For example, after.
Stat 112: Notes 2 Today’s class: Section 3.3. –Full description of simple linear regression model. –Checking the assumptions of the simple linear regression.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 3 Describing Relationships 3.2 Least-Squares.
Stat 112 Notes 5 Today: –Chapter 3.7 (Cautions in interpreting regression results) –Normal Quantile Plots –Chapter 3.6 (Fitting a linear time trend to.
Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Simple Linear Regression Analysis Chapter 13.
Chapters 8 Linear Regression. Correlation and Regression Correlation = linear relationship between two variables. Summarize relationship with line. Called.
Chapter 13 Simple Linear Regression
The simple linear regression model and parameter estimation
Regression and Correlation
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
Chapter 3: Describing Relationships
Chapter 11 Simple Regression
Unit 3 – Linear regression
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
Chapter 3: Describing Relationships
Cautions about Correlation and Regression
Least-Squares Regression
Chapter 3 Describing Relationships Section 3.2
Chapter 3: Describing Relationships
Chapter 3: Describing Relationships
Simple Linear Regression
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
4.2 Cautions about Correlation and 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
9/27/ A Least-Squares Regression.
Chapter 3: Describing Relationships
Chapter 3: Describing Relationships
Chapter 3: Describing Relationships
CHAPTER 3 Describing Relationships
Presentation transcript:

Stat 112 Notes 4 Today: Review of p-values for one-sided tests Chapter 3.4.2 (Assessing the fit of the regression line). Chapter 3.5.2 (Prediction Intervals) Chapter 3.7 (Some Cautions in Interpreting Regression Results) Homework 1 due on Thursday For Thursday’s office hours, for this week only, I will hold them from 1-2 instead of after class (I have my usual office hours today after class).

p-values for one-sided tests example: Poverty Rates and Doctors

Example: One Sided Test

Example Continued: One and Two Sided Tests

Teachers’ Salaries and Dating In U.S. culture, it is usually considered impolite to ask how much money a person makes. However, suppose that you are single and are interested in dating a particular person. Of course, salary isn’t the most important factor when considering whom to date but it certainly is nice to know (especially if it is high!) In this case, the person you are interested in happens to be a high school teacher, so you know a high salary isn’t an issue. Still you would like to know how much she or he makes, so you take an informal survey of 11 high school teachers that you know.

You happen to know that the person you are interested in has been teaching for 8 years. How can you use this information to better predict your potential date’s salary? Regression Analysis to the Rescue! You go back to each of the original 11 teachers you surveyed and ask them for their years of experience. Simple Linear Regression Model: E(Y|X)= , the distribution of Y given X is normal with mean and standard deviation .

Predicted salary of your potential date who has been a teacher for 8 years = Estimated Mean salary for teachers of 8 years = 40612.135+1686.0674*8 = $54,100 How far off will your estimate typically be? Root mean square error = Estimated standard deviation of Y|X = $4,610.93. Notice that the typical error of your estimate of teacher salary using experience, $4,610.93, is less than that of using only information on mean teacher salary, $6,491.20. Regression analysis enables you to better predict your potential date’s salary.

R Squared How much better predictions of your potential date’s salary does the simple linear regression model provide than just using the mean teacher’s salary? This is the question that R squared addresses. R squared: Number between 0 and 1 that measures how much of the variability in the response the regression model explains. R squared close to 0 means that using regression for predicting Y|X isn’t much better than mean of Y, R squared close to 1 means that regression is much better than the mean of Y for predicting Y|X.

R Squared Formula Total sum of squares = = the sum of squared prediction errors for using sample mean of Y to predict Y Residual sum of squares = , where is the prediction of Yi from the least squares line.

What’s a good R squared? A good R2 depends on the context. In precise laboratory work, R2 values under 90% might be too low, but in social science contexts, when a single variable rarely explains great deal of variation in response, R2 values of 50% may be considered remarkably good. The best measure of whether the regression model is providing predictions of Y|X that are accurate enough to be useful is the root mean square error, which tells us the typical error in using the regression to predict Y from X.

Connection between Correlation and R Squared

More Information About Your Potential Date’s Salary: Prediction Intervals From the regression model, you predict that your potential date’s salary is $54,100 and the typical error you expect to make in your prediction is $4,611. Suppose you want to know an interval that will most of the time (say 95% of the time) contain your date’s salary? We can find such a prediction interval by using the fact that under the simple linear regression model, the distribution of Y|X is normal, here the subpopulation of teachers with 8 years of experience has a normal distribution with estimated mean $54,100 and estimated standard deviation $4,611.

Prediction Interval A 95% prediction interval has the property that if we repeatedly take samples from a population with the simple regression model where are fixed at their current values and then sample with ,the prediction interval will contain 95% of the time.

Prediction Interval for Your Date’s Salary Suppose your date has 8 years of experience.

Prediction Intervals in JMP After using Fit Line, click the red triangle next to Linear Fit and click Confid Curves Indiv. Use the crosshair tool (under Tools) to find the exact prediction interval for a particular x value.

Approximate Prediction Intervals

Forecasting Outside the Range of the Explanatory Variable (Extrapolation) When constructing estimates of or predicting individual values of a Y based on , caution must be used if is outside the range of the observed x’s. The data does not provide information about whether the simple linear regression model continues to hold outside of the range of the observed x’s. Prediction intervals only account for (1) variability in Y given X; (2) uncertainty in the estimates of the slope and intercept given that the simple linear regression model is true. When is outside the range of the observed x’s, the prediction interval might not be accurate.

Olympic Long Jump: Length of gold medal jump (Y) vs. Year (X)

Predictions from Long Jump Simple Linear Regression Model Predicted Olympic gold medal winning long jumps: 2012 (London): -72.49+0.0504*2012 = 29.08 feet 2032: -72.49+0.0504*2032 = 30.09 feet 3000: -72.49+0.0504*3000 = 78.96 feet 95% Prediction Interval for Year 3000: Prediction interval is not reasonable! Predicting winning distance for year 3000 is an extrapolation

Association vs. Causality A high in a simple linear regression of Y on X means that X has a strong linear relationship with Y, in other words changes in X are strongly associated with changes in the mean of Y. It does not imply that changes in X causes changes in Y. Alternative explanations for high : Reverse is true. Y causes X. There may be a lurking (confounding) variable related to both x and y which is the common cause of x and y

Review R squared measures how much better the regression model predicts Y than just using the mean of Y. 95% prediction interval: interval that contains new observation’s Y given the new observation’s X with 95% probability. Approximately 95% of observations are within 2 RMSEs of their predicted value given their X Cautions in Interpreting Regression: Prediction intervals for X values outside the range of the observed X variables may not be accurate. Regression measures the association between X and the mean of Y and does not necessarily measure the causal effect of X on Y. Next Class Sections 3.5.2, 3.6