This tutorial covers geometric distribution. A geometric distribution shows the distribution for the experiment with n repeated trials, where each trial has just two outcomes-- success and failure. For each trial, the probability of success, p, is the same on every trial. The trials are independent as well so the effects of the first trial don't change what can happen in the second or the third.
Now the key to a geometric distribution is that the trials are continued until one success occurs. For example, if we're looking at flipping a coin as our experiment, there are only two possible outcomes-- success and failure. And depending on how we're setting it up, we could say heads is success, or tails is success. For this example, let's say heads is success. Now the probability of success, the probability of flipping a coin and getting ahead, is the same on every trial. It's always 50%. The trials are independent. The first flip does not affect the second flip. And we would continue flipping a coin until we reach one success, until we see heads once. So in this case, that would be an example of a geometric distribution.
Now here we're talking about where an expected number of trials until success occurs is 1 divided by p. So for example, if we're talking about how many times you'd expect too flip until you get a head, you can predict this using this 1 divided by p formula. So for getting a head, the probability is 50%, or 0.5. So 1 divided by 0.5 is going to be the probability-- is going to tell us how many times we'd need to flip until we would expect to get a head. And that is 2. So we can expect to flip two times until we get a head.
In example two, it says a cereal box has a prize in 20% of boxes. How many boxes should you expect to buy to get one prize? Similarly, 1 divided by the chance, so 0.2 in this case, would mean that we would have to buy about five boxes to expect to get a prize.
Now we can also use this probability formula to calculate. Here we have the probability of success, p, the probability of failure, q, which is the same as 1 minus p. And the number of trials until it's a success is x. So the probability of the number of trials equaling a particular number is q to the x minus 1 times p. So if our example is what is the probability of having four boys, then one girl. The probability of getting a girl is our p, is 0.49. The probability of a boy is our q, it's our failure, it's 1 minus 0.49, which is 0.51.
Now here we're going to set up the probability that the fifth child is the girl. So that's the same as the probability of the first four being boys times the probability that a fifth is a girl. And this equation right here is doing the same thing-- the probability of there being four failures and then one success. So now we fill in the numbers that we have-- 0.51 to the fourth, times 0.49, and 0.51 to the fourth is 0.0677, rounded. And then when you multiply that by 0.49, you end up with 0.033, which is approximately 3%. So using this formula, we found that the probability of having four boys, then one girl, is 3.3%.
This has been our tutorial on geometric distributions.