Practice quiz 4

Not graded, just practice


Katie Schuler


November 28, 2023

1 Model reliability

  1. As we collect more data, our parameter estimates
  1. Each figure below plots 100 bootstrapped models with data drawn from the same population. In one figure, the model is fit to 10 data points. In the other, each model is fit to 200 data points. Which figure shows the model fit to 200 data points?

  1. As we collect more data, what happens to the confidence interval around our parameter estimates?
  1. True or false, we can obtain confidence intervals around parameter estimates for models in the same we we did for point estimates like the mean.
  1. Model reliability asks how certain we can be about our parameter estimates. Why is there uncertainty around our parameter estimates?
"Because we are interested in the model parameters that 
best describe the population from which the sample was
 drawn. Due to sampling error, we can expect some 
 variability in the model parameters."
  1. The figure below shows the model fit for a sample of 10 participants. Suppose we repeated our experiment with 10 new participants. True or false, fitting the same model to these new data would yield approximately the same parameter estimates.
  1. True or false, a model with high accuracy must also have high reliability.

Nonlinear models

  1. The model y ~ poly(x,2) is plotted in which of the figures below?

  1. Which of the equations below expresses a quadratic polynomial model in R?

    1. y ~ poly(x, 1)
    2. y ~ poly(x, 2)
    3. y ~ poly(x, 3)
    4. y ~ poly(x, 4)
  1. True or false, lm() can be used to fit a linearized nonlinear model.
  1. Fill in each blank below with the model building process best described by the definition:

    • is finding the best fitting parameter estimates.
    • is quantifying the uncertainty on the parameter estimates.
    • is choosing the type of model and its functional form.
    • is quantifying how well our model fits our data.

3 Classification

  1. Which of the following aspects of model building apply to classification models? (Choose all that apply)
  1. What is the difference between regression and classification?
"Regression predicts a continuous response varaible, 
classification predicts a discrete response variable"
  1. Which accuracy metric is best applied to classification models?
  1. In the figure below, which aspect shows the response variable?

  1. Which figure below could show a plotted classification model? Choose all that apply.

  1. Name two kinds of linear classifiers
"Any 2 of those mentioned in class: 
Logistic regression
Linear discriminant analysis (LDA)
Linear support vector machines (SVM)
Nearest-prototype classifiers
Naive Bayes classifiers

4 Classification in R

  1. We can impliment classification via

  2. True or false, in R, we can perform logistic regression with a generalized linear model.

  1. What 3 elements do all GLMs have?
"1. A particular distribution for modeling the response variable
2. A linear model 
3. A link function
  1. What is the link function for logistic regression?
  1. Which of the following fits a logistic regression model in R? Choose one.
# code A
glm(y ~ x, data = data, family = "binomial")

# code B
data %>%
    specify(y ~ x) %>%

# code C 
logistic_reg %>%
    set_engine("glm") %>%
    fit(y ~ x, data = data)