Commonly used discrete probability distributions
Sanjay Patel
Systems Engineer and Program Lead | Technical Product Developer | Mechatronics, Systems & Controls, Model Based Design, Physics and Math Modeling and Simulation | Bosch | Sedemac | Tata Motors | IIT Madras
Probability distributions (Outcome Vs. Probability plot) of a discrete random variable is called discrete probability distribution. Each point represents an outcome with associated probability.
Let’s say we have an unfair coin (for sake of generality) with unequal probability of head i.e. P(H) = 0.7 and probability of tail i.e. P(T) = 0.3.
Each flip is our trial or the event. And we define that X is the random variable that represents number of heads after (say) 3 flips of the coin.
Conditions for modeling an outcome as binomial variable
Note that in the above case,
- Each trial is independent (outcome of a flip doesn’t depend on the outcome of the previous flip. E.g. since no wear-tear is considered, the coin remains the same with the same probability of head and tail!).
- And so the probability of head or tail don’t vary between the flips. ?
- Each trial is discrete and necessarily either head (success) or tail (failure).
- Total trials are finite and fixed.
If all above hold, X is said to be a binomial (random) variable. Binomial random variable is a special class of random variable used in probability and statistics.
Now consider the following examples:
1. Randomly draw 3 cards from a standard deck of 52 cards without replacement. And X = number of Kings. Is this a binomial variable?
2. Randomly draw 3 cards from a standard deck of 52 cards with replacement. And Y = number of Queens. Is this a binomial variable?
3. Randomly draw 1 card from a standard deck of 52 cards without replacement. And Z = number of Aces. Is this a binomial variable?
Yes, no, maybe? Do share your what you think in the comments!
Binomial distribution
A plot of all the possible binomial outcomes vs. associated probability forms binomial distribution for that random process.
Consider our previous example, with 3 flipping trials and say we want to know number of heads at the end. Let’s define X = number of heads after flipping the coin for 3 times.
What are the likely outcomes at the end? Tip: visualize this is by looking at the problem as that of filling three places with two options H or T:
Possibility 1: {no heads, and all 3 tails}?????????????????????????????????TTT
Possibility 2: {1st is head, and so 2nd and 3rd are tails}????????HTT
Possibility 3: {2nd is head, and so 1st and 3rd are tails}????????THT
Possibility 4: {3rd is head, and so 1st and 2nd are tails}????????TTH
Possibility 5: {1st and 2nd are heads, and so 3rd is tail}????????HHT
Possibility 6: {1st and 3rd are heads, and so 2nd is tail}????????HTH
Possibility 7: {2nd and 3rd are heads, and so 1st is tail}????????THH
Possibility 8: {All 3 are heads, and no tails} ?????????????????????????HHH ?????
Note that all of the above are equally likely outcomes (all are independent events with the probability of H and T constant - since the same coin is used every time and no wear-team is considered).
So for 3 flips, there are total 8 (= 23) possible outcomes. And probability of H is as follows:
P(X=0) i.e. 0 H and 3 T = 1/8 ?????????Or 3C0 / 8
P(X=1) i.e. 1 H and 2 T = 3/8 ?????????Or 3C1 / 8
P(X=2) i.e. 2 H and 1 T = 3/8 ?????????Or 3C2 / 8
P(X=3) i.e. 3 H and 0 T = 1/8 ?????????Or 3C3 / 8
Since the probability is a function of combinatorial (C) (hint: binomial theorem), X is called a binomial (random) variable. Using this, we can plot outcome Vs. probability plot as below:
领英推荐
However, the probabilities are unequal!
Since our coin is an unfair, P(H) = 0.7 and P(T) = 0.3.
P(exactly 2 heads in 3 throws) = ?
e.g. HHT => 0.7*0.7*0.3 = 0.72 * 0.3, there are other outcomes with equal likelihoods: HTH, THH
How many total ways are there? => we can also use combinatorial approach to get this:
3C2 = 3! / (2! * (3-2)!) = 3 ?
Therefore, P(exactly 2 heads in 3 throws) = 3C2 * 0.72 * 0.3 = 0.441 i.e. 44.1%
Remember the Binomial theorem? It tells us how we can expand expressions of the form (p+q)^n.
(p+q)^n = (k: 0 to n) ∑ nCk * p^(n-k) * q^k where nCk = n! / (k! * (n-k)!)?
Now, in a generalized form:
P(exactly k scores in n attempts) = nCk * p^k * (1-p)^(n-k)
Now, let’s calculate P(X=0, 1, 2, 3)
P(X=0) = 3C0 * 0.7^0 * 0.3^3 = 1 * 0.7^0 * 0.3^3 = 0.027 i.e. 2.7%
P(X=1) = 3C1 * 0.7^1 * 0.3^2 = 3 * 0.7^1 * 0.3^2 = 0.189 i.e. 18.9%
P(X=2) = 3C2 * 0.7^2 * 0.3^1 = 3 * 0.7^2 * 0.3^1 = 0.441 i.e. 44.1%
P(X=3) = 3C3 * 0.7^3 * 0.3^0 = 1 * 0.7^3 * 0.3^0 = 0.343 i.e. 34.3%
--------------------------------------------------------------------------------
Total = P(X=0)+ P(X=1)+ P(X=2)+ P(X=3) = 1 i.e. 100%
Now, let’s plot probability distribution for the case where probabilities are not equal for head and tail (i.e. they are asymmetric). The distribution is also asymmetric with skewness towards probability of success i.e. head in this case.
Now that we have individual probabilities for each plausible outcome, we can simply add individual probabilities to get cumulative probabilities.
P(less than 3 heads) = P(X<3)
= P(X<=2) = P(X=0) + P(X=1) + P(X=2) = 0.027+0.189+0.441 = 0.657
Also note that this is same as NOT(P(equal or more than 3 heads))
= 1 – P(X>=3) = 1 – 0.343 = 0.657
i.e. P(X<3) = 1 – P(X>=3)
Some more examples of discrete random variables:?
1.?????Throw of a coin: either head or tail. ?
2.?????Year that a random student in a class was born: It could be 1991, 2001, 2011, 2022 and so on. We can measure, count, list and represent the exact year. ?
3.?????Number of ants born tomorrow in the universe. We can count the exact number.?
This concludes a detailed discussion around discrete random variables and their probability distributions available to us for modeling uncertainties. I hope this article brought more clarity on binomial variables (and their distributions). If you liked reading this article, do hit the like button, this serves as your feedback to me for this post and inspires me to continue writing about similar topics from technology and engineering. Please feel free to share your suggestions and feedbacks in comments section.
Thank you and I'll see you soon!
-Sanjay