What are some differences between a Normal and Binomial Distribution?


What are some important differences between a Normal and Binomial Distribution?


Normal Distribution

Normal distributions are more common in statistics than binomial distributions most of the time. These distributions are always symmetric and unimodal by definition.

Normal distributions can be described by their mean and standard deviation. The mean determines where the center of the distribution is located. The standard deviation determines the shape of the distribution. A larger standard deviation means a wider and flatter shape, while a smaller standard deviation means a skinnier shape.

Furthermore, unlike binomial distributions, a normal distribution is based on the values of a dataset.

An example of a normal distribution is for the heights of people in a country.

Binomial Distribution

These distributions tell us the probability for a specific number of “successes” to happen, given a probability of success and number of trials.

Unlike normal distributions, binomial distributions tell us the results of only two possible outcomes: success or failure.

An example of this is flipping a coin, which can only result in heads or tails.


In the Project After this Lesson i.e, Election Results

In Step 4 - The method that’s been shown to convert into float result

a = np.random.binomial(N, P, size=10000) / N.

This dot method is not working and it’s showing error when i used this code

survey_responses_length = len(survey_responses)
possible_surveys = np.random.binomial(survey_responses_length,0.54,size=10000)/survey_responses_length.


 File "script.py", line 17
    possible_surveys = np.random.binomial(survey_responses_length,0.54,size=10000)/survey_responses_length.
SyntaxError: invalid syntax

But it works when i convert the len into float using float keyword

survey_responses_length = float(len(survey_responses))

Please look into it @mtf @thepitycoder
Link to the Project - Click Me

Could it just be the dot at the end of the line?

1 Like

Yes it’s the dot only at the end of the line

Did that solve the syntax error? If so then there is no problem.

Yes when i removed the dot and used float function then it worked


One of the arguments of the np.random.binomial is the percentage that a given outcome will occur in a given number of experiments.

How can i determine this percentage? Only by looking at historical data?

1 Like