MODULE-II
Random variables and Special Distributions
Random variables (RV):
* Introduction to Random variables (One-two dimension) - Discrete and Continuous RV -
* Probability function and Distribution function of RV,
* Expectation, Variance, and its properties,
* Moment Generating function upto second moments.
Special Distributions:
* Bernoulli distribution,
* Binomial distribution,
* Poisson distributions,
* Uniform distribution and Normal distribution.
Random Variable
A Random Variable X is a real-valued function that maps numeric sample space S to the real numbers R.
(or)
A random variable X is a real number that is determined by the outcomes of the random experiment.
Eg:1.Tosssing 2 coins simultaneously
Sample space ={HH, HT, TH, TT}
Random Variable (r.v.)
A random variable is a function that assigns a real value to an outcome in the sample space of a random
experiment.
For example: If we flip a coin, we can assign a number to each possible outcomes as follows:
Events r.v. X prob. of X
When tail(T) is occurs x1 = 0 1/2
When head(H) is occurs x2 = 1 1/2
Example: If we flipped two fair (unbiased) coin,
Events r.v. X for occurring number of head prob. of X
When TT is occurs x1 = 0 1/4
When HT is occurs x2 = 1 2/4
When TH is occurs x2 = 1 2/4
When HH is occurs x3 = 2 1/4
Random Variables
Continuous Random Variable
Probability Mass Function(p.m.f)
rand
Probability distribution function for R.V
Probability density function - CRV
Distribution function or Cumulative Distrbution function (c.d.f)
Discrete Case
Distribution function or Cumulative Distrbution function (c.d.f)
Continuous Case
If X is a continuous random variable then cumulativedistribution function F
(x) is given by
x
∫−∞
P(X ≤ ) = f(x)dx
d d
i.e, f(x) = F(x), means p . d . f = (c.d.f)
dx dx
𝑥
Properties of distribution function
For a continuous random variable X, the cumulative distribution function satisfies the
following properties.
(i) 0 ≤ F ( x) ≤ 1 .
(ii) F ( x) is a real valued non-decreasing. That is, if x < y , then F ( x) ≤ F ( y) .
(iii) F ( x) is continuous everywhere.
(iv) lim x → −∞ F (x) = F( − ∞) = 0 and lim x → ∞ F (x) = F (+∞) = 1.
(v) P (X > x) = 1 − P (X≤ x) = 1 − F (x) .
(vi) P(a < X < b) = F(b) −F(a) .
Measures of central tendency help you find the middle, or the average, of a
dataset.
The 5 most common measures of central tendency are the
1. Mean, 2. Median, 3. Mode, 4. Variavce, and 5. SD
Mean: The sum of all values divided by the total number of values.
Median: The middle number in an ordered dataset.
Mode: The most frequent value.
Variance The variance(σ) measures the average degree to which each point
differs from the mean.
Standard Deviation: Standard deviation is the spread of a group of numbers from the mean. While standard
deviation is the square root of the variance, variance is the average of the squared difference of each data point from the
mean.
Measures of central dispersion -Discrete Random variable
Mean: The sum of the product of x values and their corresponding probabilities is called mean (or) average
(or) expectation.
Variance: The sum of squares of deviation from means is called variance.
Standard Deviation(S.D): square root of the variance.
Discrete Case:
❖ The mean of the discrete Probability Distribution is defined as
∑ =1 ( )
= =
∑ =1 ( ) since ∑ =1 ( ) = 1
∑ =1 ( )
❖ Expectation: : The Expectation of the discrete Probability Distribution is defined as
E(X) =
∑ =1 ( )
❖ Variance: The variance of the discrete Probability Distribution is defined as
( ) = ( )= [ − ( )]2
𝑖
𝑖
𝑝
𝑥
∴ ( )= [ ]2 − [ ( )]2
𝑛
𝜇
𝑖
𝑖
𝑖
𝑖
𝑖
𝑖
𝑖
𝑖
𝑖
𝑖
𝑖
𝑖
𝑖
𝑥
𝑥
𝑝
𝑝
𝑝
𝑥
𝑥
𝑥
𝑥
𝑝
𝜇
𝑉
𝑎
𝑟
𝑉
𝑋
𝑋
𝐸
𝑉
𝑋
𝑋
𝐸
𝐸
𝑋
𝑋
𝐸
𝑋
𝑥
𝑝
𝑥
𝑛
𝑛
𝑛
𝑛
Important Properties of Mean and Variance of Random Variables
Property 1: E (X + Y) = E (X) + E (Y). (X and Y are random variables)
Property 2: E (X1 + X2 + … + Xn) = E (X1) + E (X2) + … + E (Xn) = Σi E (Xi).
Property 3: E (XY) = E (X) E (Y). Here, X and Y must be independent.
Property 4: E [aX] = a E [X] and E [X + a] = E [X] + a, where a is a constant
Property 5: For any random variable, X > 0, E(X) > 0.
Property 6: E(Y) ≥ E(X) if the random variables X and Y are such that Y ≥ X.
Property 7: The variance of a constant is 0.
Property 8: V [aX + b] = a2 V(X), where a and b are constants, X is random variable.
Property 9: V (a1X1 + a2 X2 + … + anXn) = a12 V(X1) + a22 V(X2) + … + an2 V(Xn).
1. If 3 cars are selected randomly from 6 cars having 2 defective cars.
a)Find the Probability distribution of defective cars.
b)Find the Expected number of defective cars.
Sol: Number of ways to select 3 cars from 6 cars =6!𝑐 3
Let random variable X(S) = Number of defective cars = {0,1,2}
4c3 2c0 1
Probability of non defective cars = =
6c3 5
4!𝑐2 2
! 𝑐1 3
Probability of one defective cars = =
6!𝑐3 5
4c1 2c2 1
Probability of two defective cars = =
6c3 5
Clearly,p xi 𝑎!
> 0! 𝑑 ﻃni= 1 p xi = 1
𝑛!
Probability distribution of defective cars is
!𝑥𝑖
! 0 1 2
!𝑝!𝑥𝑖
!
1 3 1
5 5 5
1 3 1
Expected number of defective cars = ﻃn
i= 1 xi p xi = 0 + 1 + 2 = 1
2. Let X be a random variable of sum of two numbers in throwing two fair dice.
Find the probability distribution of X, mean ,variance.
Sol:Sample space of throwing two dices is
S ={(1,1),(1,2),(1,3),(1,4),(1,5),(1,6)
(2,1),(2,2),(2,3),(2,4),(2,5),(2,6)
(3,1),(3,2),(3,3),(3,4),(3,5),(3,6)
(4,1),(4,2),(4,3),(4,4),(4,5),(4,6)
(5,1),(5,2),(5,3),(5,4),(5,5),(5,6)
(6,1),(6,2),(6,3),(6,4),(6,5),(6,6)}
!(𝑆
∴𝑛 !) = 36.
Let X = Sum of two numbers in throwing two dice = {2,3,4,5,6,7,8,9,10,11,12}
X Favorable cases No of Favorable cases 𝑝!)
!(𝑥
2 (1,1) 1 1
36
3 (2,1),)(1,2) 2 2
36
4 (3,1),(2,2),(1,3) 3
3
5 (4,1),(3,2),(2,3),(1,4) 4 36
4
6 (5,1),(4,2),(3,3),(2,4),(1,5) 5 36
5
7 (6,1),(5,2),(4,3),(3,4),(2,5),(1,6) 6 36
8 (6,2),(5,3),(4,4),(3,5),(2,6) 5 6
36
9 (6,3),(5,4),(4,5),(3,6) 4 5
36
10 (6,4),(5,5),(4,6) 3
4
11 (6,5),(5,6) 2 36
3
12 (6,6) 1 36
2
36
1
36
Clearly,p xi > 0 and ﻃni= 1 p xi = 1
Probability distribution is given by
xi 2 3 4 5 6 7 8 9 10 11 12
p xi 1 2 3 4 5 6 5 4 3 2 1
36 36 36 36 36 36 36 36 36 36 36
n
∑i=1 i ( i)
Mean = μ = xp x
( 36 ) ( 36 ) ( 36 ) ( 36 ) ( 36 ) ( 36 ) ( 36 ) ( 36 )
1 2 3 4 5 6 3 2 1
=2 +3 +4 +5 +6 +7 +8 + 10 + 11 + 12( )
36
( 36 ) ( 36 )
5 4
+9
= 7.
x i 2 p i − μ2
∑
Variance = V(X)=
=
( 36 ) ( 36 ) ( 36 ) ( 36 ) ( 36 ) ( 36 ) ( 36 ) ( 36 ) ( 36 ) ( 36 ) ( 36 )
1 2 3 4 5 6 5 4 3 2 1
4 +9 + 16 + 25 + 36 + 49 + 64 + 81 + 100 + 121 + 144 − 49
∴ Variance = 5 . 83
3. Let X be a random variable of maximum of two numbers in throwing two fair dice simultaneously.
Find the
a)Probability distribution of X
b)Mean
c)Variance
d)P(1<x<4)
e)P(2 ≤ ≤ 4).
Sol: Sample space of throwing two dices = S ={(1,1),(1,2),(1,3),(1,4),(1,5),(1,6)
(2,1),(2,2),(2,3),(2,4),(2,5),(2,6)
(3,1),(3,2),(3,3),(3,4),(3,5),(3,6)
(4,1),(4,2),(4,3),(4,4),(4,5),(4,6)
(5,1),(5,2),(5,3),(5,4),(5,5),(5,6)
(6,1),(6,2),(6,3),(6,4),(6,5),(6,6)}
∴ ( ) = 36.
𝑛
𝑥
𝑆
Let X = Maximum of two numbers in throwing two dice. So, the range of
X={1,2,3,4,5,6,}
X Favorable cases No of
Favorable
cases
1 (1,1) 1
2 (2,1),)(1,2),(2,2) 3
3 (3,1),(1,3),(2,3)(3,3),(3,2) 5
4 (1,4),(4,1),(4,2),(2,4)(4,3),(3,4),(4,4) 7
5 (1,5),(5,1),(2,5),(5,2)(3,5),(5,3),(5,4),(4,5),(5,5) 9
6 (1,6)(6,1),(6,2),(2,6),(6,3),(3,6),(4,6),(6,4),(6,5)(5,6),(6,6) 11
Clearly,p xi > 0 and ﻃni= 1 p xi = 1
Probability distribution is given by
!𝑥𝑖
! 1 2 3 4 5 6
!𝑝!𝑥𝑖
! 1 3 5 7 9 11
36 36 36 36 36 36
n 1 3 5 7 9 11
Mean = µ = xi p xi = 1 + 2 + 3 +4 + 5 + 6
i= 1 36 36 36 36 36 36
= 4.4 7.
Variance = V X = ﻃxi 2 p i − µ2
1 3 5 7 9 11
= 1 3 6 + 4 3 6 + 9 3 6 + 16 3 6 + 25 3 6 + 36 3 6 -(4.47)2
∴Variance = 1.99.
4.A random variable X has the following probability function
!𝑥𝑖
! -3 -2 -1 0 1 2 3
!𝑝!𝑥𝑖
! K 0.1 k 0.2 2k 0.4 2k
Find k,mean,variance.
Sol: We know that ﻃni= 1 p xi = 1
i.e., k+0.1+k+0.2+2k+0.4+2k = 1
i.e., 6k+0.7 = 1 ∴𝑘
! = 0.05
n
Mean = µ = xi p xi = k − 3 + 0.1 − 2 + k − 1 + 2k 1 + 2 0.4 + 3 2k
i= 1
= 0.8.
Variance = V X = ﻃxi 2 p i − µ2
= k − 3 2 + 0.1 2 − 2 + k − 1 2 + 2k 1 + 4 0.4 + 9 2k -0.64
∴Variance = 2.86.
Measures of central dispersion -Continuous Random variable
Mean: The mean of the continuous Probability Distribution is defined as
∞
∫−∞
μ= xf(x)dx .
Expectation: The Expectation of the continuous Probability Distribution is defined as
∞
∫−∞
E(X) = xf(x)dx .
∞
∫−∞
In general,E(g(x)) = g(x) f(x)dx .
Variance: The variance of the Continuous Probability Distribution is defined as
∞
∫
Var(X) = V(X) = x2 f(x)dx − μ2 .
Mean Deviation: Mean−∞
deviation of continuous probability distribution function is defined as
∞
∫−∞
x − μ f(x)dx .
Median: Median is the point which divides the entire distribution in to two equal parts. In case of continuous distribution,
M b
1
∫a ∫M
median is the point which divides the total area in to two equal parts. i.e, f(x)dx = f(x)dx = ∀ x ∈ (a, b) .
2
Mode: Mode is the value of x for which f(x)is maximum.
i.ef′(x) = 0 and f"(x) < 0 for x ∈ (a, b)

