0% found this document useful (0 votes)
3 views91 pages

Chapter 2 - Random Variables (4)

Chapter 2 of the document focuses on Random Variables (RVs), detailing their definitions, types (Discrete and Continuous), and associated functions such as Cumulative Distribution Function (CDF), Probability Mass Function (PMF), and Probability Density Function (PDF). It explains the expected value, variance, and moments of random variables, along with examples and properties of these concepts. The chapter serves as a foundational overview for understanding probabilistic models and their applications in various scenarios.

Uploaded by

Dagi Gberemelak
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)
3 views91 pages

Chapter 2 - Random Variables (4)

Chapter 2 of the document focuses on Random Variables (RVs), detailing their definitions, types (Discrete and Continuous), and associated functions such as Cumulative Distribution Function (CDF), Probability Mass Function (PMF), and Probability Density Function (PDF). It explains the expected value, variance, and moments of random variables, along with examples and properties of these concepts. The chapter serves as a foundational overview for understanding probabilistic models and their applications in various scenarios.

Uploaded by

Dagi Gberemelak
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

Probability and Random Process

ECEg2110

Chapter 2
Random Variables

AASTU,ECE, 2024 1
Outline
2.1. Random Variables (RVs)
2.2. The Cumulative Distribution Function (CDF) of RVs
2.3. Types of RVs
✓ Discrete Random Variable (DRV)
✓ Continuous Random Variable (CRV)
2.4. Probability Mass Function (PMF) of DRV
2.5. Probability Density Function (PDF) of CRV
2.6. Expected value, Variance and Moments
2.6. Some Special Continuous and Discrete Probability Distributions
✓ DRV: Bernoulli, Binomial, Poisson, Geometric, Hypergeometric, Negative Binomial
✓ CRV: Uniform, Gaussian, Exponential, Laplace, Cauchy, Gamma, Chi-squared, Rayleigh

2.7. Functions of One Random Variable


AASTU,ECE, 2024 2
Introduction
• In many probabilistic models, the outcomes are of a numerical nature e.g.
• Stock price value
• Outcome of rolling of a die
• GPA of a randomly selected student
• Voltage at a wireless receiver
• Life time of an electric bulb
• And in other experiments the outcomes are not numerical, but they may be
associated with some numerical value of interest.
• Tossing a coin, T = 0, H = 1
• It most random experiments is often useful to consider the numerical attribute
of the outcome of the experiment.
• This is done through the notation of a random variable.

AASTU,ECE, 2024 3
Random Variable (𝑿(𝝎))
✓ Random Variable (RV) is a function that assigns a real number X(ω) to
each outcome ω in the sample space Ω of a random experiment.
✓ Domain (D) :the sample space Ω
✓ Range (RX ): set of all values taken on by X
which is the subset of all real numbers

✓ It is represented by CAPITAL letters (like X,Y or W) and its particular


(numerical) value by lowercase letter such as x, y or w.
✓ It is important because it provides a compact way of referring to events via
their numerical attributes.
✓ For example, if X models the number of visits to a website, it is much easier to write
𝑷(𝑿 > 𝟏𝟎𝟎𝟎) than to write 𝑷(𝒏𝒖𝒎𝒃𝒆𝒓 𝒐𝒇 𝒗𝒊𝒔𝒊𝒕𝒔 > 𝟏𝟎𝟎𝟎).
AASTU,ECE, 2024 4
Conditions for a function to be a RV.
A function X to be a RV:
1. It should not be multi-valued.
▪ Every point in the Ω must correspond to only one value of the RV.(one-to-one OR
many-to-one)
2. The set {𝑋 ≤ 𝑥} shall be an event for any real number x.
▪ This set corresponds to those points ω in Ω for which the RV X(ω)
doesn’t exceed the number x : 𝑋(𝜔) ≤ 𝑥.
▪ The probability of this event, 𝐏{𝑋 ≤ 𝑥}, is equal to sum of probability
of all the elementary events corresponding to {𝑋 ≤ 𝑥}
– Call it Cumulative distribution Function (CDF)
3. 𝑃{𝑋 = ∞} = 0 and 𝑃{𝑋 = −∞} = 0 →outcomes chance of being infinity

AASTU,ECE, 2024 5
Example:
• Consider a random experiment of tossing a fair coin 3 times.
• The sequence of heads and tails is noted and the sample space Ω is given by:
 = {HHH , HHT , HTH , THH , THT , HTT , TTH , TTT}
• Let X be the number of heads in three coin tosses.
• X assigns each possible outcome ω in the sample space Ω a number from the
set RX={0, 1, 2, 3}.

Fig: Illustration of a random variable X that counts the


