0:48

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

Â 6:53

Here now, We go here.

Â What have I typed here or got in Y as the insert function?

Â We have first an = sign because I want to do some math,

Â then BINOM.DIST and now I need to enter 4 Numbers.

Â The first number I need to enter is a number of successes.

Â Here I typed A4 because I want to refer to the cell A4 where we have the 0.

Â Next comes little n, the number of repeated Bernoulli trials.

Â Here I said we flipped the coin 5 times, so this number is a 5.

Â Next number is 0.5, why?

Â That's the probability of a success, 0.5.

Â And finally here I want to calculate the probability of exactly 0 and

Â this last argument therefore needs to be the number 0 or the word FALSE.

Â This is just a technicality.

Â There's nothing to be understood here.

Â Just accept it as FALSE.

Â Now here on my screen in Switzerland it shows semicolons.

Â This is in the Excel that we have here in Switzerland.

Â In other countries this may be a comma so keep that in mind.

Â If you type this and you get an error message depending on your country this may

Â need to be a comma instead of a semicolon.

Â So now let's go further down here.

Â Let's look at when I have Y = 2.

Â If I click here we see BIINOM.DIST of the 2, that's in A6,

Â and as 5, 0.5 is the probability and FALSE.

Â And that's how I very easily get the probabilities

Â of having exactly Y successes,

Â where Y coud be any number 0 to 5, when I flip a fair coin.

Â Now remember the cumulative distribution.

Â I can also immediately calculate those probabilities here for example.

Â For a 2, I type exactly the same first two or three arguments as before.

Â So I've BINOM.DIST here, cell A6 where I have the number 2.

Â Still 5 trials, still a probability of 0.5, but for the cumulative distribution,

Â the last argument always must be the number 1 or a TRUE.

Â And so here now, the probability that I have 0,

Â 1 or 2 heads successes is exactly a half.

Â And as always, for the largest number of course,

Â the cumulative probability has to be equal to 1.

Â So in a nutshell by typing in BINOM.DIST for arguments,

Â you can very quickly calculate any binomial distribution

Â probability that you may care about.

Â You can calculate exact probabilities of hitting Y exactly or

Â of cumulative probabilities.

Â And you only need to plugin little n, the number of Bernoulli trials and

Â the probability.

Â So let me summarize all these numbers now in the slides for you.

Â So on the next two slides I summarized what we just learned in Excel.

Â So here on this slide there's a five coin flips.

Â I'll show you the commands that you need to type in,

Â in order to calculate the probability of, for

Â example, having Y = 2 heads out of 5 coin flips.

Â So we have all the different probabilities, the BINOM.DIST function.

Â And recall that we want to use the last argument of FALSE when we

Â look at the probability of an exact number of coin flips.

Â At the bottom, we can also see the expected value,and the variance quickly

Â calculated using the specialized formula that we saw before for

Â binomial probability distribution.

Â Next, we also saw the concept of the cumulative distribution.

Â That's when the last argument in Excel is a TRUE.

Â That's again, adding up all the probabilities up to a specific value.

Â And so here, I've summarized those numbers for you.

Â 11:09

Now, as I said at the beginning,

Â this probability distribution is used in neat applications.

Â And so, let's get away from this little toy problem to a really cool application.

Â Some advertising stunt that a beer brewing company in

Â the United States pulled in the 1981 Super Bowl.

Â The Schlitz Brewing Company asked at the time live on TV, so

Â this wasn't televised in a film studio before and then shown.

Â So this was not canned, it was live on TV.

Â They asked 100 beer drinkers who will proclaim my favorite

Â beer is one of your competitors this beer brand called Michelob.

Â And ask them in a blind taste test between their beer, Schlitz,

Â and the Michelob beer, which beer do you like better?

Â Now at first when you think that, this is a god awful idea.

Â What are they doing?

Â Are they nuts?

Â You ask these people who say this is my favorite beer to test it

Â against your beer.

Â Isn't it likely that you'll look like an idiot and 100 people will say, no,

Â my beer is still my favorite beer.

Â Maybe 98 say, it's still better, maybe you convince 1 or 2.

Â Is this really risky?

Â 12:59

But now, keep in mind these are American beers.

Â And they're not some special American microbrewed beer.

Â No, this is some large beer companies and let's taste it.

Â These beers are all rather similar in taste.

Â Some people may even question whether they have any taste at all.

Â But I don't want to discuss this here with my American friends.

Â So, let's assume now It's essentially impossible to

Â distinguish between these two beers because they all taste alike.

Â [SOUND] Now we get into binomial distribution context.

Â We have success probability, a half.

Â Failure probability, a half.

Â We have 100 people sitting in the room.

Â They're not talking to each other.

Â And anyway they are blind, this is a blind tasting, it doesn't say on the bottle

Â whether it's Michelob or Schlitz, so we really have a binomial setup.

Â And now we can analyze this advertising stunt, using the binomial distribution.

Â Question, let's say a really really bad outcome for

Â Schlitz is that less than one-third of all people favor their beer,

Â what is the probability that, that happens?

Â The probability of less than a third of 100,

Â that means that the number of successes is less than 33 and a third.

Â Means the number is, given that you only have integers, Y is smaller,

Â equal 33, quickly calculated with BINOM.DIST is 0.00044%, so it's tiny.

Â So it's really, really unlikely that if we are Schlitz looks so bad with this ad.

Â What's the probability of a pretty good outcome?

Â Let's say a pretty good outcome is 45 or more.

Â Why is that a pretty good outcome?

Â I think it's a pretty good outcome because these are all people who say,

Â Michelob is my favorite beer.

Â If we can get 45 of them to suddenly prefer us that's pretty impressive

Â wouldn't you say?

Â And look at the probability.

Â More than 86% chance that in this blind test this will happen.

Â Here I calculated some other probabilities for you.

Â If you consider less than 40, but less than 2% chance of that happening.

Â The probability of hitting exactly 50 is almost 8%.

Â The probability of 50 or higher is 54%.

Â So there's more than half a chance that 50 or more people will favor your beer.

Â Of course, under the assumptions which I think are realistic,

Â that you can't really distinguish the taste.

Â So in the end, it looks like this advertising stunt isn't all that risky.

Â So now of course you're curious, right?

Â What really happened that day in 1981?

Â Exactly 50 out of the 100 loyal Michelob beer drinkers favored Schlitz beer.

Â So they got exactly the expected value, what a coincidence, under their model.

Â So, to sum up, the advertising stunt wasn't all that risky and

Â It turned out it was a nice advertisement.

Â Quick aside for people around the world, in the United States

Â you are allowed to do what's called comparative advertising.

Â Here in Switzerland, for example, it's not allowed.

Â I can't say on TV, your product is bad, my product is better.

Â I can only say my product is good.

Â So just as an explanation,

Â for those of you who were surprised about this comparative advertising.

Â It is allowed in the US.

Â And this brings me already to the end of this lecture.

Â We learned about a very important discrete probability distribution,

Â the binomial distribution.

Â It can actually get quite tricky if you look at the math underneath it.

Â You don't need to do this because there's a beautiful Excel formula,

Â BINOM.DIST which makes the calculation of probabilities very easy.

Â And we saw a really cool, cute application of it

Â in a legendary TV commercial from the United States.

Â