We are looking now first at when a variable has only two possible outcomes.

We call them success and failure.

Just number 1 for success, number 0 for failure.

Just those two outcomes, a half isn't possible.

Two, three, four, five, are not possible.

The probability of a success is little p.

The probability of the failure then by the compliment rule is 1- p.

This simple random variable is called the Bernoulli random variable, and

this distribution, the Bernoulli probability distribution.

We can easily calculate the expected value and the variance for this random variable.

And here I quickly have those formulas for you.

Now this is pretty boring.

Where it gets interesting is now when we repeat

a Bernoulli random variable over and over again.

This is now called Bernoulli trials.

So we have a sequence of identical trials each and every time.

It's a 0 for failure, a 1 for success,

a probability p for success, 1- p for failure and

all the individual trials are independent.

So what we now essentially do here, we don't just have one Bernoulli

random variable, we have a whole sum of random variables and

they are all independent and identically distributed.

People in probability theory often use the abbreviation IID for

independent and identically distributed.

And this particular distribution is now the binomial distribution.

It depends on two parameters.

On little n, how many repetitions of the trial do I have?

And the probability little p of the success.

Now we can quickly calculate the mean and

the variance of this binomial random variable.

Here just to scare you a little bit, I showed you the proofs,

the only thing that's important.

But it's very intuitive as you will see in the applications.

The expected value is n times p.

p is the number of trials times the probability of success.

So that's enough abstract nonsense, let's look at now some examples.

Let's say you flipped the coin and

you call the head a success and tale a failure.

And now let's say you flip the coin five times, and

the question is now, how many times do we get success, a head?

Now notice this is easy.

If I asked you about 0 heads and 5 tails,

that would mean we get the tail on the first try and

on the second [SOUND] and on the last because they're independent.

Remember now the multiplication rule for independent events.

The probability of 0 heads and 5 tails means we get a tail and

a tail and a tail and a tail and a tail.

We multiply a half x a half x a half x a half x a half.

A half to the power of 5 is one-in-thirty-second.

It's a tad more than 3%.

Now that's easy, we learned that before, we can do this with all previous formulas.

But now it gets tricky,

if we don't look at the special case of 0 heads, but of 1 head.

Why is this now difficult?

[SOUND] If I have 5 flips of a coin, and 1 head,

that head could be the first coin and then I have 4 tails.

But it also could be that I first flipped a tail, then a head and then 3 tails.

Or I do 2 tails, a head and 2 tails.

And now you see [SOUND] this gets adds up.

Suddenly, there are 5 different possibilities.

The head could be in the first position, or in the second, or in the third, or

in the fourth or the fifth.

Now I have to look at all these possible outcomes and

then start adding the probabilities.

You can see this gets quickly messy.

Now here you say,

I can see there are 5 possibilities because there are 5 positions and

each of them has a probability of one-in-thirty-two, so I can add this up.

So maybe this we can still handle in our head.

But I can tell you, as soon as n gets larger, or

as we look at 2 successes out of n, things get awfully nasty.

Luckily, there's now an easy solution, namely in Excel there's

a function called BINOM.DIST that calculates these numbers exactly for us.

Let me show you where you can find this function in Excel.

Here please have a look at the spreadsheet for the probabilities of 5 coin flips.

Before I explain all this numbers to you please follow me here in Excel.

Under Formulas you find in this leftmost icon Insert function.

And after Insert function, there's Statistical,

a collection of functions from probability and statistics.

And under Statistical you find the function BINOM.DIST.

If you have an older version of Excel, the period sign or ., may be missing.

But don't despair everything will work on your computer as well.

And when you click on BINOM.DIST, this function appears here.

And we can either via dialog box or

by typing fill in the numbers that we need.

And this is what I have already done here.

So let me now show you what this actually looks like so