0% found this document useful (0 votes)
21 views10 pages

LEC4N

Aa

Uploaded by

4nsjwty8wh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views10 pages

LEC4N

Aa

Uploaded by

4nsjwty8wh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

University of Thi-Qar

College of Engineering
Department of Electrical and Electronic Engineering

Lecture- 4
) Random variables)

Dr. Zahraa M. Baqir


Random variable: ‫إعطاء قيمه لكل عنصر في العينة‬
• Concept of random variable.
• Discrete random variables:
▪ Probability Mass Function(PMF)
▪ Cumulative Distribution Function(CDF)
▪ Expected Value
▪ Expectation of a function of a random variable
▪ Variance
▪ Moments

❖ Concept of random variable.:


A variable is any characteristics, number, or quantity that can be measured or
counted. A random variable is a function that associates a real number with each
element in the sample space. We shall use a capital letter, say X, to denote a random
variable and its corresponding small letter, x in this case, for one of its values.
Example-1: Suppose that a coin is tossed twice so that the sample space is
S_{HH,HT,TH,TT}. Let X represent the number of heads that can come up. With
each sample point we can associate a number for X as shown in Table 2-1. Thus, for
example, in the case of HH (i.e.,2 heads), X =2 while for TH(1 head),X=1. It follows
that X is a random variable.

There are two types of random variables, discrete and continuous.

❖ Discrete random variable


A random variable that can take on at most a countable number of possible values
is said to be discrete. (e.g. the number of students in a class).

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.

The probabilities f(x) must satisfy the following:

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,

1. Determine the value of k


2. Find the probability (i) P(X≤ 6), (ii) P(3<x≤ 6 )

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.

▪ Cumulative Distribution Function (CDF)


The cumulative distribution function, or briefly the distribution function, for a
discrete random variable X with probability distribution f(x) is
𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥) = ∑𝑢≤𝑥 𝑓(𝑢) ……………………… (2)
If X takes a finite number of values, then F(x) can be defined as:

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

Find a probability distribution in graphic form

▪ 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)

NOTE: P(X=x)= f(x)

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

Note: that E[X2] ≠ (E[X])2

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 =V(X)=Var(X) = E[(X − μ)2]

𝜎 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.

𝜇𝑛′ = 𝐸(𝑋 𝑛 ) = ∑𝑥 𝑥 𝑛 𝑓(𝑥)…………………….(5)

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 𝑃(𝑋 ≤ 2).


2- A random variable 𝑋 has the following probability function

Find
(i) The value of k.
(ii) 𝑃(𝑋 < 3) and 𝑃(0 < 𝑋 < 4).
(iii) The distribution function of 𝑋 and graph it.

3- A school class of 120 students is driven in 3 buses to a symphonic


performance. There are 36 students in one of the buses, 40 in another, and 44

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].

You might also like