number of heads in a sequence of three coin tosses.
AASTU,ECE, 2024 6
Events Generated By Random Variables.
• {𝑋 ≤ 𝑥} : represents a subset of Ω consisting of all outcomes 𝜔𝑖 such that 𝑋 𝜔𝑖 ≤ 𝑥
• 𝑋 ≤ 𝑥 ⇒ a set ofexperimental outcomes.
• {𝑥1 ≤ 𝑋 ≤ 𝑥2 }: represents a subset of Ω consisting of all outcomes 𝜔𝑖 such that 𝑥1 ≤
𝑋 𝜔𝑖 ≤ 𝑥2 ; where 𝑥1 and 𝑥2 are two given numbers.
• {𝑋 = 𝑥𝑖 } : a subset of Ω consisting of all outcomes 𝜔𝑖 such that 𝑋 𝜔𝑖 = 𝑥𝑖
• {𝑋 ∈ 𝑥𝑖 } : subset of Ω consisting of all outcomes 𝜔𝑖 such that 𝑋 𝜔𝑖 ∈ 𝑥𝑖

i 𝒙𝟏 𝒙𝟐
AASTU,ECE, 2024 7
Main Concepts Related to Random Variables
Starting with a probabilistic model of an experiment:
• A random variable is a real-valued function of the outcome of the
experiment.
• A function of a random variable defines another random variable.
• We can associate with each random variable certain “averages” of interest,
such as the mean and the variance.
• A random variable can be conditioned on an event or on another random
variable.
• There is a notion of independence of a random variable from an event or
from another random variable.

AASTU,ECE, 2024 8
Example
•C

AASTU,ECE, 2024 9
Example:
•C

AASTU,ECE, 2024 10
The Cumulative Distribution Function
▪ The cumulative distribution function (cdf) of a random variable X is
defined as the probability of the event {X ≤ x}.

FX ( x) = P( X  x)
Properties of the cdf, FX(x):
▪ The cdf has the following properties.
i. FX ( x) is a non - negative function, i.e.,
0  FX ( x)  1

ii. lim FX ( x) = 1
x →

iii. lim FX ( x) = 0
x →−
AASTU,ECE, 2024 11
The Cumulative Distribution Function
iv. FX ( x) is a non - decreasing function of X , i.e.,
If x1  x2 , then FX ( x1 )  FX ( x2 )

v. P( x1  X  x2 ) = FX ( x2 ) − FX ( x1 )

vi. P( X  x) = 1 − FX ( x)

AASTU,ECE, 2024 12
Example:
▪ Find the cdf of the random variable X which is defined as the number of
heads in three tosses of a fair coin.
Solution:
• We know that X takes on only the values 0, 1, 2 and 3 with probabilities 1/8, 3/8,
3/8 and 1/8 respectively.
• Thus, FX(x) is simply the sum of the probabilities of the outcomes from the set {0,
1, 2, 3} that are less than or equal to x.

0, x  0
1 / 8, 0  x  1

 FX ( x) = 1 / 2, 1  x  2
7 / 8, 2  x  3

1, x  3
AASTU,ECE, 2024 13
Types of Random Variables
▪ There are two basic types of random variables.
i. Discrete Random Variable
✓ Defined over a sample space having a finite or a countably infinite number of
sample points
✓ A random variable whose cdf, FX(x), is a right continuous, staircase function of X with
jumps at a countable set of points x0, x1, x2,…
✓ Range (the set of values that it can take) is either finite or countably infinite.
ii. Continuous Random Variable
✓ A random variable whose cdf, FX(x), is continuous every where and can be written as
an integral of some non-negative function f(x), i.e.,

FX ( x) =  f (u )du
−
✓ have an uncountably infinite number of sample points
AASTU,ECE, 2024 14
The Probability Mass Function
▪ The probability mass function (pmf) of a discrete random variable X
is defined as:
PX ( X = xi ) = PX ( xi ) = FX ( xi ) − FX ( xi −1 )
Properties of the pmf, PX (xi ):
i. 0  PX ( xi )  1, k = 1, 2, .....
ii. PX ( x) = 0, if x  xk , k = 1, 2, .....
iii. P
k
X ( xk ) = 1

iv. P( X  S ) =  PX ( x)
xS

AASTU,ECE, 2024 15
The Probability Mass Function
▪ It is the “probability law” or “probability distribution” of X
▪ If we fix some 𝑥, then 𝑿 = 𝑥 is an event
▪ Let 𝑥 = 5, thus
{𝑿 = 5}➔ 𝜔: 𝑿 𝜔 = 5 = 𝑎, 𝑏
𝑃𝑋 𝑋 = 5 = 𝑃𝑋 5 = 1/2

How to Calculate the PMF of a Random Variable


For each possible value x of X
1. Collect all the possible outcomes that give rise to the event
{X = x}.
2. Add their probabilities to obtain 𝑃𝑋 (𝑥).
16
AASTU,ECE, 2024 16
The Probability Mass Function
• For example, let the experiment consist of two independent tosses of a fair coin,
and let X be the number of heads obtained. Then the PMF of X is

