Get startedGet started for free

Evaluating the NYC SAT Scores Factorial Model

We've built our model, so we know what's next: model checking! We need to examine both if our outcome and our model residuals are normally distributed. We'll check the normality assumption using shapiro.test(). A low p-value means we can reject the null hypothesis that the sample came from a normally distributed population.

Let's carry out the requisite model checks for our 2^k factorial model, nyc_scores_factorial, which has been loaded for you.

This exercise is part of the course

Experimental Design in R

View Course

Exercise instructions

  • Test the outcome Average_Score_SAT_Math from nyc_scores for normality using shapiro.test().
  • Set up a 2 by 2 grid for plots and plot the nyc_scores_factorial model object to create the residual plots.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Use shapiro.test() to test the outcome
___

# Plot nyc_scores_factorial to examine residuals
par(mfrow = c(2,2))
___
Edit and Run Code