1/39
Looks like no tags are added yet.
What is a DGP?
It stands for the data generating process. It is the underlying process used to gather the data points. it is unobserved.
What does it mean to be 95% confident?
If we repeat the sample many times with similar parameters, approximately 95% of the calculated confidence intervals will capture the true population parameter.
point estimate formula
lower + upper / 2
moe formula
upper - lower / 2
how to get Estimated SE
get the moe (easy to get with confidence intervals)
se = moe/ (z(alpha)/2)
65 95 99 rule
65 - 1 sd
95 - 1.96 (best 2 )
99 - 3
formula for SD of sample mean
s / sqrt(n)
s stands for…
As sample size n increases what decreases? what else does this cause?
standard error. this will be squeezing confidence interval too.
What is a p-value?
the probability of obtaining a sample statistic at least as extreme as the observed value, assuming the null hypothesis is true
SE formula for confidence intervals.

SE formula for Hypothesis test
pH0 ——- the hypothesized null value

R code for calculating a 2-sided p-value.
2 * pnorm(phat, mean = , sd = sqrt( fill in ))
fill in the sd as the formula ph0 that is given
in a confidence interval, if H0 falls in confidence interval you :____
in a confidence interval, if H0 does not fall inside the confidence interval you : ____
inside interval : fail to reject the null
outside interval : reject the null
what is statistical power? whats the easiest way to increase power?
the probability of rejecting H0 when H0 is false.
to increase power, increase sample size.
What do r and and sd fall on?
the point of averages (xhat, yhat)
What is the formula for the SD line? what does SD measure?
ssd = sy/sx
it measures spread of the data points.
What is the regression slope formula?
r * sy/sx (sd technically)
what does r = on a perfect correlation? on no correlation?
r = 1 on perf
r = 0 on none
what does the sd and r line look like?
sd is right across from bottom left to top right symmetrical.
r line is different.
what does it mean for correlation to be scale invariant
no matter if you convert r from inches to feet, R² will be unchanged
What is regression to the mean?
extreme X values (both high or low) lead to predicted Y values that are closer to the mean Y.
How do you get Residual?
actual Y - predicted Y
What is RSS and how do you get it?
get the ( actual - predicted ) of every value
square every values.
add all the squared values to each other.
RSS = sum of all values residuals squared.
What is essential to reconstruct a data generating equation?
you need the error.
What is bootstrapping to for standard errors?
resample n times with replacement
refit the regression model to get a synthetic slope
repeat it 10,000 times
take the sd of the synthetic slopes.
in a model with no predictors, what is the best guess?
best guess is the sample mean Yhat.
TSS = sum of all y -yhat all squared.
What is R²?
it is the percentage of variation in Y explained by the linear model.
for an intercept only baseline model: R² = 0
What does it mean for R² to be 0? what about 1?
It means that if it is 0, the model is not a good predictor other then the average. 1 is that it predicts better.
What does RMSE measure?
it measures average prediction error in the original units of Y
When you add predictors (covariates) what happens to R² and RMSE
R² will increase or stay the same
RMSE will decrease or stay the same
Interpret an intercept.
The predicted average outcome when all numeric variables = 0 and all categorical variables are at their reference level.
Interpret a covariate/variable
The estimated average difference in outcome for a group compared to the reference level holding all other variables constant.
Marginal Effects in Quadratic Models
do the derivative of the quadratic model for changes in y with respect to x
lm (y ~ 1, data = ..)
single intercept model
aka the baseline model
lm( y ~ 1 + x , data = …)
single intercept, single slope
simple linear model
lm( y ~ 1 + x1 + x2, data = …)
multiple intercepts, single slope model
parallel lines
lm ( y ~ 1 + x1 * x2, data = …)
multiple intercepts, multiple slopes model
interaction model
Do we need TSS or or RSS to be smaller?
RSS < TSS
because RSS is squaring every actual - predicted.
What’s the formula for R²
1 - TSS/RSS
What’s the formula for MSE
RSS / n