AASTU,ECE, 2024 17
Example: Coin Tosses and Binomial Random Variable
• Let X be the number of heads in three independent tosses of a biased coin.
Find the pmf of X.

𝑝 = 0.5

AASTU,ECE, 2024 18
Example: A Betting Game
• A player receives $1 if the number of heads in three fair coin tosses is 2, $8 if
the number is 3, but nothing otherwise. Find the pmf of the reward Y.

AASTU,ECE, 2024 19
The Probability Density Function
▪ The probability density function (pdf) of a continuous random variable X
is defined as the derivative of the cdf, FX(x), i.e.,

dFX ( x)
f X ( x) =
dx
Properties of the pdf, fX(x):
i. For all values of X , f X ( x)  0

ii. 
−
f X ( x)dx = 1
x2
iii. P( x1  X  x2 ) =  f X ( x)dx
x1

AASTU,ECE, 2024 20
The Probability Density Function

AASTU,ECE, 2024 21
The Probability Density Function
Example. Continuous Uniform Random Variable.
▪ A gambler spins a wheel of fortune, continuously calibrated between 0 and 1,
and observes the resulting number. Assuming that all subintervals of [0,1] of
the same length are equally likely, this experiment can be modeled in terms a
random variable X with PDF

What is the value of c?

AASTU,ECE, 2024 22
Calculating the Cumulative Distribution
Calculating the Cumulative Distribution Function
Function
▪ The cdf of a continuous random variable X can be obtained by
integrating the pdf, i.e.,
x
FX ( x) =  f X (u )du
−

▪ Similarly, the cdf of a discrete random variable X can be obtained by


using the formula:

FX ( x) =  PX ( xk )
xk  x

AASTU,ECE, 2024 23
Expected Value, Variance and Moments
I. Expected Value (Mean)
▪ The expected value of a discrete random variable X is given by:

 X = E ( X ) =  xk PX ( xk )
k

▪ The expected value (mean) of a continuous random variable X,


denoted by μX or E(X), is defined as:

 X = E ( X ) =  xf X ( x)dx
−

▪ Mean represents the average value of the random variable in a very large
number of trials
AASTU,ECE, 2024 24
Expected Value, Variance and Moments
II. Variance
▪ The variance of a discrete random variable X is given by:

 2 X = Var( X ) =  ( xk −  X ) 2 PX ( xk )
k

▪ The variance of a continuous random variable X, denoted by σ2X or


VAR(X), is defined as:
 2 X = Var ( X ) = E[( X −  X ) 2 ]

 2
X = Var ( X ) =  ( X −  X ) 2 f X ( x)dx
−

▪ Expanding (X-μX )2 in the above equation and simplifying the resulting equation,
we will get:  2 X = Var ( X ) = E ( X 2 ) − [ E ( X )]2
AASTU,ECE, 2024 25
Expected Value, Variance and Moments Cont’d…..
▪ Variance provides a measure of dispersion of X around its mean.
▪ The standard deviation of a random variable X, denoted by σX, is simply
the square root of the variance, i.e.,
 X = E ( X −  X ) 2 = Var( X )
III. Moments
▪ The nth moment of a continuous random variable X is defined as:

E ( X ) =  x n f X ( x)dx ,
n
n 1
−

▪ Similarly, the nth moment of a discrete random variable X is given by:

▪ Mean of X is the first moment of the random variable X


AASTU,ECE, 2024 26
Expected Value, Variance and Moments Cont’d…..
▪ Example1: Suppose there are 5 students and they scored the following points in a
given test.
S1 = 10, S2 = 8, S3 = 10, S4 = 6, S5 = 1
If X represents the score of a student, find mean and variance of X.
▪ Example2: Repeat the above example for the following scores
S1 = 7, S2 = 8, S3 = 6, S4 = 6.5, S5 = 7.5

What do you observe?

AASTU,ECE, 2024 27
Random Variable Examples
Example-1: (continuous RV)
The pdf of a continuous random variable is given by:

kx , 0  x 1
f X ( x) = 
0 , otherwise

whe re k is a constant.

a. Determine the value of k .

b. Find the corresponding cdf of X .

c. Find P (1 / 4  X  1)

d . Evaluate the mean and variance of X .

AASTU,ECE, 2024 28
Random
Random Variable Variable Examples
Examples Cont’d……
Solution:
 1
a. −
f X ( x ) dx = 1  0
kxdx = 1
 x2 1
 k   = 1
 2 0
k
 =1
2
k = 2

2 x, 0  x 1
 f X ( x) = 
0, otherwise

AASTU,ECE, 2024 29
Random
Random Variable Variable Examples
Examples Cont’d……
Solution:

b. The cdf of X is given by :


x
FX ( x) =  −
f X (u ) du
Case 1 : for x  0
FX ( x) = 0, since f X ( x) = 0, for x  0
Case 2 : for 0  x  1
x x x
FX ( x) =  f X (u ) du =  2udu = u = x2
2
0 0 0

