In this screencast I am going to be showing you all about the binomial distribution. I
am going to show you how to derive it, and I am also going to go through an example.
So the binomial distribution is a type of discrete distribution function, we're generally
talking about trials, where you can have a probability of success and a probability of
failure, it can only have two options, it can either be a success or a failure. Most
of the time we refer to p as the probability of an individual success, so I am just gonna,
you know, work through an example where the probability of success of an individual trial
might be point seven. If this were coin flipping the probability of getting a heads, if we
call that a success, would be point five, and we also have a failure. Sometimes failures
are denoted by q, which is one minus p, so in this case it would be point three. Lets
just assume we have five trials. There are a couple of ways that we can do this, and
we're saying "alright, well how many ways can we have three successes, or what is the
probability of having three successes, and we go a little bit further what is the probability
of having exactly three successes. Well if we have five trials we can denote those as
five different spaces here. So how many different ways can we have three successes, so I am going
to denote successes by s, so I could have success, success, success, failure, failure.
If I had that, what would be the probability that that would occur. Well, we'd just take
the probability of success, and we're going to cube that basically because we have three
successes, but then we need to multiply by the probability of failure, which is point three
because those three success are followed by two failures, so this then would be the probability
of this exact arrangement, and you have to keep that in mind. However, if I am just asking
for in five trials, whats the probability that I have exactly three successes, there
are other arrangements that we can consider, so I could have a success, success, failure,
success, failure, and that too would have the same exact probability, so point seven cubed
times point three squared, or in general I could write this as p cubed, and one minus
p squared for five trials, but we can have tons of different ways that we could write
this. I could write failure, success, success, success, failure, you might be thinking "OK,
well that then is just the number of ways that we could have three successes put into
five spots, would be we have five spots and we're going to choose three of them to be
successes," and a lot of times I'll write that five choose three. If I have a bunch
of different ways that I can write or arrange the successes and failures, each of those
independent arrangements, and there will be, in this case, five choose three, each arrangement
is adding to our total probability of having three successes in five trials. The total
probability of having exactly three successes then would be the total number of ways that
we could arrange those three successes in five different trials, times the probability
of any given one of those arrangements being the way it is, so in this case its five choose
three times point seven cubed times point three squared, and thats the overall probability,
and with probability functions we would write this as f of three is going to be that. In
general we can write the binomial distribution if we have n trials, and x successes, remember
we're talking about exactly x successes, we're not talking about at least x successes. So
the f of x probability is equal too n choose x, the probability of a success to the x number
of trials, times one minus p to the n minus x. So I've got an example here. You work for
a pharmaceutical company that makes a pharmaceutical product named "Curesall." Five point three
percent of all batches are failures. What is the probabiliity that seventeen, and exactly
seventeen, out of twenty batches will be successful. We're going to use the binomial distribution,
and we use this binomial distribution function because we have a probability of success and
a probability of failure. We're looking at successes here. Our probability, five point
three percent is actually not a success, this is a probability of failure, so the probability
of success then would be ninety four point seven percent. We have a total number of twenty
trials, we want x to be seventeen so I can use the binomial distribution. f of seventeen
is going to be the following, and if you plugged this into your calculator, or do this on a
computer this will end up being point zero six seven. Now, what if I we're to ask "What
is the probability that at least seventeen out of twenty batches will be successful?" This,
the way its written, is exactly seventeen, so if I said "Whats the probability that at
least seventeen out of twenty would be successful?" That would be f of seventeen plus f of eighteen,
plus f of nineteen, plus the probability that all twenty of twenty are successful. If you
plugged those values for x into binomial distribution. Instead of seventeen we have
eighteen, nineteen, or twenty, and instead of three we have two, one, or zero, you would
get the following. If you tally those up you get ninety eight percent, so you have a ninety
eight percent chance that at least seventeen out of twenty batches will be successful.