Some cleanups in stats

Playing with PyCharm, may as well get it to do something semi-useful....

This is mainly:

- PEP8 fixes
- changes in docstrings (imports) to conform to numpy doc standard
- removing extraneous parenthesis
- changing to in-place operations where possible

An opening parenthesis at the end of a line in an expression like this seems awkward.  How about just wrapping the entire expression in an extra layer of parentheses, so this weird split is not necessary?