Understanding Random variable- a variable takes value with uncertainty.
- Kuntal Bakuli
- Feb 17, 2020
- 3 min read
Updated: Apr 16, 2020
Lecture Note - 1
An easy introduction:
Before getting into the random variable, let's start with a brief introduction to a random experiment.

Suppose I am going to flip a coin. I know either head or tail will appear, but I don’t know exactly which one will appear. In this experiment I know the possible outcomes but don’t know the exact outcome of the experiment before conducting it, the outcome is uncertain. This is uncertainty turn this experiment into a random experiment.
Any experiment, where we have more than one possible outcome, but we don’t know the exact result or outcome before conducting it, is a random experiment.
For example, the average temperature of next week in your locality, the arrival time of a particular train in a particular railway station tomorrow. Events mentioned in the example have a range of outcomes, the average temperature of next week will vary a little bit depending on other weather conditions, Train may delay 10 to 15 minutes. Thus in these cases, we may know the possible range of outcomes but cannot make any exact guess about them with concrete logic.
I heard of one great mathematician, who was a magician at times can flip a coin with supreme control. He gets head or tail, whichever he wants. To him, this experiment is not random because he knows what he is going to get after flipping it.
Consider a random experiment of coin tossing, we are going to toss the coin twice.
Thus the sample space is Ω = {HH,TH,HT,TT}.
The random variable is nothing but a real-valued function defined over Ω.
For example, let X be a function defined over the above-mentioned sample space. X denotes the total number of heads obtained in that experiment.
Thus X: Ω → R
X(HH) = 2; in easy words, if we get HH then total heads obtained is equal to 2.
X(TH) = 1; in easy words, if we get TH then total heads obtained is equal to 1.
X(HT) = 1; explanation is similar as previous case.
X(TT) = 0; in TT there is no head thus the value of the total number of heads is zero.
Thus X associates some real numbers with the elements of sample space of a random experiment. Here HH, TH, HT, TT are the elements of the sample space. In this example, X takes the value 2 when we get two heads. It is clear that the value of X is depending on the outcome of the random experiment, thus there must be some probabilities for each possible value of X.
Each element of sample space has a probability.
If the coin is fair then, P(HH) = 1/4 = P(TH) = P(HT) = P(TT).
P(X=1) = P(TH or HT) =P(TH)+P(HT) =1/4 +1/4 =1/2 ( as TH and HT are disjoint or mutually exclusive events).
P(X=0) = P(TT) = ¼
P(X=2) = P(HH) = ¼
X can take any value of {0,1,2}; X can not take any real value other than these three values. If we say X=5, that is impossible. Thus P(X=5) = 0, because the probability of any impossible event is 0.
Not only that , P(X= r) = 0 for any real number "r" not equals to any one of 0,1,2.
Thus, we can say a random variable is associated with a random experiment. In the above-mentioned case we have found a random variable taking some discrete values. The set containing possible values of the random variable is countable and in this particular case, the set is also finite.
The set of the possible values of the random variable is called the Range or Support of the random variable.
Exercise: 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.
Comentários