I have added my code for HW2.

coin_flips.c uses standard C libraries and should, on most systems, compile with just
cc -c coin_flips.c
cc -o coin_flips coin_flips.c
It is the version I used to arrive at the answers to the first few questions of HW2.

linear_regression.html is self-contained and should run in any browser that supports the HTML5 canvas and HTML5 <input type="number" /> tags. After I submitted my answers to HW2, I went back and corrected some mistakes, re-organized the code, and made other improvements, which is why I am only uploading it now.