1 / 65

Linear Regression

Linear Regression. William P. Wattles, Ph.D. Psychology 302. Correlation.

idania
Download Presentation

Linear Regression

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linear Regression William P. Wattles, Ph.D. Psychology 302

  2. Correlation • Teen birth rate correlated with our composite religiosity variable with r = 0.73; 95% CI (0.56,0.84); n = 49; p < 0.0005. Thus teen birth rate is very highly correlated with religiosity at the state level, with more religious states having a higher rate of teen birth. A scatter plot of teen birth rate as a function of religiosity is presented in Figure 1.http://www.reproductive-health-journal.com/content/6/1/14

  3. “Victor, when will you stop trying to remember and start trying to think?” --Helen Boyden

  4. You can use linear regression to answer the following questions about the pattern of data points and the significance of a linear equation: • 1. Is a pattern evident in a set of data points? • 2. Does the equation of a straight line describe this pattern? • 3. Are the predictions made from this equation significant?

  5. Using Regression to predict college performance and college satisfaction.

  6. Dependent and Independent Variables • Dependent Variable-or Criterion Variable The variable whose variation we want to explain. • Independent Variable-or Predictor Variable A variable that is related to or predicts variation in the dependent variable.

  7. Examples • SAT score, college GPA • Alcohol consumed, score on a driving test • type of car, Qualifying speed • level of education, Income • Number of boats registered, deaths of manatees

  8. Correlation • The relationship between two variables X and Y. • In general, are changes in X associated with Changes in Y? • If so we say that X and Y covary. • We can observe correlation by looking at a scatter plot.

  9. Correlation example • Is number of beers consumed associated with blood alcohol level?

  10. Beer consumption and Blood Alcohol Content 16

  11. Correlation • Correlation coefficient tells us the strength and direction of the relationship between two variables.

  12. Prediction • If two variables are related then knowing a value for one should allow us to predict the value of the other.

  13. Regression • Allows us to predict one variable based on the value of another.

  14. Regression • Using knowledge of the relationship between X and Y to predict Y given X. • X the independent variable (predictor) used to explain changes in Y • Y the dependent variable (criterion)

  15. Linear regression • Regression line-a straight line through the scatter plot that best describes the relationship. • Regression line-predicts the value of Y for a given value of X.

  16. Regression Line • A straight line that describes how a dependentvariable changes as the independentvariable changes.

  17. Least squares regression. • A method of determining the regression line that minimizes the errors (residuals)

  18. Least squares regression • residual is the error or the amount that the observed observation deviates from the regression line. • goal to find a solution that minimizes the squared residuals • Least squares (the smallest possible sum of the squared residuals)

  19. Least squares regression. • a is the intercept the value of y when X=0 • b is the slope the rate of change in Y when X increases by 1

  20. Regression formula • a=Ybar-bXbar • b=sum of deviation products/sum of Xdev squared

  21. Berk & Cary page 240

  22. Simple Linear Regression

  23. The Regression Equation • x-the independent variable, the predictor • y-the dependent variable, what we want to predict • a-the intercept • b-the slope

  24. Calculating the least-squares regression.

  25. Population

  26. Population Sample βBeta Slope α Alpha Intercept b Slope a Intercept

  27. Crying and IQ page 600

  28. Relationship • The scatterplot suggests a relationship between crying and IQ. • Can use knowledge of crying to predict IQ

  29. What would null say?

  30. Null, says: “It’s nothing but sampling error.

  31. Babies who cry easily may be more easily stimulated and have higher IQ’s

  32. Steps to Analyze Regression Data • Plot and interpret • Numerical summary • Mathematical model

  33. Plot and Interpret • Plot independent variable on the X axis • Plot dependent variable on the Y axis. • Examine form, direction and strength of relationship

  34. Correlation coefficient tells direction and strength of relationship. r = +.455 Numerical Summary

  35. r squared • r2 percent of variance in Y explained by X. • =21%

  36. Use model to predict IQ based on knowledge of crying Least Squares regression line. Y predict=a + bx a(the intercept) =91.27 b the slope = 1.493 Mathematical Model

  37. Excel Output

  38. The slope and intercept are statistics because they are calculated on the sample. We are really interested in estimating the population parameters Sample Statistics PopulationParameter Sample Statistic

  39. Residuals • Residuals-The difference between the observed value of the dependent variable and and value predicted by the regression line.

  40. Coefficient of determination • R2 the square of the correlation coefficient. • The amount of the variation in Y that can be explained by changes in X

  41. Regression and correlation • correlation tells us about the relationship • regression allows us to predict Y if we know X

  42. Serotonin • 5-HT levels predict mood in healthy males. • SSRI, Zoloft, Prozac

  43. Privitera page 531 • Do levels of serotonin predict positive mood in subjects?

More Related