diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2019-05-02 00:49:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-02 00:49:12 (GMT) |
commit | 671d782f8dc52942dc8c48a513bf24ff8465b112 (patch) | |
tree | 9b25defcc5e0c78c08f1573c28f947e0e9e11bf7 | |
parent | 482b6b565af896cda0c78e5e266d11666c822d91 (diff) | |
download | cpython-671d782f8dc52942dc8c48a513bf24ff8465b112.zip cpython-671d782f8dc52942dc8c48a513bf24ff8465b112.tar.gz cpython-671d782f8dc52942dc8c48a513bf24ff8465b112.tar.bz2 |
bpo-36018: Update example to show mean and stdev (GH-13047)
-rw-r--r-- | Doc/whatsnew/3.8.rst | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index 30ee14c..c958fc3 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -424,8 +424,10 @@ and manipulating normal distributions of a random variable. :: >>> temperature_feb = NormalDist.from_samples([4, 12, -3, 2, 7, 14]) - >>> temperature_feb - NormalDist(mu=6.0, sigma=6.356099432828281) + >>> temperature_feb.mean + 6.0 + >>> temperature_feb.stdev + 6.356099432828281 >>> temperature_feb.cdf(3) # Chance of being under 3 degrees 0.3184678262814532 @@ -433,8 +435,8 @@ and manipulating normal distributions of a random variable. >>> temperature_feb.pdf(7) / temperature_feb.pdf(10) 1.2039930378537762 - >>> el_nino = NormalDist(4, 2.5) - >>> temperature_feb += el_nino # Add in a climate effect + >>> el_niño = NormalDist(4, 2.5) + >>> temperature_feb += el_niño # Add in a climate effect >>> temperature_feb NormalDist(mu=10.0, sigma=6.830080526611674) |