Docsity

Regression and Probability: Understanding Linear Relationships and Frequentist Probability, Study notes of Statistics

Partial preview of the text

Download Regression and Probability: Understanding Linear Relationships and Frequentist Probability and more Study notes Statistics in PDF only on Docsity!

STAT 2

Lecture 15:

Probability

Quick review: correlation ● Correlation doesn't change if you add a constant to one or both variables, or multiply one or both variables by a (positive) number ● Can be misleading if there are outliers or relationship is nonlinear ● Correlation is not necessarily causation

Quick review: residuals and errors ● Residuals: true values minus predicted values ● RMS error: square residuals, take mean of squares, take square root; or do SD(Y)*sqrt(1-r 2 ) ● Plot residuals: if homoscedastic with no outliers, can use normal

Today Some final notes on regression ● Why the regression line is the regression line ● Interpreting a regression line

I

Why use that line?

Why the regression line formula? ● Regression line: y = mean( y )

  • [ x – mean( x )]* r *SD( y )/SD( x ) ● Primary reason we use this formula: of all straight lines, this is the one that gives the smallest RMS error (or sum of residuals 2 )

The Gaussian linear model ● Our model says the relationship between each value of x and y is y i = c + bx i

  • e i where c and b are constants; x i and y i are the i th values of x and y ; and e i is the i th error

Errors in the linear model ● Errors are not quite the same as residuals: errors are distances from the true model; residuals are distances from the fitted model ● We usually assume the errors are independent and are normally distributed with mean 0 and the same SD (homoscedasticity)

II

Interpreting the regression line

Example: controlled experiment ● Suppose we do a controlled experiment for the effect of a certain medication on systolic blood pressure ● Say our fitted model is: Reduction in blood pressure = –10*(log-dosage)

Example: observational study ● Yrs of education: mean 12.5, SD 3 ● Income/yr: mean $30K, SD $24K ● Correlation = 0. ● Regression line for income and education: Annual income = $2000 + $5000 * (years of education)

Example: observational study ● If A has one more year of education than B, then on average A will earn $5000/yr more than B ● If you go back to school for a year, it doesn't mean you'll earn another $5000 a year (even “on average”) ● Can't use the regression line to predict causal changes in y

III

Probability

Probability: what does it mean? ● When I toss a coin, the probability of getting a head is 50%.

  • what does this mean?