Skip to main content

Midterm Cheat Sheet

Linear Regression

image-1666104229251.png

image-1666104239088.png

image-1666104245811.pngimage-1666104245811.png

image-1666104252727.png

image-1666104260540.png

image-1666104271056.png

image-1666104276418.png

image-1666104282605.png

image-1666104287023.png

Predicting a CI new obs adds a 1 to se(y):

š›½0 + š›½2x +/-image-1666104297248.png

Multiple Linear Regression and Estimation

image-1666104323618.pngimage-1666104323618.png

image-1666104327905.pngimage-1666104327905.png

image-1666104332246.pngimage-1666104332246.png

image-1666104336362.pngimage-1666104336362.png

image-1666104345652.pngimage-1666104345652.png

image-1666104350789.pngimage-1666104350789.png

image-1666104355280.pngimage-1666104355280.png

image-1666104359234.png

image-1666104363437.png

image-1666104372729.png

image-1666104378232.png

š»0 : š›½1 = š›½2 = š›½3 = ⋯ = š›½š‘ = 0  
v.s.  š»1 : not all š›½š‘˜ = 0, š‘˜ = 1, … , š‘

image-1666104389032.pngimage-1666104389032.pngimage-1666104395117.pngimage-1666104395117.png

rejection rule of š‘” >= t(1 āˆ’ alpha/2; š‘› āˆ’ š‘ āˆ’ 1)

image-1666104407108.png

image-1666104410593.png

image-1666104415116.png

image-1666104423017.png

Model Fitting: Inference

image-1666104576887.png

dfĪ© = n - p, and dfšœ” = n – q

image-1666138531298.png

Reject the null hypothesis if F > Fα p - q, n – p

image-1666104643517.png

image-1666138340542.png


Dummy Variables and Analysis of Covariance
Consider a Xi2 for which is 0 for – and 1 for +:

image-1666104607845.png

An interaction between Xi1 and Xi2:

image-1666104615922.png

A model with multiple categorical variables:

image-1666104625980.png

image-1666104633030.png

Regression Diagnostics
Assumptions:
    • Error:  ~ N(0, SD2I); 
        ā—¦ Independent
        ā—¦ Equal Variance
        ā—¦ Normally Distributed
    • Model: E[y] = Xβ is correct
    • Unusual observations
      
Leverage Points: data point with unusual x-value

image-1666104773344.png

      The Hat Matrix – n*n matrix
hii is the leverage of the ith case
leverage > 2p’/n should be looked at closely


Outliers: Unusual observation on x or y axis

image-1666104790374.png

Calculate the t-test and compare abs with limit:
abs(qt(.05/(n*2), df = n - pprime - 1, lower.tail = T))

 

Influential Points: causes changes to regression
    Difference in Fits:

image-1666104815733.png

with a threshold of

image-1666104825747.png

Where p’ is the number of parameters 

    Cook's Distance:

image-1666104834542.png

with a threshold of
Di > 4/n should be looked at
Di > .5 possible influence
Di >= 1 very influential

Error: a plot of e_hat should
    • have constant variance
    • have no clear pattern
    • H0: residuals are normal

image-1666105013557.png

image-1666105020734.png

image-1666105036225.png