0% found this document useful (0 votes)
1 views

Lec 2 Random Variables and PDF

The document discusses the concept of random variables, defining them as functions that map outcomes of random experiments to real values. It explains the types of random variables, including discrete and continuous, and introduces probability distribution functions (PDFs) that describe the likelihood of different outcomes. Additionally, it provides examples and properties of random variables and their PDFs, including mean and variance calculations.

Uploaded by

adjeipoku23
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Lec 2 Random Variables and PDF

The document discusses the concept of random variables, defining them as functions that map outcomes of random experiments to real values. It explains the types of random variables, including discrete and continuous, and introduces probability distribution functions (PDFs) that describe the likelihood of different outcomes. Additionally, it provides examples and properties of random variables and their PDFs, including mean and variance calculations.

Uploaded by

adjeipoku23
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

TE 353

Random Variables
and Stochastic
Processes
Lecture 2: Random Variables

K. O.-B. Obour Agyekum


Random Variables
• Previously, we have considered the concept of random experiments,
events, sample space and sample points. The event described on a random
experiment may be numerical or non-numerical (descriptive).
• For example, the outcomes that we obtain when we throw a die are
numerical (1,2,3,4,5,6). But the outcomes that we obtain when we toss a
coin are non-numerical. We get the outcomes are head or tail. Here, the
sample space is non-numerical or descriptive
• In nature, outcomes of many random experiments may be descriptive.
Mathematically, it is inconvenient to deal with these outcomes. For ease of
manipulation, we may assign a real number to each of the outcomes using
a fixed rule or mapping.
• For example, let 1 represent head and 0 represent tail.
Random Variables
• This rule or mapping from the original sample space (numerical or non-
numerical) to a numerical (real) sample space, subjected to certain
constraints is called a random variable
• Random variable is a real valued function which maps the (non)numerical
sample space (domain) of the random experiment to real values
(codomain or range). The mapping is done in such a way that the outcome
of an event should correspond to only one real value.
• The function should be such that one or more events of the domain may
be mapped on to a single real value but definitely one event cannot be
mapped on to multiple real values. Basically, the function can have one-to-
one or many-to-one mapping but never one-to-many mapping
Random Variables

A box contains balls of six different colors.


