-
0
Question: why is 0 factorial 1?
- Keywords:
-
Greta Monacelli answered on 26 Nov 2020: last edited 27 Nov 2020 11:12 am
Hi Jamie. It is a convention. Thanks to it, some mathematical definitions are easier to give and some calculations become easier. For example, it is used in probability theory for the binomial distribution. I tried to explain it below, but I don’t know if this is in your maths program. π
Let’s say you flip a coin in the air for 6 times. In this case the probability of obtaining exactly 2 heads out of the 6 trials is given by the following formula:
6! / ( 2! * (6-2)! ) * 0.5^2 * 0.5^(6-2).Here, 0.5 stands for a 50% probability of obtaining head flipping the coin (that is, you have a fair coin). Instead, the term at the beginning with all those factorials describes how many combinations there are to obtain exactly 2 heads and 4 tails. So, there are 15 = 6! / ( 2!*(6-2)! ) combinations to obtain exactly 2 heads and 4 tails.
If you want to check, you can write them down too. If βHβ stands of head and βTβ stands for tail, then you have:
H H T T T T , T H H T T T , T T H H T T ,β¦. and so onβ¦Now we talk about the 0!.
Instead of 2 heads, you may want to know the probability of having no heads at all. In this case you have to substitute the 2 in the formula above with a 0. Thus, the probability of having no heads and all tails is:
6! / ( 0! * (6-0)! ) * 0.5^0 * 0.5^(6-0).Intuitively, this probability is not zero. It is possible to obtain no heads and only tails, even though you need to be quite lucky. Indeed, there is only one combination ( T T T T T T ), so only one chance over all the possible outcomes to obtain no heads.
Recall now that the term with all factorials describes the number of combinations for a certain result. In the case of 0 heads, we expect
6! / ( 0! * (6-0)! ) = 1, that is only one combination.
This is exactly what you obtain using the convention 0!=1.In conclusion, thanks to this convention, you can write in a similar formula both cases: 2 heads or 0 heads. Moreover, this formula can be generalised so that it takes into account all the other cases, too (0,1,2,3,4,5,6 heads). The formal mathematical definition of the binomial distribution is then given using it.
This YouTube video follows the same reasoning here and explains the binomial distribution: https://youtu.be/c2gvvg_zxWQ. Also, you can see how all these formulas look written on paper (and in the more general case).
To complete the topic, the probability of having no heads at all after 6 trials is
6! / (0! * (6-0)! ) * 0.5^0 * 0.5^(6-0) = 1 * 0.5^0 * 0.5^(6-0) = 1 * 1 * 0.5^6 = 0.015625
It is slightly more than 1.5%. π
Comments