AASTU,ECE, 2024 30
Random
Random Variable Variable Examples
Examples Cont’d……
Solution:

Case 3 : for x  1
1 1 1
FX ( x ) =  f X (u ) du =  2udu = u =1
2
0 0 0
 The cdf is given by
0, x0
 2
FX ( x ) =  x , 0  x 1
1, x 1

AASTU,ECE, 2024 31
Random
Random Variable Variable Examples
Examples Cont’d……
Solution:
c. P (1 / 4  X  1)
i. Using the pdf
1 1
P (1 / 4  X  1) =  f X ( x) dx =  2 xdx
1/ 4 1/ 4

1
 P (1 / 4  X  1) = x 2
= 15 / 16
1/ 4
 P (1 / 4  X  1) = 15 / 16
ii. Using the cdf
P (1 / 4  X  1) = FX (1) − FX (1 / 4)
 P (1 / 4  X  1) = 1 − (1 / 4) 2 = 15 / 16
 P (1 / 4  X  1) = 15 / 16

AASTU,ECE, 2024 32
Random
Random Variable Variable Examples
Examples Cont’d……
Solution:
d. Mean and Variance
i. Mean
1 1
 X = E ( X ) =  xf X ( x) dx =  2 x 2 dx
0 0

2 x3 1
 X = = 2/3
3 0
ii. Variance
 X 2 = Var ( X ) = E ( X 2 ) − [ E ( X )]2
1 1
E ( X ) =  x f X ( x ) dx =  2 x 3 dx = 1 / 2
2 2
0 0

  X = Var ( x ) = 1 / 2 − ( 2 / 3) 2 = 1 / 18
2

AASTU,ECE, 2024 33
Random Variable Examples
Example 2: Let the random variable X have cdf

Find the density and sketch both the cdf and pdf.
Solution

AASTU,ECE, 2024 34
Random Variable Examples
Example-3: (discrete rv)
Consider a discrete random variable X whose pmf is given by:

1 / 3 , xk = −1, 0, 1
PX ( xk ) = 
0 , otherwise

Find the mean and variance of X .

AASTU,ECE, 2024 35
Random
Random Variable Variable Examples
Examples Cont’d……
Solution:
i. Mean
1
 X = E( X ) = x
k = −1
k PX ( xk ) = 1 / 3(−1 + 0 + 1) = 0

ii. Variance
 X 2 = Var ( X ) = E ( X 2 ) − [ E ( X )]2
1
E( X ) =  k X k = − + + ] = 2/3
2 2 2 2 2
x P ( x ) 1 / 3[( 1) ( 0) (1)
k = −1

  X = Var ( x) = 2 / 3 − (0) 2 = 2 / 3
2

AASTU,ECE, 2024 36
Random Variable Examples
Example 3: (mixed rv) : Consider the generalized density

Compute P(0 <Y ≤ 7), P(Y = 0)?


Solution. In computing
The impulse at the origin makes no contribution, but the impulse at 7 does. Thus,

Similarly, in computing P(Y = 0) = P(Y ∈ {0}), only the impulse at zero makes a contribution.
Thus,

AASTU,ECE, 2024 37
Exercises
Exercises
1 : A fair coin is tossed twice, and let the random variable X represent the number of
heads. Find 𝐹𝑋 𝑋 ?

2 : Show that E[X]= 7/12 if X has cdf

3. The continuous random variable X has the pdf given by:

AASTU,ECE, 2024 38
Exercises
4. The cdf of continuous random variable X is given by:

5.

AASTU,ECE, 2024 39
Exercises
5. A r.v. X is defined by the cdf

6. A random variable X has mean 2 and variance 7. Find E(X2).


7. Let X be a random variable with mean m and variance σ2
Find the constant c that best approximates the random variable X in the sense that
c minimizes the mean-squared error E[(X −c)2].
8. Let X have the Pareto density f(x)=2/x3 for x ≥ 1 and f(x)=0 otherwise.
Compute E[X], E[X2].

AASTU,ECE, 2024 40
Some Special Distributions with their
Special application
Discrete Probability Distributions
1. Bernoulli Distribution
2. Binomial Distribution
3. Poisson Distribution
4. Geometric Distribution
5. Hypergeometric Distribution
6. Negative Binomial Distribution

AASTU,ECE, 2024 41
1. Bernoulli Distribution
✓ A r.v. X is called a Bernoulli r.v. with parameter 𝒑 ∈ [𝟎, 𝟏]

✓ The pmf is given by

✓ It is associated with some experiment where an outcome can be classified as


either a “success”→ 𝟏 or a “failure” → 𝟎, and the probability of a success is
p and the probability of a failure is 1 - p.

Its mean and variance are

42
AASTU,ECE, 2024 42
Bernoulli Distribution

AASTU,ECE, 2024 43
2. Binomial Distribution
➢ A r.v. X is called a binomial r.v. with parameters (n, p) if its pmf is
 n  k n −k
P( X = k ) = 
k p q , k = 0,1,2,  , n.
 
➢ It is associated with some experiments in which n independent Bernoulli trials are
performed and X represents the number of successes that occur in the n
trials.

➢a Bernoulli r.v. is just a binomial r.v. with parameters (1, p).


➢Its mean and variance are

➢Just n times the mean & variance of Bernoulli 44

AASTU,ECE, 2024 44
Binomial Distribution

AASTU,ECE, 2024 45
Example
• A homeowner has just installed 20 light bulbs in a new home. Suppose that each has
a probability 0.2 of functioning more than three months.
a) What is the probability that at least five of these function more than three
months?
b) What is the average number of bulbs the homeowner has to replace in three
months?
Solution: it is reasonable to assume that the light bulbs perform independently.
If X is the number of bulbs functioning more than three months (success), it has a
binomial distribution with n=20 and p=0.2.

