Probability random variable
Probability random variable
(iii) In the experiment of taking out four articles (one after the other) at random
from a lot of 20 articles in which 6 are defective, we want to know the
number of defectives in the sample of four and not in the particular sequence
of defective and nondefective articles.
In all of the above experiments, we have a rule which assigns to each outcome of
the experiment a single real number. This single real number may vary with different
outcomes of the experiment. Hence, it is a variable. Also its value depends upon the
outcome of a random experiment and, hence, is called random variable. A random
variable is usually denoted by X.
If you recall the definition of a function, you will realise that the random variable X
is really speaking a function whose domain is the set of outcomes (or sample space) of
a random experiment. A random variable can take any real value, therefore, its
co-domain is the set of real numbers. Hence, a random variable can be defined as
follows :
Definition 4 A random variable is a real valued function whose domain is the sample
space of a random experiment.
For example, let us consider the experiment of tossing a coin two times in succession.
The sample space of the experiment is S = {HH, HT, TH, TT}.
If X denotes the number of heads obtained, then X is a random variable and for
each outcome, its value is as given below :
X (HH) = 2, X (HT) = 1, X (TH) = 1, X (TT) = 0.
More than one random variables can be defined on the same sample space. For
example, let Y denote the number of heads minus the number of tails for each outcome
of the above sample space S.
Then Y (HH) = 2, Y (HT) = 0, Y (TH) = 0, Y (TT) = 2.
Thus, X and Y are two different random variables defined on the same sample
space S.
Example 22 A person plays a game of tossing a coin thrice. For each head, he is
given Rs 2 by the organiser of the game and for each tail, he has to give Rs 1.50 to the
organiser. Let X denote the amount gained or lost by the person. Show that X is a
random variable and exhibit it as a function on the sample space of the experiment.
Solution X is a number whose values are defined on the outcomes of a random
experiment. Therefore, X is a random variable.
Now, sample space of the experiment is
S = {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT}
PROBABILITY 559
Then X (HHH) = Rs (2 × 3) = Rs 6
X (HHT) = X (HTH) = X (THH) = Rs (2 × 2 1 × 1.50) = Rs 2.50
X (HTT) = X (THT) = (TTH) = Rs (1 × 2) (2 × 1.50) = Re 1
and X (TTT) = Rs (3 × 1.50) = Rs 4.50
where, minus sign shows the loss to the player. Thus, for each element of the sample
space, X takes a unique value, hence, X is a function on the sample space whose range
is
{ 1, 2.50, 4.50, 6}
Example 23 A bag contains 2 white and 1 red balls. One ball is drawn at random and
then put back in the box after noting its colour. The process is repeated again. If X
denotes the number of red balls recorded in the two draws, describe X.
Solution Let the balls in the bag be denoted by w1, w2, r. Then the sample space is
S = {w1 w1, w1 w2, w2 w2, w2 w1, w1 r, w2 r, r w1, r w2, r r}
Now, for S
X ( ) = number of red balls
Therefore
X ({w1 w1}) = X ({w1 w2}) = X ({w2 w2}) = X ({w2 w1}) = 0
X ({w1 r}) = X ({w2 r}) = X ({r w1}) = X ({r w2}) = 1 and X ({r r}) = 2
Thus, X is a random variable which can take values 0, 1 or 2.
13.6.1 Probability distribution of a random variable
Let us look at the experiment of selecting one family out of ten families f1, f2 ,..., f10 in
such a manner that each family is equally likely to be selected. Let the families f1, f2,
... , f10 have 3, 4, 3, 2, 5, 4, 3, 6, 4, 5 members, respectively.
Let us select a family and note down the number of members in the family denoting
X. Clearly, X is a random variable defined as below :
X (f1) = 3, X (f2) = 4, X (f3) = 3, X (f4) = 2, X (f5) = 5,
X (f6) = 4, X (f7) = 3, X (f8) = 6, X (f9) = 4, X (f10) = 5
Thus, X can take any value 2,3,4,5 or 6 depending upon which family is selected.
Now, X will take the value 2 when the family f4 is selected. X can take the value
3 when any one of the families f1, f3, f7 is selected.
Similarly, X = 4, when family f2, f6 or f9 is selected,
X = 5, when family f5 or f10 is selected
and X = 6, when family f8 is selected.
560 MATHEMATICS
Since we had assumed that each family is equally likely to be selected, the probability
1
that family f4 is selected is .
10
1 1
Thus, the probability that X can take the value 2 is . We write P(X = 2) =
10 10
Also, the probability that any one of the families f1, f3 or f7 is selected is
3
P({f1, f3, f7}) =
10
3
Thus, the probability that X can take the value 3 =
10
3
We write P(X = 3) =
10
Similarly, we obtain
3
P(X = 4) = P({f2, f6, f9}) =
10
2
P(X = 5) = P({f5, f10}) =
10
1
and P(X = 6) = P({f8}) =
10
Such a description giving the values of the random variable along with the
corresponding probabilities is called the probability distribution of the random
variable X.
In general, the probability distribution of a random variable X is defined as follows:
Definition 5 The probability distribution of a random variable X is the system of numbers
X : x1 x2 ... xn
P(X) : p1 p2 ... pn
n
where, pi 0, pi = 1, i = 1, 2,..., n
i 1
The real numbers x1, x2,..., xn are the possible values of the random variable X and
pi (i = 1,2,..., n) is the probability of the random variable X taking the value xi i.e.,
P(X = xi) = pi
PROBABILITY 561
48 48 144
=
52 52 169
P(X = 1) = P(ace and non-ace or non-ace and ace)
= P(ace and non-ace) + P(non-ace and ace)
= P(ace). P(non-ace) + P (non-ace) . P(ace)
4 48 48 4 24
=
52 52 52 52 169
and P(X = 2) = P (ace and ace)
4 4 1
=
52 52 169
Thus, the required probability distribution is
X 0 1 2
144 24 1
P(X)
169 169 169
1 52 75
=3
6 62 216
P(X = 2) = P (two doublets and one non-doublet)
1 1 5 1 5 1 5 1 1 1 5 15
= 3
6 6 6 6 6 6 6 6 6 62 6 216
and P(X = 3) = P (three doublets)
1 1 1 1
=
6 6 6 216
Thus, the required probability distribution is
X 0 1 2 3
125 75 15 1
P(X)
216 216 216 216
Verification Sum of the probabilities
n
pi =
125 75 15 1
i 1 216 216 216 216
125 75 15 1 216
= 1
216 216
PROBABILITY 563
Example 26 Let X denote the number of hours you study during a randomly selected
school day. The probability that X can take the values x, has the following form, where
k is some unknown constant.
0.1, if x 0
kx, if x 1or 2
P(X = x) =
k (5 x), if x 3or 4
0, otherwise
(a) Find the value of k.
(b) What is the probability that you study at least two hours ? Exactly two hours? At
most two hours?
X 0 1 2 3 4
P(X) 0.1 k 2k 2k k
n
(a) We know that pi = 1
i 1
Therefore 0.1 + k + 2k + 2k + k = 1
i.e. k = 0.15
(b) P(you study at least two hours) = P(X 2)
= P(X = 2) + P (X = 3) + P (X = 4)
= 2k + 2k + k = 5k = 5 × 0.15 = 0.75
P(you study exactly two hours) = P(X = 2)
= 2k = 2 × 0.15 = 0.3
P(you study at most two hours) = P(X 2)
= P (X = 0) + P(X = 1) + P(X = 2)
= 0.1 + k + 2k = 0.1 + 3k = 0.1 + 3 × 0.15
= 0.55
13.6.2 Mean of a random variable
In many problems, it is desirable to describe some feature of the random variable by
means of a single number that can be computed from its probability distribution. Few
such numbers are mean, median and mode. In this section, we shall discuss mean only.
Mean is a measure of location or central tendency in the sense that it roughly locates a
middle or average value of the random variable.
564 MATHEMATICS
Definition 6 Let X be a random variable whose possible values x1, x2, x3, ..., xn occur
with probabilities p1, p2, p3,..., pn , respectively. The mean of X, denoted by , is the
n
number xi pi i.e. the mean of X is the weighted average of the possible values of X,
i 1
In other words, the mean or expectation of a random variable X is the sum of the
products of all possible values of X by their respective probabilities.
Example 27 Let a pair of dice be thrown and the random variable X be the sum of the
numbers that appear on the two dice. Find the mean or expectation of X.
Solution The sample space of the experiment consists of 36 elementary events in the
form of ordered pairs (xi , yi), where xi = 1, 2, 3, 4, 5, 6 and yi = 1, 2, 3, 4, 5, 6.
The random variable X i.e. the sum of the numbers on the two dice takes the
values 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 or 12.
1
Now P(X = 2) = P({(1,1)})
36
2
P(X = 3) = P({(1,2), (2,1)})
36
3
P(X = 4) = P({(1,3), (2,2), (3,1)})
36
4
P(X = 5) = P({(1,4), (2,3), (3,2), (4,1)})
36
5
P(X = 6) = P({(1,5), (2,4), (3,3), (4,2), (5,1)})
36
6
P(X = 7) = P({(1,6), (2,5), (3,4), (4,3), (5,2), (6,1)})
36
5
P(X = 8) = P({(2,6), (3,5), (4,4), (5,3), (6,2)})
36
PROBABILITY 565
4
P(X = 9) = P({(3,6), (4,5), (5,4), (6,3)})
36
3
P(X = 10) = P({(4,6), (5,5), (6,4)})
36
2
P(X = 11) = P({(5,6), (6,5)})
36
1
P(X = 12) = P({(6,6)})
36
The probability distribution of X is
X or xi 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 5 4 3 2 1
P(X) or pi
36 36 36 36 36 36 36 36 36 36 36
Therefore,
n
1 2 3 4
= E(X) = xi pi 2 3 4 5
i 1 36 36 36 36
5 6 5 4 3 2 1
6 7 8 9 10 11 12
36 36 36 36 36 36 36
2 6 12 20 30 42 40 36 30 22 12
= =7
36
Thus, the mean of the sum of the numbers that appear on throwing two fair dice is 7.
13.6.3 Variance of a random variable
The mean of a random variable does not give us information about the variability in the
values of the random variable. In fact, if the variance is small, then the values of the
random variable are close to the mean. Also random variables with different probability
distributions can have equal means, as shown in the following distributions of X and Y.
X 1 2 3 4
1 2 3 2
P(X)
8 8 8 8
566 MATHEMATICS
Y 1 0 4 5 6
1 2 3 1 1
P(Y)
8 8 8 8 8
1 2 3 2 22
Clearly E(X) = 1 2 3 4 2.75
8 8 8 8 8
1 2 3 1 1 22
and E(Y) = 1 0 4 5 6 2.75
8 8 8 8 8 8
The variables X and Y are different, however their means are same. It is also
easily observable from the diagramatic representation of these distributions (Fig 13.5).
Fig 13.5
To distinguish X from Y, we require a measure of the extent to which the values of
the random variables spread out. In Statistics, we have studied that the variance is a
measure of the spread or scatter in data. Likewise, the variability or spread in the
values of a random variable may be measured by variance.
Definition 7 Let X be a random variable whose possible values x1, x2,...,xn occur with
probabilities p(x1), p(x2),..., p(xn) respectively.
2
Let = E (X) be the mean of X. The variance of X, denoted by Var (X) or x is
defined as
n
2
x = Var (X) = ( xi ) 2 p( xi )
i 1
2
or equivalently x = E(X )2
PROBABILITY 567
x
= Var(X) = ( xi )2 p ( xi )
i 1
n
= ( xi 2 2
2 xi ) p( xi )
i 1
n n n
= xi 2 p( xi ) 2
p ( xi ) 2 xi p ( xi )
i 1 i 1 i 1
n n n
= xi 2 p( xi ) 2
p ( xi ) 2 xi p ( xi )
i 1 i 1 i 1
n n n
= xi 2 p ( xi ) 2
2 2
since p (xi ) =1and = xi p ( xi )
i 1 i =1 i 1
n
= xi 2 p ( xi ) 2
i 1
2
n n
2
or Var (X) = xi p( xi ) xi p( xi )
i 1 i 1
n
or Var (X) = E(X2) [E(X)]2, where E(X2) = xi 2 p ( xi )
i 1
Example 28 Find the variance of the number obtained on a throw of an unbiased die.
1
Also P(1) = P(2) = P(3) = P(4) = P(5) = P(6) =
6
Therefore, the Probability distribution of X is
X 1 2 3 4 5 6
1 1 1 1 1 1
P(X)
6 6 6 6 6 6
n
Now E(X) = xi p( xi )
i 1
1 1 1 1 1 1 21
=1 2 3 4 5 6
6 6 6 6 6 6 6
2 1 2 1 2 1 2 1 2 1 2 1 91
Also E(X2) = 1 2 3 4 5 6
6 6 6 6 6 6 6
Thus, Var (X) = E (X2) (E(X))2
2
91 21 91 441 35
=
6 6 6 36 12
Example 29 Two cards are drawn simultaneously (or successively without replacement)
from a well shuffled pack of 52 cards. Find the mean, variance and standard deviation
of the number of kings.
Solution Let X denote the number of kings in a draw of two cards. X is a random
variable which can assume the values 0, 1 or 2.
48!
48
C2 2!(48 2)! 48 47 188
Now P(X = 0) = P (no king) 52
C2 52! 52 51 221
2!(52 2)!
4 48
C1 C1
P(X = 1) = P (one king and one non-king) 52
C2
4 48 2 32
=
52 51 221
PROBABILITY 569
4
C2 4 3 1
and P(X = 2) = P (two kings) = 52
C2 52 51 221
Thus, the probability distribution of X is
X 0 1 2
188 32 1
P(X)
221 221 221
n
188 32 1 34
= 0 1 2
221 221 221 221
n
Also E(X2) = xi2 p ( xi )
i 1
188 2 32 1 36
= 02 1 22
221 221 221 221
Now Var(X) = E(X2) [E(X)]2
2
36 34 6800
=
221 221 (221) 2
6800
Therefore x
= Var(X) 0.37
221
EXERCISE 13.4
1. State which of the following are not the probability distributions of a random
variable. Give reasons for your answer.
(i) X 0 1 2
P(X) 0.4 0.4 0.2
(ii) X 0 1 2 3 4
P(X) 0.1 0.5 0.2 0.1 0.3
570 MATHEMATICS
(iii) Y 1 0 1
P(Y) 0.6 0.1 0.2
(iv) Z 3 2 1 0 1
P(Z) 0.3 0.2 0.4 0.1 0.05
2. An urn contains 5 red and 2 black balls. Two balls are randomly drawn. Let X
represent the number of black balls. What are the possible values of X? Is X a
random variable ?
3. Let X represent the difference between the number of heads and the number of
tails obtained when a coin is tossed 6 times. What are possible values of X?
4. Find the probability distribution of
(i) number of heads in two tosses of a coin.
(ii) number of tails in the simultaneous tosses of three coins.
(iii) number of heads in four tosses of a coin.
5. Find the probability distribution of the number of successes in two tosses of a die,
where a success is defined as
(i) number greater than 4
(ii) six appears on at least one die
Determine
(i) k (ii) P(X < 3)
(iii) P(X > 6) (iv) P(0 < X < 3)
PROBABILITY 571
9. The random variable X has a probability distribution P(X) of the following form,
where k is some number :
k , if x 0
2k , if x 1
P(X) =
3k , if x 2
0, otherwise