Directions

Show enough work to explain your decisions and state conclusions in context. Use \(\alpha=.05\) and 95% confidence intervals unless otherwise specified. You may use R for calculations. Model output and plots are provided; you do not need to recreate them. Allow for rounding when checking calculations.

Problem 1: Choosing a test

For each scenario, state the null hypothesis and identify an appropriate statistical test. No calculations are required.

  • Part A: We are interested in determining whether a student’s major (Humanities/STEM/Social Sciences) is associated with their quantitative final exam score in STA-209. Each student belongs to one major group, and students are independent.
  • Part B: Attendees at a two-day R workshop receive a numeric skills score before and after the workshop. We wish to determine whether their mean score has increased.
  • Part C: Survey respondents report their sex (female/male) and whether they engaged in binge drinking more than twice in the previous week (yes/no). We wish to determine whether the proportion answering yes differs between the two groups. Respondents are independent.
  • Part D: We roll a six-sided die independently 120 times and record the count for each face. We wish to determine whether the faces have equal probabilities.

Problem 2: Wing length in hawks

We are interested in predicting wing length for Cooper’s hawks using culmen (upper beak) length or sex. These data include 68 hawks. Both lengths are measured in millimeters.

The plot shows the fitted line from Model 1, with observations colored by sex.

Model 1: Culmen only – lm(Wing ~ Culmen, data = hawks)

## Coefficients:
##             Estimate Std. Error t value     Pr(>|t|)
## (Intercept)    90.94      22.12    4.11      0.00011
## Culmen          8.72       1.25    7.00 0.0000000016
## 
## Residual standard error: 24.688 on 66 degrees of freedom
## Multiple R-squared: 0.426, Adjusted R-squared: 0.417
## F-statistic: 48.98 on 1 and 66 DF, p-value: 0.00000000163

Model 2: Sex only – lm(Wing ~ Sex, data = hawks)

## Coefficients:
##             Estimate Std. Error t value             Pr(>|t|)
## (Intercept)   257.26       5.01   51.34 < 0.0000000000000002
## SexM          -26.68       7.19   -3.71              0.00043
## 
## Residual standard error: 29.643 on 66 degrees of freedom
## Multiple R-squared: 0.173, Adjusted R-squared: 0.160
## F-statistic: 13.76 on 1 and 66 DF, p-value: 0.000428
  • Part A: Using Model 1, write the fitted equation and interpret the slope in context. State the slope’s null hypothesis, verify its t statistic from the estimate and standard error, and draw a conclusion.
  • Part B: Construct a 95% confidence interval for the Model 1 slope and interpret it. Use qt(.975, df = 66) for the critical value. How does the interval agree with your test conclusion?
  • Part C: Use Model 1 to predict mean wing length for hawks with culmen lengths of 18 and 20 mm. Relate the difference between your predictions to the slope.
  • Part D: Using Model 2, identify the reference group and find the predicted mean wing length for each sex. State the population hypothesis tested by SexM and give a conclusion.
  • Part E: Suppose male becomes the reference group in Model 2. What would the intercept and female coefficient be? Would the two-sided p-value for the sex difference change? Would the predicted group means change? Explain briefly.

Problem 3: Accounting for culmen length

Consider the same hawks, now using culmen length and sex together.

Model 3: Culmen and sex – lm(Wing ~ Culmen + Sex, data = hawks)

## Coefficients:
##             Estimate Std. Error t value   Pr(>|t|)
## (Intercept)   109.98      26.80    4.10    0.00012
## Culmen          7.87       1.42    5.56 0.00000054
## SexM           -8.48       6.80   -1.25    0.21687
## 
## Residual standard error: 24.585 on 65 degrees of freedom
## Multiple R-squared: 0.439, Adjusted R-squared: 0.422
## F-statistic: 25.48 on 2 and 65 DF, p-value: 0.00000000677

The lines below are the fitted mean relationships from Model 3.

  • Part A: A hawk has a culmen length of 18.7 mm and an observed wing length of 265 mm. Using Model 1, calculate its predicted wing length and residual. Does this model overpredict or underpredict its wing length?
  • Part B: Interpret the culmen and sex coefficients in Model 3. Compare the estimate and p-value for sex with Model 2. Explain how the question answered by the sex coefficient has changed, using the plots to support your explanation. Does the nonsignificant coefficient in Model 3 contradict Model 2?
  • Part C: State the null hypothesis for the overall F-test in Model 3 and draw a conclusion. Explain why a significant overall F-test can occur alongside a nonsignificant sex coefficient.
  • Part D: Compare Models 1 and 3. How much variability does each explain? Is the increase in ordinary \(R^2\) alone enough to justify adding sex? Use the coefficient output and the plots to explain your assessment.

Problem 4: Opening weekend at the movies

The following data include 70 Hollywood films released between 2007 and 2012. They include Action and Comedy films from Fox and Paramount. The plot shows opening-weekend revenue, in millions of dollars, with color indicating the number of theaters showing the film.

Movie Model 1 – lm(OpeningWeekend ~ Genre + LeadStudio, data = movies)

## Coefficients:
##                     Estimate Std. Error t value      Pr(>|t|)
## (Intercept)            36.15       4.81    7.52 0.00000000018
## GenreComedy           -25.69       5.78   -4.44 0.00003427689
## LeadStudioParamount    14.69       5.94    2.47         0.016
## 
## Residual standard error: 24.153 on 67 degrees of freedom
## Multiple R-squared: 0.288, Adjusted R-squared: 0.266
## F-statistic: 13.53 on 2 and 67 DF, p-value: 0.0000116
  • Part A: Interpret the intercept and find the predicted mean opening-weekend revenue for all four genre/studio combinations.
  • Part B: We are considering adding the number of theaters to this model. Which plot below correctly shows the residuals from Movie Model 1 against the number of theaters? Justify your answer using the first movie plot and the sign convention for residuals.

Movie Model 2 – lm(OpeningWeekend ~ Genre + LeadStudio + TheatersOpenWeek, data = movies)

## Coefficients:
##                      Estimate Std. Error t value    Pr(>|t|)
## (Intercept)         -21.48761    9.95081   -2.16      0.0345
## GenreComedy         -13.69726    4.99129   -2.74      0.0078
## LeadStudioParamount   8.74991    4.82823    1.81      0.0745
## TheatersOpenWeek      0.01804    0.00287    6.28 0.000000031
## 
## Residual standard error: 19.256 on 66 degrees of freedom
## Multiple R-squared: 0.554, Adjusted R-squared: 0.534
## F-statistic: 27.32 on 3 and 66 DF, p-value: 0.0000000000133
  • Part C: Compare the genre and studio coefficients between the two movie models. How have their estimates and evidence against zero changed? Interpret the theater coefficient, then explain what the genre and studio comparisons now hold fixed. Does this observational analysis establish that adding theaters causes higher revenue?
  • Part D: Which movie model would you prefer for predicting opening-weekend revenue? Support your answer using at least two features of the output. In particular, explain why a smaller p-value for the overall F-test is not, by itself, a measure of prediction accuracy.