LEC4N
LEC4N
College of Engineering
Department of Electrical and Electronic Engineering
Lecture- 4
) Random variables)
1
▪ Probability Mass Function (PMF)
For a discrete random variable X, we define the probability mass function f(x) of X
by
f(x) = P(X = x)………………………….(1)
It is a list of probabilities associated with each of its possible values. It is also
sometimes called the discrete probability function.
Example -2: Find the probability function corresponding to the random variable X
(Let X represent the number of heads that can come up ) of a coin is tossed twice.
Sol.
2
Example-3 : Let X be a random variable, and P(X=x) is the PMF given by,
Sol. :
1. We know that; ∑P(xi)=1 , Therefore,
0 + k + 2k + 2k + 3k + k2 + 2k2 + 7k2+ k = 1
9k + 10k2 = 1
10k2 + 9k – 1 = 0
(10k – 1) ( k + 1 ) = 0
Therefore, k = 1/10 and k = -1
k=-1 is not possible because the probability value ranges from 0 to 1. Hence, the
value of k is 1/10.
2. (i) P(X ≤ 6) = 1 – P( x > 6)
P(X≤ 6) = 1 – ( 7k2+k )
P(X≤ 6) = 1 – (7(1/10)2 + ( 1/ 10) ) = 83/100
(ii) P(3<x≤ 6 ) = P( x =4) + P ( x = 5 ) + P ( X = 6)
= 3k + k2 + 2k2
= (3/10) + (1/10)2 + 2 (1/10)2 = 33/100
P(3<x≤ 6 ) = 0.33.
3
Example-4: Find the values of F(x) and F(z) for figures below, and graph PMF.
Note. The distribution function of a discrete random variable takes a scalar form, it
is not decreasing in any domain, and its largest possible value is 1.
Example-5: Suppose a variable X can take the values 1, 2, 3, or 4. The probabilities
associated with each outcome are described by the following table:
Outcome 1 2 3 4
Probability 0.1 0.3 0.4 0.2
Find CDF for the above probability
Sol:
The cumulative distribution function for the above probability distribution is
calculated as follows:
P(X≤ 1) = 0.1
4
P(X≤ 2) = 0.1 + 0.3 = 0.4
P(X≤ 3) = 0.1 + 0.3 + 0.4 = 0.8
P(X≤ 4) = 0.1 + 0.3 + 0.4 + 0.2=1
Example-6: if
▪ Expected Value
One of the most important concepts in probability theory is that of the expectation
of a random variable. If X is a discrete random variable having a probability mass
function f(x), then the expectation, or the expected value, of X, is the sum of
multiplying values by their probabilities denoted by E[X], or 𝜇 is defined by
𝜇 = 𝐸(𝑋) = ∑𝑥 𝑥𝑓(𝑥)…………………(3)
Example-7: Find E[X], where X is the outcome when we roll a fair die.
Solution. Since P(X=1) = P(X=2) = P(X=3) = P(X=4) = P(X=5) =P (X=6) = 1/6,
we obtain
5
▪ Expectation of a function of a random variable
Suppose that we are given a discrete random variable along with its probability mass
function and that we want to compute the expected value of some function of X, say,
g(X). How can we accomplish this? One way is as follows: Since g(X) is itself a
discrete random variable, it has a probability mass function, which can be
determined from the probability mass function of X. Once we have determined the
probability mass function of g(X), we can compute E[g(X)] by using the definition
of expected value.
Example-8: Let X denote a random variable that takes on any of the values −1, 0,
and 1 with respective probabilities
P(X = −1) = 0.2 , P(X = 0) =0 .5, P(X = 1) =0 .3. Compute E[X2].
Sol. Let Y = X2. Then the probability mass function of Y is given by
P(Y = 1) = P(X = −1) + P(X = 1) = 0.5
P(Y = 0) = P(X = 0) = 0.5
Hence,
E[X2] = E[Y] = 1(0.5) + 0(0.5) =0 .5
6
▪ Variance
If X is a random variable with mean μ, then the variance of X, denoted by Var(X),
V(X) or 𝜎 2 is defined by
𝜎 2 = ∑ (𝑥 − 𝜇)2 𝑓(𝑥)
𝑥
𝜎 2 = E[X2] − μ2 ………………(4)
▪ The standard deviation
The standard deviation of a random variable is the root square of the
variance:
𝜎 = √𝜎 2 …………………………(5)
Example: Suppose we have the random variable given in the following
table:
f(x)
calculate the variance and standard deviation for this random variable
▪ Moments
We distinguish between two types of moments: the nth general moment and the
nth central moment.
7
i. The nth general moment
The quantity E[Xn], n ≥ 1, is called the nth general moment of X.
Notes: By far the most important moments of X are those given by n = l , which is
the mean value discussed above, and by n = 2, which leads to the mean-square
value.
ii. The nth central moment
It is also possible to define central moments, which are simply the moments of the
difference between a random variable and its mean value. Thus the nth central
moment is
𝜇𝑛 = 𝐸(𝑋 − 𝜇)𝑛 = ∑𝑥(𝑥 − 𝜇)𝑛 𝑓(𝑥)…………………(6)
H.W.
1- If 𝑋 is a discrete random variable having the probability distribution
Find
(i) The value of k.
(ii) 𝑃(𝑋 < 3) and 𝑃(0 < 𝑋 < 4).
(iii) The distribution function of 𝑋 and graph it.
8
in the third bus. When the buses arrive, one of the 120 students is randomly
chosen. Let X denote the number of students on the bus of that randomly
chosen student, and find E[X].