AASTU,ECE, 2024 48
3. Poisson Distribution
➢ A r.v. X is called a Poisson r.v. with parameter λ(>0) if its pmf is given by
k
P ( X = k ) = e − , k = 0,1,2, , .
k!
➢ It may be used as an approximation for a binomial r.v. with parameters (n, p) when n
is large and p is small enough so that np is of a moderate size

➢ Some examples of Poisson r.v.'s include


✓ number of telephone calls arriving at a switching center during various time intervals
✓ The number of misprints on a page of a book
✓ The number of customers entering a bank during various intervals of time
✓ photoelectric effect and radioactive decay
✓ computer message traffic arriving at a queue for transmission.
➢ The mean and variance of the Poisson r.v. X

AASTU,ECE, 2024 49
Example
• Suppose that the probability of a transistor manufactured by a certain firm being
defective is 0.015. What is the probability that there is no defective transistor in a
batch of 100?
o Solution: let X be the number of defective transistors in 100. The desired
probability (binomial) is

o Since n is large and p is small in this case, the Poisson approximation is


appropriate and we obtain

which is very close to the exact answer.


o In practice, the Poisson approximation is frequently used when
n > 10, and p < 0.1.
50
AASTU,ECE, 2024 50
4. Geometric Distribution
❖ This type of event happens when want the number of Bernoulli trials
required until the first occurrence of success.
❖ If X is used to represent this number, Its pmf is computed to be

❖ Or when we ask how many times an experiment has to be performed


until a certain outcome is observed.
➢ The mean and variance of the Geometric r.v. X

AASTU,ECE, 2024 51
Geometric Distribution

AASTU,ECE, 2024 52
Example
• A driver is eagerly eyeing a precious parking space some distance down the street.
There are five cars in front of the driver, each of which having a probability 0.2 of
taking the space. What is the probability that the car immediately ahead will enter
the parking space?
Solution:
➢ For this problem, we have a geometric distribution and need to evaluate it with
𝑘 = 5 and 𝑝 = [Link],

AASTU,ECE, 2024 53
5. Hypergeometric Distribution
❑ We have a collection of N items, d of which are defective. Rather than test all
N items, we select at random a small number of items, say n < N.
❑ Let X denote the number of defectives out of the n items tested. We show that

Example : A lot consisting of 100 fuses is inspected by the following procedure: Five
fuses are selected randomly, and if all five "blow" at the specified amperage, the lot is
accepted. Suppose that the lot contains 10 defective fuses. Find the probability of
accepting the lot.
Solution: hypergeometric with N=100,d=10, n=5,k=0

AASTU,ECE, 2024 54
6. Negative Binomial Distribution
➢ A natural generalization of the geometric distribution is the distribution of random variable
X representing the number of Bernoulli trials necessary for the rth success to
occur, where r is a given positive integer.
➢ In order to determine 𝑝𝑋(𝑘) for this case, let A be the event that the first k -1 trials yield
exactly r -1 successes, regardless of their order, and B the event that a success turns up at
the kth trial. Then, owing to independence,

➢Now, P(A) obeys a binomial distribution with parameters k -1 and r- 1, or

➢ and P(B) is simply P(B)=p. Finally, we obtain mean and variance

AASTU,ECE, 2024 55
Example
• A curbside parking facility has a capacity for three cars. Determine the probability
that it will be full within 10 minutes. It is estimated that 6 cars will pass this
parking space within the time span and, on average, 80% of all cars will want to
park there.

➢ Solution: the desired probability is simply the probability that the number of
trials to the third success (taking the parking space) is less than or equal to 6. If X
is this number, it has a negative binomial distribution with r =3 and p =0.8.