1.If the probability density function ( ) = ; −∞< < ∞. Find the value of ‘k’ and
1+ 2
cumulative distribution function of F(x).
b
∫a
Sol: Since total area under the probability curve is 1i . e, f(x)dx = 1 .
∞
∫−∞ +
dx = 1 .
∞
2k(tan x) = 1 −1
0
2k(tan−1∞ − tan−10) =1
1
∴k=
π
Cumulative distribution function of f(x) is given by
x x
1 x 1 π
∫−∞ ∫−∞ +
f(x)dx = dx = (tan x) −1
= [ + (tan−1x)] .
π −∞ π 2
𝟏
𝐱
𝟏
𝐱
𝑥
𝟐
𝟐
𝑓
𝑥
𝑥
𝐤
𝐤
𝑘
2. If the probability density function f(x) = ce− x
; − ∞ < x < ∞. Find the value of ‘c’,
mean and variance.
Sol: Since total area under the probability curve is 1
b
∫a
i . e, f(x)dx = 1 .
∞
∫−∞
−
dx = 1
∞
∫0
−
2 dx = 1
−
∞
2c ( ) =1
−1 0
1
∴c=
2
∞
1 ∞
∫−∞ ∫
− −
Mean=μ = xf(x)dx = x dx = 0 . sincex is an odd function .
2 −∞
∞
1 ∞ 2 1 ∞ 2 ∞
dx = [x2(− )]
∫−∞ 2 ∫−∞ 2 ∫0
) − 2x( ) + 2(−
2 2 − − − − −
variance = V(X) = x f(x)dx − μ = x dx = − 0 = 2x = 2.
0
𝐜
𝐜
𝐞
𝐞
𝐞
𝐞
𝐞
𝐞
𝐞
𝐞
𝐱
𝐱
𝐱
𝐱
𝐱
𝐱
𝐱
𝐱
𝐞
𝐱
sinx
{ 0 otherwise
3. If the probability density function f(x) = 2 if 0 ≤ x ≤ π . Find mean,
π
median, mode and P(0 < x < π ).
∞
1 2 1 π π
∫−∞ ∫
Sol: Mean=μ = xf(x)dx = x dx = [−xcosx + sinx] = .
2 0 2 0 2
Let M be the Median then
M π
1
∫0 ∫M
f(x)dx = f(x)dx = ∀ x ∈ (−∞, ∞)
2
M π
sinx sinx 1
∫0 2 ∫M 2
dx = dx = ∀ x ∈ (−∞, ∞)
2
π
1 π
∫M
consider dx = then ( − cosx) =1
2 M
π
∴M=
2
sinx
{ 0 otherwise
Since f(x) = 2 if 0 ≤ x ≤ π
To find maximum, we have f′(x) = 0
π
𝟐
𝟐
i.e, cosx = 0 impliesthatx =
2



𝐬
𝐢
𝐧
𝐱
𝐬
𝐢
𝐧
𝐱
0 ifx ≤ 1
4.If the distributed function is given by F(x) = k(x − 1)4if 1 ≤ x ≤ 3 . Find k, f(x), mean .
1 ifx > 3
Sol: Cumulative distribution function of f(x) is given by
x
d
∫−∞
f(x)dx i.e, f(x) = F(x)
dx
0 ifx ≤ 1
i.e, f(x) = 4k(x − 1)3if 1 ≤ x ≤ 3
0 ifx > 3
b
∫a
Since total area under the probability curve is 1i . e, f(x)dx = 1
3
∫1
4k(x − 1)3dx = 1
3 4
[k(x − 1) ] = 1
1
1
∴k=
16
0 ifx ≤ 1
1
∴ f(x) = (x − 1)3 if 1 ≤ x ≤ 3