Ask Your Question
0

How to plot the Binomial Distribution

asked 2020-04-05 12:47:23 -0500

geroyx gravatar image

updated 2020-04-06 03:44:29 -0500

Hey there, is there a macro for
image description
?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2020-04-05 14:17:44 -0500

Sébastien gravatar image

updated 2020-04-06 05:18:57 -0500

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(k) for k in range(20)])

image description

See the Sage quick start for statistics page. As explained in the doc of

sage: scipy.stats.binom?

pmf stands for Probability mass function.

edit flag offensive delete link more

Comments

Nice... ;)

geroyx gravatar imagegeroyx ( 2020-04-06 05:39:04 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-04-05 12:47:23 -0500

Seen: 100 times

Last updated: Apr 06