Homework 5 for STA 242