Added Python versions of stat formulae.