fastlm and dmvnorm functions for hw1