A ball is drawn at random from the box,
The following payoffs are defined: $1 if
the color of the ball drawn is red or white;
$2, if black or purple; and $3, if orange or
blue
Random Variables – Definition
Definition
• Let 𝑆 be the sample space of the random experiment. A random variable is a function whose domain is the set of
outcomes 𝜔 ∈ 𝑆 and whose range is R, the real line. The random variable assigns a real value X(𝜔) such that
i. The set {𝜔: 𝑋 𝜔 ≤ 𝑥} is an event for every x ∈ 𝑅, for which a probability is defined. This condition is called
measurability.
ii. The probabilities of the events {𝜔: 𝑋 𝜔 = ∞} and {𝜔: 𝑋 𝜔 = −∞} equal to zero. i.e. P X = ∞ = 𝑃 𝑋 = −∞ = 0
• The random variable is denoted by upper case letter and the real values that it takes, are denoted by lower case letters.
The statement X = 𝑥 will mean that the random variable X assumes a value 𝑥. If a and b are any given real numbers
then a < 𝑋 ≤ 𝑏 will represent the statement that the random variable X assumes a value greater than a and less than or
equal to b
• Consider an experiment of tossing an unbiased coin twice. Let the random variable 𝑋 denote the number of heads
turning up. The outcome of the experiments are 𝐻𝐻, 𝐻𝑇, 𝑇𝐻 and 𝑇𝑇. Hence 𝑋 can take values 2, 1, 1, 0. Here, 𝑃(𝑋 ≤ 1)
means P(𝑡ℎ𝑒 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 ℎ𝑒𝑎𝑑𝑠 ≤ 1) = 𝑃(𝐻𝑇, 𝑇𝐻, 𝑇𝑇) = ¾
• Generally, 𝑃(𝑋 ≤ 𝑎) means that the probability of the set of outcomes 𝜔 for which X(𝜔 ≤ 𝑎)
𝑃 𝑋 = 𝑥 = 𝑃 𝜔: 𝑋 𝜔 = 𝑥
𝑃 𝑋 ≤ 𝑎 = 𝑃 𝜔: 𝑋 𝜔 ≤ 𝑎 = 𝑃{𝜔: 𝑋 𝜔 ∈ [−∞, 𝑎]}
𝑃 𝑎 < 𝑋 ≤ 𝑏 = 𝑃{𝜔: 𝑋 𝜔 ∈ 𝑎, 𝑏 }
Random Variables – Examples
Example 1
• Consider a bowl which contains 3 white balls and 2 red balls. Two balls are taken at random without
replacement. If 𝑋 denoted the random variable namely the number of white balls picked, describe the random
variable.
3 6 1
Ans: The number of elements in the sample space n S = 10; 𝑃 𝑋 = 2 = ;𝑃 𝑋=1 = ;𝑃 𝑋=0 =
10 10 10
Example 2
• Three students sat for an examination and 𝑋 denotes the number of students who passed. Describe the random
variable.
1 3 3 1
Ans: n 𝑆 = 8; P X = 3 = , P X = 2 = , P X = 1 = , P X = 0 =
8 8 8 8
Example 3
• Consider tossing an unbiased coin 3 times. Let 𝑋 denote the number of heads in the outcome. Define the
sample space and the random variable
Example 4
• A coin is tossed once. 𝐼 denotes the appearance of a tail. Describe the random variable.
Random Variables – Types
Discrete Random Variable
A random variable 𝑋 is discrete if it assumes only discrete value (finite number or countably infinite number of
possible discrete values). The sample space (domain) of discrete random variables may be discrete, continuous or
a mixture of discrete and continuous points, but the co-domain is only discrete.
Examples
1. The mark obtained by a student in an examination.
2. The number of students who are absent for a particular class.

Continuous Random Variable


A random variable 𝑋 is said to be a continuous random variable if it takes all possible values between certain
limits or in an interval which may be finite or infinite. The sample space of the continuous random variable must
be continuous and cannot be discrete.
Example
1. The operating time between two failures of a computer
Random Variables – Types
One Dimensional RV
If a random variable 𝑋 takes on a single value corresponding to each outcome of the experiment, then the random
variable is called one dimensional random variable.
Example
1. In tossing a coin, if we assume the RV to be appearance of tail, then the sample space is {𝐻, 𝑇} and the random
variable is {0,1}.

Multi-dimensional RV
When an outcome of a random experiment can be specified by n random variable 𝑋1 , 𝑋2 , … , 𝑋𝑛 , it is very
convenient to use the notion of an n-dimensional vector associated with these outcomes.
Example
1. Consider an experiment of throwing a die and tossing a coin together. A two-dimensional RV can be defined as
the appearance of head and an even number
RV and Probability Distribution Function
• Each value of x of the random variable X is associated with a probability
𝑃(𝑥)
• Consider a real RV X. The function of 𝑥 whose value is the probability
P(X ≤ 𝑥) is called the probability distribution function (PDF) of the
random variable X. In other words, it is the probability that the random
variable X is less than or equal to 𝑥.
• 𝑋 is characterized by the PDF, 𝐹𝑋 (𝑥) of the random variable 𝑋. PDF is also
known as cumulative density function (c.d.f)
PDF curve
• It defines the random variable’s probability coming within a distinct
range of values [𝑎, 𝑎 + 𝑑𝑥 = 𝑏], as opposed to taking on any one value.
• 𝐹𝑋 𝑥 𝑑𝑥 is the probability that random variable 𝑋 lies in the interval
[𝑎, 𝑏]. 𝐹𝑋 𝑥 ≥ 0, ∀𝑥 ∈ 𝑅
• The probability that 𝑋 lies within the interval [𝑎, 𝑏] is the area under the
PDF curve, denoted as
𝑏

