| 1 | initial version |
The formula can be written in SageMath using binomial, but you may also use binom from the scipy library:
sage: import scipy.stats
sage: binom_dist = scipy.stats.binom(20,.20)
sage: bar_chart([binom_dist.pmf(x) for x in range(20)])

As explained in the doc of
sage: scipy.stats.binom?
pmf stands for Probability mass function.
| 2 | No.2 Revision |
The formula can be written in SageMath using binomial, but you may also use binom from the scipy library:
sage: import scipy.stats
sage: binom_dist = scipy.stats.binom(20,.20)
sage: bar_chart([binom_dist.pmf(x) for x in range(20)])

See the Sage quick start for statistics page. As explained in the doc of
sage: scipy.stats.binom?
pmf stands for Probability mass function.
| 3 | No.3 Revision |
The formula can be written in SageMath using binomial, but you may also use binom from the scipy library:
sage: import scipy.stats
sage: binom_dist = scipy.stats.binom(20,.20)
sage: bar_chart([binom_dist.pmf(x) bar_chart([binom_dist.pmf(k) for x k in range(20)])

See the Sage quick start for statistics page. As explained in the doc of
sage: scipy.stats.binom?
pmf stands for Probability mass function.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.