Monday, February 12, 2018

Binomial Distribution

The binomial distribution is one of discrete probability distribution of the number of success in a sequence of statistically independent bernoulli trail.
I've just tried to created graph of binomial distribution with python. Hence it's somewhat of memo of that:)

Prepare the calss of bernoulli trial


At first, I created python class of bernoulli trial which return probability of bernoulli trial with parameter n,k,p. Following is what I implemented.

Create graph of binomial distribution with various probability of success


Following is the graph with various probability of success in bernoulli trial.

From the result bellow, the vertex of probability distribution seems to be determined by probability of success in bernoulli trial.

Create graph of binomial distribution with various the number of bernoulli traial


Following is the graph with various number of bernoulli trial.

No comments:

Post a Comment