P X ∈ 𝑎, 𝑏 = න 𝐹𝑋 𝑥 𝑑𝑥
𝑎

• Naturally, ‫׬‬−∞ 𝐹𝑋 𝑥 𝑑𝑥 = 1 since the sample space 𝑆 = (−∞, ∞)
Random Variables
Example 5
The number of telephone calls received in the Telecom department during lunch hour has the
probability function given below
# of calls 0 1 2 3 4 5 6
𝑃(𝑥) 0.05 0.20 0.25 0.20 0.15 0.10 0.05
i. Find the probability that there will be three or more calls. Ans: 0.50
ii. Find the probability that there will be an odd number of calls. Ans: 0.50
Example 6
A random experiment consists of three independent tosses of a fair coin and 𝑋 denotes the random
variable which assigns to each element of the sample space the number of tails and Y denotes the
number of consecutive tails in the sample space. Find
i. The probability distribution of 𝑋.
ii. The PDF of 𝑋 and Y
Random Variables
Example 7
A discrete random variable 𝑋 has the probability function given below:
Values 0 1 2 3 4 5 6 7
𝑃(𝑥) 0 𝑎 2𝑎 2𝑎 3𝑎 𝑎2 2𝑎2 7𝑎2 + 𝑎
i. Find the value of 𝑎
ii. Find P X < 6 , P(X ≥ 6), and P(0 < X < 4)
iii. Find the distribution function of X
Probability Density Function (p.d.f)
• In the case of discrete random variable, the values assumed by it can be easily defined, hence, it is easy to assign
a probability for each of the value.
• But a continuous random variable takes values which are continuum over a range in real axis.
• As an example, if the continuous random variable takes values in the rang -5 to 5, it is difficult to say exactly
where the particular value 4.999 exists. So, it is not possible to find the probability of it by observing in the range
-5 to 5.
• Generally, probability of observing a single value in a continuous range of values is zero. It is only meaningful to
define the probability of a single value to exist over a small range.
• Obviously, 4.999 will exist in the range 4.5 to 5 with a high probability than in the range 4 to 4.5.
The probability density function fx (x) of a continuous random variable X is defined such that
𝑑𝑥 𝑑𝑥
𝑃 𝑥− ≤𝑋≤𝑥+ = 𝑓𝑋 𝑥 𝑑𝑥
2 2
and satisfying the following conditions:
i. fX (x) is integrable over the range (−∞, ∞)
ii. 𝑓𝑋 𝑥 ≥ 0, ∀𝑥, −∞ < 𝑥 < ∞

iii. ‫׬‬−∞ 𝑓𝑋 𝑥 𝑑𝑥 = 1
Properties of p.d.f and its relationship with PDF
• The p.d.f of a continuous RV 𝑋 satisfies the following properties:
i. 0 ≤ fX (x) for all x. A random variable 𝑋 may assume negative values from −∞ to 0. But fX (x) cannot take
negative values as it defines probability measure

ii. ‫׬‬−∞ 𝑓𝑋 𝑥 𝑑𝑥 = 1
𝑥
iii. 𝑃 𝑥1 < 𝑋 ≤ 𝑥2 = ‫ 𝑥׬‬2 𝑓𝑋 𝑥 𝑑𝑥
1

iv. 𝑃 𝑥1 < 𝑋 ≤ 𝑥2 = 𝑃 𝑥1 < 𝑋 < 𝑥2


𝑎
v. 𝑃 𝑥 = 𝑎 = ‫ = 𝑥𝑑 𝑥 𝑋𝑓 𝑎׬‬0

𝑑
The p.d.f is defined as the derivative of the PDF FX (𝑥) as fX 𝑥 = 𝐹 (𝑥), if the derivative exists.
𝑑𝑥 𝑋

