Multiple and Logistic Regression Flashcards
what is the equation for simple linear regression?
Y = mx+ c
OR
Y = B0 + B1X + E
what is the equation for multiple linear regression?
Y = B0 + B1X + B2X + E
Y is dependent variable
X is the independent variable
B0 is the intercept
B1 is the slope of X1
B2 is the slope of X2
E is the error term
give three times when can we use multiple linear regression?
- when we want to predict a continuous outcome variable (statistics exam score) from multiple predictor variables e.g. (IQ, watched lectures, hours of sleep)
- when independent variables are causally related to dependent to variable
- for hypothesis testing
- to predict how much the independent predictors explain the variation in the dependant predictors
what is R^2?
the variability in the outcome variables that is predicted by the independent predictors
an r^2 value of 100% means all of the variation in the Y variable is caused by the independent predictors
what are the 6 advantages of multiple linear regression
- able to adjust for confounding variables
- examine the effect of multiple independent predictors on an outcome
- improves amount of variability you can explain in the dependent variable
- perform multiple hypothesis tests
- more accurate predictions of outcome variable
what is logistic regression used for?
used to predict a binary outcome variable (a “0” or a “1”)
what 2 tyeps of predictors can we use for logistic regression?
- binary
- continuous
what does the output need to be in logistic regression and why?
- needs to be between 0 and 1
- this is because we model probabilities as the outcome
why can’t you use linear regression to predict passing an exam from hours of sleep?
linear regression output is negative to postivie infinity, but the relationship between probability and independent variables is not linear
what is the inverse logisitic function equation?
e (B0 + B1x)
/
1 + e(B0 + B1x)
what are log-odds/logits?
makes an inverse logit function show a linear relationship
what is the equation for log odds
log(P/(1-P)) = B0 + B1X