Implemenation of solutions of Allen Downey's Think Stats book