Source: https://www.biostat.wisc.edu/~kbroman/teaching/statprog/cprog1_ho.pdf