Regression Flashcards
What questions can regression answer?
How do systems work?
ex: how many runs the avg homerun is worth
-effects of economic factors on pres. election
Make Predictions about what will happen in the future?
-height in the future
-price of oil in the future
-housing demand in next 6 months
Simple Linear Regresssion
-one predictor
-y = response
x = predictor
Equation
y = a0 + a1x1
general linear regression equation
with m predictors
y = response
x = predictor
y = a0 + sum from j =1 to m ajxj
How do you measure the quality of a regression line’s fit?
the sum of squared errors
-distance between true response and our estimate
simple linear regression prediction error
Yi - actual
yhati - prediction
Yi - Yhati or yi - (a0+a1xi1))
Sum of squared errors equation
sum from i = 1 to n (yi-yhati)^2
or
sum from i = 1 to n (yi-(a0+a1xi1))^2
What is the best fit regression SLR line?
minimizes sum of squared errors
-defined by a0 and a1
How do we measure the quality of a models fit?
likelihood
What is likelihood? What is maximum likelihood?
-measure the probability (density) for any parameter set; we assume the observed data is the correct value and we have information about the variance
-parameters that give the highest probability
What Maximum Likelihood Estimation (MLE). What are you minimizing to calculate this?
the set of parameters that minimizes the sum of squared errors
zi = observations
yi = model estimates
minimize sum from i = 1 to n (zi-yi)^2
Maximum likelihood in the context of linear regression
LR - y = a0 + sum from j =1 to m ajxj
sum square errors = sum from i = 1 to n (zi-yi)^2
substitute regression equation for yi in sum of squared errors
minimize sum from i = 1 to n (zi-(a0 + sum from j =1 to m ajxj))^2
How can you use likelihood to compare two different models?
the likelihood ratio
Akaike Information Criterion equation. What is the penalty terma nd what does it do?
L*: maximum likelihood value
K: # of parameters we’re investigating
AIC = 2k -2ln(L*)
Penalty term - (2k) balances likelihood with simplicity
-helps avoid overfitting
AIC with regression? Do you want AIC to be smaller or higher?
substitute maximum likelihood reg. equasion and the # of parameters is m+1
-we prefer models with smaller aic, aic smaller encourages fewer parameters and higher likelihood
corrected AIC
-works well if we have infitiely many data points
-this never happens
-add a corrections term
AICc = AIC 2k(k+1)/ n-k-1