AASTU,ECE, 2024 56
Some Special Distributions with their
Special application
Discrete Probability Distributions Continuous Probability Distributions
✓ Bernoulli Distribution 1. Uniform Distribution
✓ Binomial Distribution 2. Gaussian or Normal distribution
✓ Poisson Distribution 3. Exponential Distribution
✓ Geometric Distribution 4. Laplace / double-sided exponential
✓ Hypergeometric Distribution 5. Cauchy Distribution
✓ Negative Binomial Distribution 6. Gamma Distribution
7. Rayleigh Distribution
8. Beta Distribution

AASTU,ECE, 2024 57
1. Uniform Distribution
❑ When an experiment results in a finite number of “equally likely” or “totally
random” outcomes, we model it with a uniform random variable
❑ pdf & cdf of X which is constant over interval (a,b) has the form

➢Its mean and variance are

AASTU,ECE, 2024 58
Uniform Distribution

AASTU,ECE, 2024 59
Example
• Owing to unpredictable traffic situations, the time required by a certain student to
travel from her home to her morning class is uniformly distributed between 22 and
30 minutes. If she leaves home at precisely 7.35 a.m., what is the probability that
she will not be late for class, which begins promptly at 8:00 a.m.?
Solution: let X be the class arrival time of the student in minutes after 8:00 a.m. It
then has a uniform distribution given by

We are interested in the probability

AASTU,ECE, 2024 60
Example
• In coherent radio communications, the phase difference between the transmitter
and the receiver, denoted by Θ, is modeled as having a density f ∼ uniform [−π,π].
Find P(Θ ≤ 0) and P(Θ ≤π/2).

Solution:

AASTU,ECE, 2024 61
2. Gaussian (Normal) Distribution
▪ The most important density is the Gaussian or normal.
▪ For σ2 > 0, we write X ∼ N(m,σ2) if its pdf is given by:

▪ The density is concave for x ∈ [m−σ,m+σ] and convex for


x outside this interval
▪ As σ increases, the height of the density decreases and it
becomes wider as illustrated in Figure below.
▪ For standard normal density: m = 0 and σ2 = 1

➢Its mean and variance are

AASTU,ECE, 2024 62
Gaussian (Normal) Distribution
✓ The normal r.v. is probably the most important type of continuous r.v.
✓ It has played a significant role in the study of random phenomena in nature.
✓ Many naturally occurring random phenomena are approximately normal.
✓ Another reason for the importance of the normal r.v. is associated with a
theorem called the central limit theorem.
✓ This theorem states that the sum of a large number of independent r.v.'s,
under certain conditions, can be approximated by a normal r.v.
➢ Noise current which results from the sum of forces of many independent
collisions on an atomic scale is well-described by the Gaussian density.
➢ For this reason, Gaussian random variables are the noise model of choice in
electronic communication and control systems.

AASTU,ECE, 2024 63
Standard Normal Random Variable
If X ∼ N(μ, σ2), then is a normal random variable with mean 𝒎 = 0
and variance 𝝈 = 1: 𝑍 ∼ 𝑁(0, 1)

✓ Such a random variable Z is said to have a standard, or unit normal distribution.


✓ Let Φ(𝑥) denote its distribution function (CDF). i.e

▪ This conversion is called normalization and is quite important since it enables us to


write all probability statements about X in terms of probabilities for Z.
▪ For instance, to obtain P{𝑋 < 𝑏}, we note that X will be less than 𝑏 if and only if
(𝑋 − 𝜇)/𝜎 is less than (𝑏 − 𝜇)/𝜎, and so

AASTU,ECE, 2024 64
Gaussian (Normal) Distribution
Similarly, for any a < b,

Φ(𝑥) is computed by an approximation and the results are tabulated for a wide
range of nonnegative values of x.
Φ(𝑥) is tabulated for nonnegative values of x only, but we can also obtain Φ(−𝑥) from the table
by making use of the symmetry (about 0) of the standard normal probability density function

For x > 0, if Z represents a standard normal random variable, then

Standard normal probabilities.


For x > 0, if Z represents a standard AASTU,ECE,
normal random
2024 variable, then 65
The Standard Normal
Table: 𝚽(𝐳)
z
The Standard Normal
Table: 𝚽(𝐳)
z
Example
▪ If X is a normal random variable with mean m = 3 and variance σ2 = 16, find
(a) P{𝑋 < 11}; (b) P{𝑋 > −1}; (c) P{2 < 𝑋 < 7}.

AASTU,ECE, 2024 68
Example
▪ A production line manufactures 1000-ohm (R) resistors that have 10
percent tolerance. Let r.v. X denote the resistance of a resistor. Assuming that
X is a normal r.v. with mean 1000 and variance 2500, find the probability that a
resistor picked at random will be rejected.
Solution: Let A be the event that a resistor is rejected. Then
𝐀 = {𝑿 < 𝟗𝟎𝟎} ∪ {𝑿 > 𝟏𝟏𝟎𝟎}. Since 𝑿 < 𝟗𝟎𝟎 ∩ {𝑿 > 𝟏𝟏𝟎𝟎} = ∅, we have

