MGSC 291 - EXAM 3 STUDY GUIDE
covariates - Answers -x - vector of inputs
bike ex: sunny, 65, etc
independent variable affected by covariate
coefficients (including the intercept) - Answers -β is your vector
constant variable affected by covariate
f( ) - Answers -link function
linear regression 𝑓(𝑥 ′𝛽) - Answers -= 𝑥 ′𝛽
logistic regression 𝑓(𝑥 ′𝛽) - Answers -= 𝑒^ 𝑥′𝛽 / (1 + 𝑒^ 𝑥′𝛽)
models a BINARY response
(y is either 0/1 or T/F)
E[Y|x] - Answers -linear regression
expected value (average/conditional mean)
value of Y given x
SLR(simple linear regression) - Answers -only 1 input of (x)
= 𝛽0 + 𝛽1x1
P(Y=1|x) - Answers -logistic regression
probability that Y is equal to 1 given x
(y=1 is the outcome of interest)
when do you use a logistic regression model - Answers -when the response has only 2
options
fit a logistic regression model - Answers -logsiticFit<-
glm(y~var1+var2...data=myData,family="binomial")
make interpretations with a logistic regression model - Answers -fit<-
glm(y~var1+var2...,data=myData,family="binomial")
predict logistic function - Answers -predict(fit,newdata,type="response")
, odds ratio (𝑒^βj) - Answers -𝑒^βj = odds(x+1) / odds(x)
tells us how the odds of success change (multiplicatively) when we increase x by 1odds
of success for our outcome of interest* know how to get this in R and how to interpret
linear model - Answers -y = β0 + β1x1
Y changes by β units for every 1 unit increase in x
log-log model - Answers -log(y) = β0 + β1*log(x1)
y changes by β% for every 1% increase in x
- β is an elasticity
log-linear model - Answers -Y changes by 100*(exp(β) - 1)% in response to 1 unit
increase in X
log(y) = β0 + β1x1
ex: log(y) = 4 + 0.31(x)
exterm-18p(0.31) = 1.3634 - 1 = 0.3634*100 = 36% increase for every 1 unit increase in
x
exp(predict( , ))
uncertainty quantification - Answers -tools needed to be able to quantify the uncertainty
in our point estimates
goal with statistical analysis: not to eliminate uncertainty, but to REDUCE and
QUANTIFY it
frequentist approach - Answers -repeatedly drawing samples of data and counting the
frequency with which an event happens
- frequency = mean of that sample
- each frequency value is calculated, and varies from sample to sample = sampling
variability
sampling distribution of means (frequencies)
different from bootstrapping bc bootstrapping resamples the original sample set of data
sample variability - Answers -different sample means values are calculated, and these
means vary from sample to sample
sampling distribution of a sample mean - Answers -the distribution of all possible
sample means (frequencies) of size n from the same population
covariates - Answers -x - vector of inputs
bike ex: sunny, 65, etc
independent variable affected by covariate
coefficients (including the intercept) - Answers -β is your vector
constant variable affected by covariate
f( ) - Answers -link function
linear regression 𝑓(𝑥 ′𝛽) - Answers -= 𝑥 ′𝛽
logistic regression 𝑓(𝑥 ′𝛽) - Answers -= 𝑒^ 𝑥′𝛽 / (1 + 𝑒^ 𝑥′𝛽)
models a BINARY response
(y is either 0/1 or T/F)
E[Y|x] - Answers -linear regression
expected value (average/conditional mean)
value of Y given x
SLR(simple linear regression) - Answers -only 1 input of (x)
= 𝛽0 + 𝛽1x1
P(Y=1|x) - Answers -logistic regression
probability that Y is equal to 1 given x
(y=1 is the outcome of interest)
when do you use a logistic regression model - Answers -when the response has only 2
options
fit a logistic regression model - Answers -logsiticFit<-
glm(y~var1+var2...data=myData,family="binomial")
make interpretations with a logistic regression model - Answers -fit<-
glm(y~var1+var2...,data=myData,family="binomial")
predict logistic function - Answers -predict(fit,newdata,type="response")
, odds ratio (𝑒^βj) - Answers -𝑒^βj = odds(x+1) / odds(x)
tells us how the odds of success change (multiplicatively) when we increase x by 1odds
of success for our outcome of interest* know how to get this in R and how to interpret
linear model - Answers -y = β0 + β1x1
Y changes by β units for every 1 unit increase in x
log-log model - Answers -log(y) = β0 + β1*log(x1)
y changes by β% for every 1% increase in x
- β is an elasticity
log-linear model - Answers -Y changes by 100*(exp(β) - 1)% in response to 1 unit
increase in X
log(y) = β0 + β1x1
ex: log(y) = 4 + 0.31(x)
exterm-18p(0.31) = 1.3634 - 1 = 0.3634*100 = 36% increase for every 1 unit increase in
x
exp(predict( , ))
uncertainty quantification - Answers -tools needed to be able to quantify the uncertainty
in our point estimates
goal with statistical analysis: not to eliminate uncertainty, but to REDUCE and
QUANTIFY it
frequentist approach - Answers -repeatedly drawing samples of data and counting the
frequency with which an event happens
- frequency = mean of that sample
- each frequency value is calculated, and varies from sample to sample = sampling
variability
sampling distribution of means (frequencies)
different from bootstrapping bc bootstrapping resamples the original sample set of data
sample variability - Answers -different sample means values are calculated, and these
means vary from sample to sample
sampling distribution of a sample mean - Answers -the distribution of all possible
sample means (frequencies) of size n from the same population