Example 8
A continuous RV 𝑋 has a p.d.f. f 𝑥 = 3𝑥 2 , 0 ≤ 𝑥 ≤ 1. Find 𝐾 and 𝛼 such that
i. P X ≤ 𝐾 = 𝑃(𝑋 > 𝐾) and (ii) P X > 𝛼 = 0.1
1 1
1 3 9 3
Ans: K = ; 𝛼=
2 10
Properties of p.d.f and its relationship with PDF
Example 9
The life in hours of a certain radio tube has the p.d.f given by
100
, 𝑓𝑜𝑟 𝑥 ≥ 100
f x = ቐ 𝑥2
0, 𝑓𝑜𝑟 𝑥 < 100
i. Find the probability that none of three such tubes in a given radio tube will have to be replaced during the
first 150 hours. 𝐴𝑛𝑠: 1/27
ii. Find the probability that all three original tubes would have been replaced during the first 150 hours.
𝐴𝑛𝑠: 8/27
Mean, Variance of Random Variables
• Consider a discrete random variable 𝑋 which assumes n values x1 , x2 , … , xn . Assume that we repeat the
experiment N times and let m1 , 𝑚2 , … , mn be the number of times that x1 , x2 , … , xn occur. So, the mean or average
value of 𝑋 can be given as
𝑚1 𝑥1 + 𝑚2 𝑥2 + ⋯ + 𝑚𝑛 𝑥𝑛 𝑚1 𝑚2 𝑚𝑛
𝑋ത = = 𝑥1 + 𝑥2 + ⋯ + 𝑥
𝑁 𝑁 𝑁 𝑁 𝑛
𝑚𝑖
• As 𝑁 → ∞, tends to the probability of 𝑥𝑖 , namely 𝑝𝑖 . So, the mean or average of a random variable is
𝑁 𝑛

𝑋ത = 𝑝1 𝑥1 + 𝑝2 𝑥2 + ⋯ + 𝑝𝑛 𝑥𝑛 = ෍ 𝑝𝑖 𝑥𝑖
𝑖=1
• The mean value is also called expectation or stochastic average of 𝑋. That is, 𝐸 𝑋 = 𝑋ത = 𝜇
Mean for discrete RV
𝑛

𝑋ത = 𝜇 = 𝐸 𝑋 = ෍ 𝑝𝑖 𝑥𝑖
𝑖=1
Mean for a continuous RV

𝑋ത = 𝜇 = 𝐸 𝑋 = න 𝑥𝑓𝑥 𝑥 𝑑𝑥
−∞
Mean, Variance of Random Variables
Mean of a Function of a RV
If Y = 𝑔 𝑋 then,
𝑌ത = 𝑔 𝑋ത = σ𝑛𝑖=1 𝑔 𝑥𝑖 𝑝𝑖 if 𝑥, 𝑦 are discrete

𝑌ത = 𝑔 𝑋ത = ‫ 𝑥𝑑 𝑥 𝑋𝑓 𝑥 𝑔 ׬‬if 𝑥, 𝑦 are continuous
−∞

Properties of Expectation
If 𝑋 and 𝑌 are random variables and 𝑎, 𝑏 are constants, then
1. 𝐸 𝑎 =𝑎 10. 𝐸 𝑋 ≤ 𝐸 |𝑋|
2
2. 𝐸 𝑎𝑋 = 𝑎𝐸(𝑋) 11. 𝐸 𝑋𝑌 ≤ 𝐸 𝑋 2 𝐸(𝑌 2 ) → Schwartz inequality
3. 𝐸 𝑎𝑋 + 𝑏 = 𝑎𝐸 𝑋 + 𝑏
4. 𝐸 𝑋 + 𝑌 = 𝐸 𝑋 + 𝐸(𝑌)
5. 𝐸 𝑋𝑌 = 𝐸 𝑋 𝐸(𝑌) if 𝑋, 𝑌 are independent RVs
6. 𝐸 𝑋 − 𝑋ത = 0
7. 𝐸[𝑎𝑔 𝑥 ] = 𝑎𝐸[𝑔 𝑥 ]
8. 𝐸 𝑔 𝑥 +𝑎 =𝐸 𝑔 𝑥 +𝑎
9. 𝐸 𝑋 ≥ 0 if X ≥ 0
Mean, Variance of Random Variables
• Though mean or expectation is a significant number representing the behavior of an RV, it is not
adequate to describe the behavior of an RV completely.
• This is because two different RVs can have the same average but their sample deviations may be
different. To completely define an RV, we need to find some more numbers other than the mean of
the RV. These numbers are simply moment.
• The 𝑛𝑡ℎ moment about origin of a random variable 𝑋 is defined as the expected value of the 𝑛𝑡ℎ
power of 𝑋
• For a discrete RV, the 𝑛𝑡ℎ moment is defined as 𝐸 𝑋 𝑛 = σ𝑖 𝑥𝑖𝑛 𝑝𝑖 and for a continuous RV, 𝐸 𝑋 𝑛 =