AASTU,ECE, 2024 69
3. Exponential Distribution
❖ RV X is called exponential written f ∼ exp(λ ) with parameter λ > 0 if

❖ It is often used to model lifetimes, such as


✓ how long a cell-phone call lasts or
✓ how long it takes a computer network to transmit a
message from one node to another.
As λ increases, the height
❖ It also arises as a function of other random variables. increases and the width
▪ If U ∼ uniform(0,1), then X = ln(1/𝑈) is exp(1). decreases.
▪ If U and V are independent Gaussian RVs, then 𝑈 2 + 𝑉 2 is
exponential and 𝑈 2 + 𝑉 2 is Rayleigh
➢Its mean and variance are
AASTU,ECE, 2024 70
Example
❑ Assume that the length of a phone call in minutes is an exponential r.v. X with
parameter λ = 0.1. If someone arrives at a phone booth just before you arrive, find
the probability that you will have to wait
(a) less than 5 minutes, and (b) between 5 and 10 minutes.

AASTU,ECE, 2024 71
Example
❑ All manufactured devices and machines fail to work sooner or later. Suppose that
the failure rate is constant and the time to failure (in hours) is an exponential r.v. X
with parameter λ. Measurements show that the probability that the time to failure
for computer memory chips in a given class exceeds l04 hours is .368. Calculate
the value of the parameter λ. Using the value of the parameter λ determined in
part (a), calculate the time 𝑥0 , such that the probability that the time to failure is
less than 𝑥0 , is 0.05.

AASTU,ECE, 2024 72
4. Laplace / double-sided exponential
❑ For λ > 0, we write f ∼ Laplace(λ ) if its pdf is Pdf of Laplace

▪ As λ increases, the height increases and the width


decreases.

Example (Laplace ): An Internet router can send packets via route 1 or route 2. The
packet delays on each route are independent exp(λ) random variables, and so the
difference in delay between route 1 and route 2, denoted by X, has a Laplace(λ)
density. Find P(−3 ≤ X ≤−2 or 0 ≤ X ≤ 3).
AASTU,ECE, 2024 73
Example
Solution. The desired probability can be written as
P({−3 ≤ X ≤−2}∪{0 ≤ X ≤ 3}).
✓ Since these are disjoint events, the probability of the union is the sum of the
individual probabilities.
✓ We therefore need to compute P(−3 ≤ X ≤−2) and P(0 ≤ X ≤ 3).
✓ Since X has a Laplace(λ) density, these probabilities are equal to the areas of the
corresponding shaded regions . We first compute

The desired probability is then

AASTU,ECE, 2024 74
5. Cauchy Distribution
✓ The pdf of a Cauchy random variable X∼ Cauchy(λ ) with parameter λ > 0 is given by

✓ As λ increases, the height decreases and the width


increases.

✓ The Cauchy random variable arises as the tangent of a uniform random


variable and also as the quotient of independent Gaussian random variables
Find the cdf of a Cauchy random variable X with parameter λ = 1.

AASTU,ECE, 2024 75
Other Continuous Distributions
❑ Gamma Distribution
 x −1 −x / 
 e , x  0,
f X ( x ) =  ( )  


 0, otherwise.
❑ Rayleigh Distribution
 x − x / 2
 2e , x  0,
2 2

f X ( x ) = 

 0, otherwise.
❑ Beta Distribution
 1
 x a −1 (1 − x) b −1 , 0  x  1,
f X ( x ) =   ( a, b)

 0, otherwise.
1
Where  ( a , b) = 0
u a −1 (1 − u ) b −1 du.
AASTU,ECE, 2024 76
Functions of One Random Variable: Discrete Case
Y = g(X ) The PMF of RV 𝑌
PY (4) = P (Y = 4)
= P( X = 4) + P( X = 5)
= PX (4) + PX (5) = 0.3 + 0.4

AASTU,ECE, 2024 77
Functions of One Random Variable: Continuous Case
▪ Let X be a continuous random variable with pdf fX(x) and suppose g(x) is
a function of the random variable X defined as:
Y = g(X )
▪ We can determine the cdf and pdf of Y in terms of that of X.
▪ Consider some of the following functions.
aX + b
sin X X2

1
Y = g( X ) |X |
X
X
log X
eX | X | U ( x)
AASTU,ECE, 2024 78
Functions ofof a
Functions Random
a Random Variable
Variable Cont’d….. Cont’d…..
Steps to determine fY(y) from fX(x):
Method I:
1. Sketch the graph of Y=g(X) and determine the range space of Y.
2. Determine the cdf of Y using the following basic approach.

FY ( y) = P(Y  y) = P( g ( X )  y)
3. Obtain fY(y) from FY(y) by using direct differentiation, i.e.,
dFY ( y )
fY ( y ) =
dy

