Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stat 112 -- Notes 4 Chapter 3.5 Chapter 3.7.

Similar presentations


Presentation on theme: "Stat 112 -- Notes 4 Chapter 3.5 Chapter 3.7."— Presentation transcript:

1 Stat Notes 4 Chapter 3.5 Chapter 3.7

2 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.

3

4

5 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

6

7 Predicted salary of your potential date who has been a teacher for 8 years = Estimated Mean salary for teachers of 8 years = *8 = $54,100 How far off will your estimate typically be? Root mean square error = Estimated standard deviation of Y|X = $4, 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, Regression analysis enables you to better predict your potential date’s salary.

8 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.

9 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.

10 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.

11 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.

12 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 % of the time.

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

14

15 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.

16 Association vs. Causality
A high means that x has a strong linear relationship with y – there is a strong association between x and y. It does not imply that x causes 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

17

18 Example A community in the Philadelphia area is interested in how crime rates affect property values. If low crime rates increase property values, the community may be able to cover the costs of increased police protection by gains in tax revenues from higher property values. Data on the average housing price and crime rate (per 1000 population) communities in Pennsylvania near Philadelphia for 1996 are shown in housecrime.JMP.

19

20 Questions Can you deduce a cause-and-effect relationship from these data? What are other explanations for the association between housing prices and crime rate other than that high crime rates cause low housing prices? Does the simple linear regression model appear to hold?

21 Extrapolation When constructing estimates of or predicting individual values of a dependent value 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. Example: The crime rate in Center City Philadelphia is Does the simple linear regression model fit from housecrimerate.JMP provide an accurate prediction of the average house price in Center City.


Download ppt "Stat 112 -- Notes 4 Chapter 3.5 Chapter 3.7."

Similar presentations


Ads by Google