‫׬‬−∞ 𝑥 𝑛 𝑓𝑋 𝑥 𝑑𝑥
• The variance of 𝑋 is the average square deviation about the mean, 𝜇. That is, the average degree to
which each number is different from the mean. It is the second moment about the mean.

𝜎𝑋2 = 𝐸 𝑋 − 𝜇 2
= න 𝑥 − 𝜇 2 𝐹𝑋 𝑥 𝑑𝑥 = 𝐸 𝑋 2 − 𝐸 𝑋 2

−∞
• Standard Deviation is the square root of the variance
Mean, Variance of Random Variables
Example 10
When a die is thrown, X denotes the number that turns up. Find 𝐸 𝑋 , E(X 2 ) and 𝑉𝑎𝑟(𝑋)
Solution
𝐸 𝑋 = 3.5, 𝐸 𝑋 2 = 15.17, Var 𝑋 = 1.71
Example 11
By throwing a fair die, a game is played. A player wins 20 GHc if 2 turns up, 40 GHc if 4 turns up and
loses 30 GHc if 6 turns up. And he never loses or gains if any other number turns up. Find the
expected value of money won.
Ans: 5 GHc
Example 12
Let X be an RV with the following probability distribution. Find 𝐸(𝑋), 𝐸(𝑋 2 ) and 𝐸[ 1 + 2𝑋 2 ]
𝑥 3 6 9 Ans: 𝐸(𝑋) = 6.5; 𝐸(𝑋) = 46.5; 𝐸[ 1 + 2𝑋 2 ] = 213
𝑃(𝑋 = 𝑥) 1/6 1/12 1/3
Application of Mean, Variance in Wireless Comm.
• In a multipath environment, the multiple signal copies arrive with
different delays and hence, the different signal components will have
different power levels.
• This is known as the power delay profile (PDP). It gives the intensity of a
signal received through a multipath channel as a function of time delay.
• The objective is to find the average delay and variance of the delay given
a PDP.
• A typical wireless PDP is exponential in nature
• Given a multipath power profile, 𝐹 𝜏 = 𝛼𝑒 −𝛼𝜏 , find the average delay
and variance
1 1
Ans: Average delay, 𝜏ҧ = ; variance, 𝜎𝜏2 =
𝛼 𝛼2
1
The standard deviation, 𝜎𝜏 = . This is known as the RMS delay spread of
𝛼
the wireless channel, the channel’s average delay spread

Further reading: Rappaport, Theodore Ted S. et al. “Propagation and radio


system design issues in mobile radio systems for the glomo project.” (1997).
Random Variables: Power of Fading Wireless Channel
• The power of the fading channel, denoted by 𝑔 , is
characterized by the exponential PDF with parameter 𝑎 = 1
𝐹𝐺 𝑔 = 𝑒 −𝑔 , 𝑔 ≥ 0
• This is valid for a Rayleigh fading channel
• Rayleigh fading models assume that the magnitude of a
signal that has passed through such a transmission medium
will vary randomly, or fade, according to a Rayleigh
distribution
• 𝐹𝐺 𝑔 can be used to characterize the behavior and properties
of the wireless channel
Example: What is the probability that the attenuation of the
wireless channel is worse than 20dB?
Ans: 0.01 (The probability that attenuation of fading wireless
channel is worse than 20dB is 1%)
THANK YOU

You might also like