Understanding Random variable- a variable takes value with uncertainty.
- Kuntal Bakuli
- Apr 16, 2020
- 4 min read
Lecture note -2
Discrete Random variable:
Here we will discuss about discrete random variables. In the last lecture note, i.e. in lecture note 1, we have learned:
(1) What is the Random experiment?
(2) A random variable is a real-valued function defined over a sample space and that sample space is generated from a random experiment.
(3) The set containing all possible values of the random variable is called Range or Support of the random variable.

When the random variable takes only discrete values, which means the Support of the random variable is a finite set or countable infinite set then the random variable is a discrete random variable.
Let’s make it clear with few examples.
Example 1: Suppose X denotes the number of misprints in a book. The value of X will vary for each book and we cannot predict the value of X before counting the misprints of that book. The occurrence of any misprint at a page in random (as we don’t know the technical reason of misprint), thus X is associated with the occurrence of a random event (a random event is an outcome of random experiment). Hence X is a random variable.
Now we look at the possible values of X. What is the lowest possible value for X?
If there is no misprint the X equals 0 and the number of misprints cannot be negative (which is absurd), so the lowest possible value of X is 0.
What will be the highest possible value of X?
Suppose one of your friends says the highest possible value of X will be 500 and then another guy says if the total number of misprint is 500 for any particular copy of a book then for another copy of that book we may find one more misprint, i.e. total 500+1=501 misprints? We cannot nullify the logic of the second guy. Thus we cannot restrict this highest possible value of X by any large positive integer, because if we put an upper bound then the second guy can argue with this logic.
Then the support of X is;
S = {0, 1, 2, 3,………………} = Set of Natural numbers = N , which is countable and not a finite set.
Let’s consider the problem of exercise 1 given at the end of the lecture note 1.
Example 2: Consider a random experiment of tossing a biased coin thrice, P(H)=1/3. Mention the sample space. Consider a random variable that stands for the number of heads obtained in that experiment. What are the values that random variable can take? Mention the probability for each value of the random variable, check the total probability.
Here the sample space is = {TTT, TTH, THT, HTT, HHT,HTH, THH, HHH}
This coin is biased, here P(H)=1/3 thus P(T)= 1-P(H)=2/3. With this coin, we can expect more tails than heads. Thus the probability of getting TTT and the probability of getting HHH are not the same.
Hence, In this sample space, all the events are not equally likely. We can not apply the classical definition of probability to calculate the probability of any individual event/element of the sample space.
How will you calculate the probability of each event of the sample space?
To calculate the probabilities we need to know a little bit about independent trials.
In this experiment, we are tossing the coin thrice. If you get a head at the first toss then it doesn’t mean you will get a head in the second toss or you will not get a head in the second toss. The result of the first toss can’t influence the result of the second toss. In a more general sense, we can say the outcome of each toss can’t influence the outcome of any other toss. So, each toss can be considered as an independent trial as their outcomes are independent.
Here we are dealing with an experiment consists of three independent trials. One of the simplest ways to calculate the probability of any outcome of such independent trials is to take the product of the probabilities of the outcome of each trial. Suppose the outcome of three independent trials is HHT means H (head) in the first trial (toss), H in the second trial, and T(tail) in the last trial. To calculate the probability of HHT, we simply take the product of the outcome of each trial, that is P(H)×P(T)×P(H). To make it clear check the following calculations;
P(HTH) = P(H)×P(T)×P(H) = 1/3 × 2/3 × 1/3 = 2/27 …………………………………….. (1)
P(TTH) = P(T) × P(T) × P(H) = 2/3 × 2/3 × 1/3 = 4/27 ……………………………………. (2)
P(TTT) = P(T) × P(T) × P(T) = 2/3 × 2/3 × 2/3 = 8/27 …………………………………… (3)
P(HHH)= P(H) × P(H) ×P(H) = 1/3 × 1/3 × 1/3 = 1/27 …………………………………… (4)
From the formulation of the probabilities mentioned above, it is clear that P(HHT)= P(HTH) = P(THH); they are a different permutation of two H and one T, product of the probabilities of individual trial’s outcome is same.
Similarly, P(TTH)= P(THT) = P(HTT). Now we know all the probabilities’ value of the events mentioned in the sample space.
Let’s consider the random variable mentioned in the exercise. Let X be the number of the heads obtained from three tosses. Then the values of X are as follows;
If the outcome of the experiment is TTT then we have no head, then X = 0.
If the outcome is any one of TTH or THT or HTT then we have only one head, then X =1.
If the outcome is any one of HHT or HTH or THH then we have two heads, then X=2.
If the outcome is TTT then we have no head, thus X= 0.
Thus, P(X= 0) = P(TTT) = 8/27 (from equation 3 mentioned above)
P(X=1) = P(HTT or THT or TTH) = P(HTT) + P(THT) +P(TTH) = 3× (4/27) = 4/9 ( use equation 2)
P(X=2) = P(HHT or HTH or THH) = P(HHT) + P(HTH) + P(HHT) = 3× (2/27) = 2/9 ( use equation 1)
P(X = 3) = P(HHH) = 1/27 (use equation 4).
If we add up all the probabilities the total will be equal to 1. There is another explanation of this fact, mentioned below.
No more events left in the sample space which means X cannot take any other value other than 0,1,2,3. Hence P(X = 0 or 1 or 2or 3) = P(sample space) = 1. (Probability of sample space is always 1)
Exercise: Suppose you will be tossing this biased coin thrice. How many heads are you expecting?
Comments