First time here? Check out the FAQ!

Ask Your Question
0

How to plot the Binomial Distribution

asked 5 years ago

geroyx gravatar image

updated 5 years ago

Hey there, is there a macro for
image description
?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 5 years ago

Sébastien gravatar image

updated 5 years ago

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.

Preview: (hide)
link

Comments

Nice... ;)

geroyx gravatar imagegeroyx ( 5 years ago )

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: 5 years ago

Seen: 1,547 times

Last updated: Apr 06 '20