Source: http://www.people.virginia.edu/~lz2n/mse305/notes/PD-Binary.pdf