stat545a homework 6 submitted by Wooyong Lee