diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2020-04-16 17:25:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-16 17:25:14 (GMT) |
commit | 70f027dd22d6522b777d10c250f951e5e416b93a (patch) | |
tree | b0208da206e983459af5eb714dc38ed026c51153 /Doc | |
parent | 518835f3354d6672e61c9f52348c1e4a2533ea00 (diff) | |
download | cpython-70f027dd22d6522b777d10c250f951e5e416b93a.zip cpython-70f027dd22d6522b777d10c250f951e5e416b93a.tar.gz cpython-70f027dd22d6522b777d10c250f951e5e416b93a.tar.bz2 |
bpo-40290: Add zscore() to statistics.NormalDist. (GH-19547)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/statistics.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/statistics.rst b/Doc/library/statistics.rst index 026f4aa..38a499a 100644 --- a/Doc/library/statistics.rst +++ b/Doc/library/statistics.rst @@ -696,6 +696,16 @@ of applications in statistics. Set *n* to 100 for percentiles which gives the 99 cuts points that separate the normal distribution into 100 equal sized groups. + .. method:: NormalDist.zscore(x) + + Compute the + `Standard Score <https://www.statisticshowto.com/probability-and-statistics/z-score/>`_ + describing *x* in terms of the number of standard deviations + above or below the mean of the normal distribution: + ``(x - mean) / stdev``. + + .. versionadded:: 3.9 + Instances of :class:`NormalDist` support addition, subtraction, multiplication and division by a constant. These operations are used for translation and scaling. For example: |