Unit 4.
Unit 4.
Values of X 3 2 2 2 1 1 1 0
A random variable, say X, which can take a finite or a countably infinite numbers of values in an
interval of the real line is called discrete random variable. For example, if we toss a coin, the variable can
take only two values 0 and 1 assigned to tail and head respectively.
i.e. X =
In a rolling of a die, only six values of the variable x, i.e. 1,2,3,4,5&6 are possible outcomes, hence
the variable x is discrete , here the variable X = { x: x is 1,2,3,4,5&6}
A random variable X, which can take infinite and uncountable set of values in an interval of real line
is said to be a continuous random variable , the probability of a point x is zero
i.e. P(X=x) = 0. But the probability is ascribable in an interval. For example, the weight of middle aged
people in Kathmandu lying between 40 kg and 150 kg is a continuous random variable.
Symbolically , X ={ x: 40 x 150}
92
Properties of random variable:
(i) If X is a random variable and a and b are any two constant, then aX+b is also a random variable.
(ii) If X is a random variable, then X2 is also a random variable.
(iii) If X is a random variable then 1/ X is also a random variable.
(iv) If X and Y are random variables defined on the same sample space S then, X+Y, X-Y, aX, bY
and aX+bY are also random variables with a and b are non negative constants.
Then P (xi) = P(X = xi) is called probability mass function of random variable X. The set of ordered pairs
{xi, P (xi)} i = 1, 2,……….n specifies the probability distribution of the random variable X.
In case of continuous random variable, we do not talk of probability at a particular point, (which is
always zero), but we always talk of probability in an interval, If X is continuous random variable and f X(x)
is a continuous function of X. Then fX(x) dx, gives the probability of the event that X lies in the interval
i.e. fx (x) dx = P
Then fx (x) or simply f(x) is called probability density function (pdf). It is also known as frequency function
because it also gives the proportion of units lying in the interval x - & x + .
f(x) dx = 1, it implies that the total area under the frequency curve is always unity.
93
Com
L.H.S. = x(2 - x) dx = bin = × =1
Hence, f(x) is pdf.
A function FX(x) of a random variable X for a real value x giving the probability of an event (X x) is called
a cumulative distribution function (cdf) or simply distribution function, symbolically, FX(x)= P(X x),
obviously X lies in the interval [- x] .It is to be noted that
If ‘a’ and ‘b’ are two constant values such that a<b and F is the distribution function then P(a < X
b)= F(b) – F(a)
If F(x) is the distribution function of a mono-variate X, then
If discrete random variable X takes sample points x 1, x2…………… xn and the number pi is the probability
function satisfies the property and Σ p = 1 such that FX(x)= P(X x) is called the discrete distribution
function of random variable X.
If X is a continuous random variable with the pdf f(x) then the function F(x) defined as F(x) = P (X ≤ x) =
f(x) dx is called the distribution function (df) or sometimes the cumulative distribution function (cdf) of the
random variable X.
Q. IOF (2060)3. (b) A random variable X has the following probability function.
x 0 1 2 3 4 5 6 7 8
P(x) k 3k 5k 7k 9k 11k 13k 15k 17k
(i) Determine the values of k.
(ii) Find P(X < 3) , P(X 3) , P(0< X <5).
(iii) Find the distribution function of X.
Solution:-
(i). If given p(x) is pmf then total probability is unity
94
or, 81k = 1, k= .
0 0.012 0.012
1 0.037 0.049
2 0.062 0.111
3 0.086 0.198
4 0.111 0.309
5 0.136 0.444
6 0.160 0.605
7 0.185 0.790
8 0.210 1.000
Similarly, if X is continuous random variable with probability density function f(x) then mathematical
expectation of r.v X is defined as
95
E(X) = xf(x) dx. :. where f(x) 0 for every x [a, b] andf(x) dx = 1
X: x1 x2 ……………… xn
f: f1 f2 ………………… fn
–=
– = x1 + x2 + ............... + xn, we observed that, out of total of N cases fi cases are Favourable to xi.
Hence mathematical expectation of a random variable is nothing but its arithmetic mean.
Table Format:-
X P(X) X2 XP(X) X2P(X)
96
Where, E (X2) = Σx2P(x).
E (X) = ΣxP(x).
Properties of Variance:
Example:- In three tosses of a coin, Let X, be the number of heads. Tabulate the possible outcomes with
the corresponding value of X. By simply counting & derive the probability distribution of X and hence
calculate the expected value and variance of X.
Solution:- let H represents a head, T a tail and X, the random variable denoting the number of heads.
Then the following table shows the value of random variable with sample points.
The random variable X takes the value 0, 1, 2, 3. since from the above table, we find that the number of
cases favorable to the coming of 0, 1, 2 & 3 heads are 1, 3, 3 and 1 respectively . Therefore P(x = 0) =
, P(X = 1) = , P(X = 2) = , P(X = 2) = then probability distribution of X can be summarized as
follows.
X 0 1 2 3
97
Then E(X) = ΣxP (x) = 0 × + 1 × +2 × + 3 × = = 1.5
Thus expected value of random variable 1.5 & it's variance is 0.75
Q. Example, Calculate Mathematical Expectation and variance from the following data.
X 1 2 3 4 5 6
P(X) 0.1 0.15 0.3 0.2 0.15 0.1
Solution:
And, V(X) = E(X2) – [E(X)] 2, = EX2.P(X) – [ΣXP(X)]2 , = 13.95 – (3.45)2 , = 13.95 – 11.90, = 2.05
S.D = = = 1.43
Q.IOF(2066) 4.(a) Is there any relationship between expectation of random variable and mean of the
distribution ? If so, what is that? The Probability mass function of random variable X is as given in the
table,
X=x -6 -3 0 3 6 9
P(X=x) 0.1 0.1 0.2 0.2 0.3 0.1
Solution:-
98
6 0.3 36 1.8 10.8
9 0.1 81 0.9 8.1
ΣP(X)=1. ΣXP(X)= 2.4 ΣX2P(X)= 25.2
E (8X-10) = ?
Here, E (8X-10) = 8 E(X) – E(10).
= 8 E(X) – 10,
= 8 EXP(X) – 10,
= 8 x 2.4 – 10,
= 19.20 – 10, = 9.20
2
E(6x+3) =?
Here, E (6x+3)2 = E (36X2 + 36X + 9)
= 36E (X2) + 36 E(X) + E (9),
= 36E X2P(X) + 36EXP(X) + 9,
= 36 x 25.2 + 36 x 2.40 + 9,
= 907.2 + 86.4 + 9, = 1002.6 Ans.
V (4x+7) =?
Here, V (4x+7) = 16 V(X) + V (7), = 16 V (X) + 0, = 16 [E(X2) – [E(X)] 2 =16 [EX2P(X) – {EXP(X)} 2 ] ,
= 16 [25.20 – (2.4) 2 ], = 16 [25.20-5.76], = 16 x [19.44] = 311.04 Ans.
x 1 2 3 4 5 6 7 8 9
P(x) k 3k 5k 7k 9k 11k 13k 15k 17k
(i) Determine the values of k.
(ii) Find P(X < 4), P(X 4), and P (0 < X <5).
(iii) Find mean and variance.
Solution:-
(i). If given p(x) is pmf then total probability is unity ………..[ By the definition].
:. k+3k+5k+7k+9k+11k+13k+15k+17k = 1,
or, 81k = 1, k= .
P (X 4) = 1 - P(X<4) = 1 - = =,
99
X=x P(X) P(X)=P(X=x) X2 XP(X) X2P(X)
1 k 0.012 1 0.012346 0.012346
2 3k 0.037 4 0.074074 0.148148
3 5k 0.062 9 0.185185 0.555556
4 7k 0.086 16 0.345679 1.382716
5 9k 0.111 25 0.555556 2.777778
6 11k 0.136 36 0.814815 4.888889
7 13k 0.160 49 1.123457 7.864198
8 15k 0.185 64 1.481481 11.85185
9 17k 0.210 81 1.888889 17
∑XP(X) = 6.481481 ∑X2P(X) = 46.48148
Q. IOF (2068) 4.(a) The probability mass function of random variable X is as given in the table,
X=x 1 2 3 4 5 6
P(X=x) 0.10 0.15 0.20 0.25 0.18 0.12
Solution:
(i)E (9x-7)2 =?
Here, E (9x-7)2 = E (81X2 - 126X + 49)
= 81E (X2) - 126 E(X) + E (49),
= 81E X2P(X) - 126EXP(X) +49,
= 81 x 15.32 - 126 x 3.62 + 49,
= 1240.92 – 456.12 + 49 , = 833.8 Ans.
(ii)V (4x± 3) =?
Here, V (4x ± 3) = 16 V(X) ± V (3), = 16 V (X) ± 0, = 16 [E(X2) – [E(X)] 2 =16 [EX2P(X) – {EXP(X)} 2],
100
= 16 [15.32 – (3.62)2 ], = 16 [15.32 – 13.10], = 16 x [ 2.22 ] = 35.52 Ans.
Q. IOF (2067) 3. (b) Define Distribution function of discrete random variable? The probability mass
function of discrete random X is given in the table,
X=x 0 1 2 3 4 5 6 7 8
P(X=x) a 4a 9a 16a 25a 36a 49a 64a 81a
Determine a.Find E (6X-9), b.V (5X±4)
Solution:-
(i). If given p(x) is pmf then total probability is unity ………..[ By the definition].
:. a+4a+9a+16a+25a+36a+49a+64a+81a = 1,
or, 285a = 1, a= .
(ii)E (6X-9) =?
Here, V (5x ± 4) = 25 V(X) ± V (4), = 25 V (X) ± 0, = 25 [E(X2) – [E(X)] 2 =25 [EX2P(X) – {EXP(X)} 2],
Q. IOF (2066 Make up.) 4. (b) Define random variable? Let X be a random variable with p.m.f. as given
below:
X=x 0 1 2 3
P(X=x)=P(X) 1/3 1/2 1/24 1/8
101
Find the expected value of (X-1)2
Solution:-
(i). Find (X-1)2=?
Q. IOF (2063/64)3. (b) Define Random variable. The probability mass function of X is as given in the
table,
x 0 1 2 3 4 5 6 7 8
P(X=x) k 3k 5k 7k 9k 11k 13k 15k 17k
Solution:-
If given p(x) is pmf then total probability is unity ………..[ By the definition].
:. k+3k+5k+7k+9k+11k+13k+15k+17k = 1,
or, 81k = 1, k= .
102
(ii). E (4X-9) =?
x 0 1 2 3 4 5 6
P(x) 0.10 0.15 0.20 0.25 0.20 0.06 0.04
Find:
(i) P(X < 4).
(ii) P (2 < X <5).
(iii) Mean and variance of X.
Solution:-
(i) P(X< 4) = P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3) = 0.10+ 0.15 + 0.20 + 0.25 = 0.70,
(ii) P ( 2 < X <5) = P(X = 3) + P(X = 4) = 0.25 + 0.20 = 0.45
(iii) Mean and variance of X,
Q.IOF (2065).5 (a).what is random variable? The probability mass function of X is as given in the table,
103
X=x -2 -1 0 1 2 3
P(X=x) 0.1 k 0.2 2k 0.3 k
(i) Determine K.
(ii) Determine E (3X – 9) and V (6X + 8)
Solution:-
(i). If given p(x) is pmf then total probability is unity ………..[ By the definition].
:. 0.1 + K + 0.2 + 2K + 0.3 + K = 1,
Or, 4 K + 0.6 = 1, Or, 4k = 1- 0.6, Or, 4k = 0.4,
k= , = 0.1,
Here, E (3X-9) = 3 E(X) – E (9),= 3 E(X) – 9,= 3 EXP(X) – 9,= 3 x 0.80 – 9,= 2.40 – 9, = -6.6 Ans.
And, V (6X + 8) =?
Here, V (6x + 8) = 36 V(X) + V (8), = 36 V (X) + 0, = 36 [E(X2) – [E(X)] 2 = 36 [EX2P(X) – {EXP(X)} 2],
X=x -2 -1 0 1 2 3
P(X=x) 0.1 k 0.2 2k 0.3 k
(i) Find the constant K and compute E(X).
(ii) Find V (X)
(iii) Find the distribution function of X.
Solution:-(i). If given p(x) is pmf then total probability is unity ………..[ By the definition].
:. 0.1 + K + 0.2 + 2K + 0.3 + K = 1,
104
-2 0.1 0.1 4 -0.2 0.40
-1 k 0.1 1 -0.1 0.10
0 0.2 0.2 0 0 0.00
1 2k 0.2 1 0.2 0.20
2 0.3 0.3 4 0.6 1.20
3 k 0.1 9 0.3 0.90
∑XP(X) = 0.80 ∑X2P(X) = 2.80
:. Compute E(X) = EXP(X) = 0.80 Ans.
(ii). Find , V (X)] = E(X2) – [E(X)]2, = EX2P(X) –[EXP(X)]2, = [2.80] – [0.80]2, = 2.80 – 0.64 = 2.16 Ans.
105