Excersice code from openIntro.org statistics textbook