# Binomial distribution

When events are independant:&#x20;

![](https://846345873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LagOeJ2nL90MQERwhxy%2F-Lg-yQcViQRg14BbdWng%2F-Lg02FnX2YoD7CJOkycr%2Fimage.png?alt=media\&token=3ed73fc2-4a8b-4225-88e6-cd371358c779)

The **Binomial Distribution** helps us determine the probability of a string of independent 'coin flip like events'.

The [probability mass function](https://en.wikipedia.org/wiki/Probability_mass_function) associated with the binomial distribution is of the following form:

![](https://846345873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LagOeJ2nL90MQERwhxy%2F-Lg-yQcViQRg14BbdWng%2F-Lg3434sYItDLCcREtP2%2Fimage.png?alt=media\&token=2928d066-8386-4f4b-b4da-d392e58c6234)

where **n** is the number of events, **x** is the number of "successes", and **p** is the probability of "success".

We can now use this distribution to determine the probability of things like:

* The probability of 3 heads occurring in 10 flips.
* The probability of observing 8 or more heads occurring in 10 flips.
* The probability of not observing any heads in 20 flips.

**Quizz:**

![](https://846345873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LagOeJ2nL90MQERwhxy%2F-Lg-yQcViQRg14BbdWng%2F-Lg04m4MwmBgF-CpM2nx%2Fimage.png?alt=media\&token=b4532b5a-6913-41ca-8d1a-7b2c7b7dbfdb)

With 10 coin flips, how many combinations of way can I have exaclty 4 heads as a result.&#x20;

Answer = the fraction above.&#x20;

The formula is:&#x20;

![](https://846345873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LagOeJ2nL90MQERwhxy%2F-Lg-yQcViQRg14BbdWng%2F-Lg2v5rB1vvQTbnp5ue5%2Fimage.png?alt=media\&token=19d97a56-d377-4c58-8de0-0a6916d7481b)

![](https://846345873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LagOeJ2nL90MQERwhxy%2F-Lg-yQcViQRg14BbdWng%2F-Lg30oRocTN9ghCbCpCp%2Fimage.png?alt=media\&token=d3fa1268-f1da-4700-9b61-30eb612d0ec3)

This keeps track of the total number of ways we can get k heads for n coin flips.&#x20;

**Exercise:**

![](https://846345873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LagOeJ2nL90MQERwhxy%2F-Lg-yQcViQRg14BbdWng%2F-Lg2w9jLNo1jwcm2xd4n%2Fimage.png?alt=media\&token=eeda86fa-4e7d-476e-8417-944d6d1cfe77)

With a coin that isn't fair:&#x20;

![](https://846345873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LagOeJ2nL90MQERwhxy%2F-Lg-yQcViQRg14BbdWng%2F-Lg3-cZka3T8cOjacT0h%2Fimage.png?alt=media\&token=3158a75b-b475-4a62-86a2-3913497e42b9)

We can multiply the number of ways 4 heads will show up (which is 5 - see truth table), with the prob of heads \* 4 (we want to know P(#head =4) so that's (0.8)^4, \* same thing with tails, thats (0,2)^1 = 0.4096.

So the formula for the probability is:

![](https://846345873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LagOeJ2nL90MQERwhxy%2F-Lg-yQcViQRg14BbdWng%2F-Lg31VBliLdG_a3bi1uQ%2Fimage.png?alt=media\&token=2c1abfb0-7cb1-429d-87af-eb0d78db486a)

p^k (first part of the formula) = probability associated with the number of heads

(1-p)^(n-k) (2nd part) = probability associated with the number of tails.&#x20;

![](https://846345873-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LagOeJ2nL90MQERwhxy%2F-Lg-yQcViQRg14BbdWng%2F-Lg32N-aeVBvFqSPzD9X%2Fimage.png?alt=media\&token=be992991-70d9-41d7-99bf-74ce129ef79b)

{% hint style="info" %}
You can apply this formula for anything that has two outcomes.&#x20;
{% endhint %}



&#x20;