AASTU,ECE, 2024 79
Functions of a Random Variable Cont’d…..
Method II:
1. Sketch the graph of Y=g(X) and determine the range space of Y.
2. If Y=g(X) is one to one function and has an inverse transformation
𝒙 = 𝒈−𝟏 (𝒚) = 𝒉(𝒚), then the pdf of Y is given by:
dx dh( y )
fY ( y ) = f X ( x) = f X [h( y )]
dy dy
3. If Y=g(x) is not one-to-one function, then the pdf of Y can be obtained as
follows.
i. Find the real roots of the function Y=g(x) and denote them by xi

AASTU,ECE, 2024 80
Functions of a Random Variable Cont’d…..
ii. Determine the derivatives, dxi of each root xi , i.e. ,
dy

iii. Find the pdf of Y by using the following formula.

dxi
fY ( y ) =  f X ( xi )
i dy

81
AASTU,ECE, 2024 81
Examples on Functions of One Random Variable
Examples:
a. Let Y = aX + b. Find f Y ( y ).

b. Let Y = X 2 . Find f Y ( y ).

1
c. Let Y = . Find f Y ( y ).
X
 
d . The random variable X is uniform in the interval [− , ].
2 2
If Y = tan X , determine the pdf of Y .

82
AASTU,ECE, 2024 82
Examples on Functions of One Random Variable…..
Solutions:
a. Y = aX + b

i. Using Method − I

Suppose that a  0

 y −b
Fy ( y ) = P (Y  y ) = P (aX + b  y ) = P X  
 a 

 y −b
FY ( y ) = FX  
 a 
dFY ( y ) 1  y −b
 f Y ( y) = = fX   (i )
dy a  a 
83
AASTU,ECE, 2024 83
Examples on Functions of One Random Variable…..
Solutions:
a. Y = aX + b

i. Using Method − I

On the other if a  0, then

 y −b
Fy ( y ) = P(Y  y ) = P(aX + b  y ) = P X  
 a 

 y −b
FY ( y ) = 1 − FX  
 a 
dFY ( y ) 1  y −b
 f Y ( y) = = − fX   (ii)
dy a  a 

AASTU,ECE, 2024 84
Examples on Functions of One Random Variable…..
Solutions:

a. Y = aX + b

i. Using Method − I

From equations (i ) and (ii) , we obtain :

1  y −b
f Y ( y) = fX  , for all a
a  a 

AASTU,ECE, 2024 85
Examples on Functions of One Random Variable…..
Solutions:

a. Y = aX + b
ii. Using Method − II
The function Y = aX + b is one - to - one
y −b
For any y, x = = h( y ) is the principal solution
a
dx dh( y ) 1 dx 1
= =  =
dy dy a dy a
dh( y )  y −b
f X (h( y ) )  fY ( y ) =
dx 1
fY ( y ) = f X ( x) = fX  
dy dy a  a 

AASTU,ECE, 2024 86
Examples on Functions of One Random Variable…..
Solutions:
b. The function Y = X 2 is not one - to - one and the range
space of Y is y  0
For each y  0, there are two solutions given by
x1 = − y and x 2 = y

AASTU,ECE, 2024 87
Examples on Functions of One Random Variable…..
Solutions:
dx1 1 dx 1
b. =−  1 = and
dy 2 y dy 2 y

dx2 1 dx2 1
=  =
dy 2 y dy 2 y

dxi dx1 dx2


f Y ( y) =  f X ( xi )  f Y ( y ) = f X ( x1 ) + f X ( x2 )
i dy dy dy

 1
2 y f X( ( y ) + f (− y )),
X y0
 f Y ( y) = 

 0, otherwise

AASTU,ECE, 2024 88
Examples on Functions of One Random Variable…..
Solutions: 1
c. The function Y = is one - to - one and the range
X
space of Y is IR /0

1
For any y, x = = h( y ) is the principal solution
y
dx dh( y ) 1
= =− 2
dy dy y

dh( y ) 1
f X (h( y ) )  f Y ( y ) = 2 f X  
dx 1
f Y ( y) = f X ( x) =
dy dy y  y

1
IR /0
1
 f Y ( y ) = 2 f X   ,
y y
AASTU,ECE, 2024 89
Examples on Functions of One Random Variable…..
Solutions:
d . The function Y = tan X is one-to-one and the range
space of Y is ( −, )
For any y, x = tan −1 y = h( y ) is the principal solution
dx dh( y ) 1
= =
dy dy 1+ y2
dx dh ( y ) 1/ 
fY ( y ) = f X ( x) = f X ( h( y ) )  fY ( y ) =
dy dy 1+ y2
1
 fY ( y ) = , −  y  
 (1 + y )
2

AASTU,ECE, 2024 90
Examples on Functions of One Random Variable…..
Solutions:

1/ 
fY ( y ) = Cauchy RV
1+ y2

AASTU,ECE, 2024 91
Questions ?

AASTU,ECE, 2023 92

You might also like