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

Chapter 3-Random - Variables

The document discusses random variables and their probability distributions. It defines discrete and continuous random variables and their probability mass functions (PMF) and probability density functions (PDF). It also introduces the cumulative distribution function (CDF) and how to calculate probabilities, means, variances, and standard deviations for both discrete and continuous random variables. Examples are provided to demonstrate calculating these metrics for both types of random variables. The document also discusses the concept of joint probability distributions for two random variables using joint PMFs and CDFs.

Uploaded by

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

Chapter 3-Random - Variables

The document discusses random variables and their probability distributions. It defines discrete and continuous random variables and their probability mass functions (PMF) and probability density functions (PDF). It also introduces the cumulative distribution function (CDF) and how to calculate probabilities, means, variances, and standard deviations for both discrete and continuous random variables. Examples are provided to demonstrate calculating these metrics for both types of random variables. The document also discusses the concept of joint probability distributions for two random variables using joint PMFs and CDFs.

Uploaded by

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

Chapter 3

RANDOM VARIABLE

11/25/2021 1
11/25/2021 2
11/25/2021 3
11/25/2021 4
Two Types of Random Variables
• A discrete random variable can assume a countable
number of values.
– Number of steps to the top of the Eiffel Tower*
• A continuous random variable can assume any value
along a given interval of a number line.
– The time a tourist stays at the top
once s/he gets there

*Believe it or not, the answer ranges from 1,652 to 1,789. See Great Buildings

11/25/2021 5
• Discrete random variables
– Number of sales
– Number of calls
– Shares of stock
– People in line
– Mistakes per page

• Continuous random variables


– Length
– Depth
– Volume
– Time
– Weight

11/25/2021 6
For discrete
random variable

11/25/2021 7
11/25/2021 8
For discrete random variable

11/25/2021 9
11/25/2021 10
X

a) Find PMF of X
b) Find P(X>3)

11/25/2021 11
11/25/2021 12
CDF and PDF of Continuous Random Variable
For a continuous random variable X we have a function f, called the probability density
function (pdf). Every probability density function must satisfy

 Cumulative distribution function (CDF) of continuous random variable is defined as

X X

11/25/2021 13
1. Example: Metal Cylinder Production

Suppose that the random variable X is the diameter of a randomly chosen


cylinder manufactured by the company. Since this random variable can
take any value between 49.5 and 50.5, it is a continuous random
variable

Suppose that the diameter of a metal cylinder has a p.d.f

f ( x)  1.5  6( x  50.2) 2 for 49.5  x  50.5


f ( x)  0, elsewhere

f ( x)

49.5 50.5 x
11/25/2021 14
This is the valid PDF as area under curve is 1
50.5
 49.5
(1.5  6( x  50.0) 2 ) dx  [1.5 x  2( x  50.0)3 ]50.5
49.5

 [1.5  50.5  2(50.5  50.0)3 ]


[1.5  49.5  2(49.5  50.0)3 ]
 75.5  74.5  1.0
The probability that a metal cylinder has a diameter between 49.8 and
50.1 mm can be calculated to be
50.1
49.8
(1.5  6( x  50.0) 2 ) dx  [1.5 x  2( x  50.0) 3 ]50.1
49.8

 [1.5  50.1  2(50.1  50.0)3 ]


f ( x) [1.5  49.8  2(49.8  50.0)3 ]
 75.148  74.716  0.432

49.5 49.8 50.1 50.5 x


11/25/2021 15
Cumulative Distribution Function

x
 F ( x)  P( X  x)   f ( y )dy


dF ( x)
 f ( x) 
dx

 P (a  X  b)  P ( X  b)  P ( X  a )
 F (b)  F (a)

 P (a  X  b)  P (a  X  b)

11/25/2021 16
Cumulative Distribution Function

x
F ( x)  P( X  x)   (1.5  6( y  50.0) 2 ) dy
49.5

 [1.5 y  2( y  50.0)3 ]49.5


x

 [1.5 x  2( x  50.0)3 ]  [1.5  49.5  2(49.5  50.0) 3 ]


1.5 x  2( x  50.0)3  74.5

P (49.7  X  50.0)  F (50.0)  F (49.7)


 (1.5  50.0  2(50.0  50.0)3  74.5)
(1.5  49.7  2(49.7  50.0)3  74.5)
 0.5  0.104  0.396

11/25/2021 17
X

11/25/2021 18
11/25/2021 19
11/25/2021 20
In mathematics, the moments of a function are quantitative
measures related to the shape of the function's graph

11/25/2021 21
11/25/2021 22
Discrete Random variable Example

Example: Two Boxes contains 7 balls each, numbered from 1 to 7. one ball is
selected randomly from the each Box. Let Random variable X be the difference of the
numbers (that is, the largest number minus the smallest number) of the selected
balls. Find the probability distribution or PMF of X, CDF and its mean, variance and
standard deviation.

If (a)the balls are selected from the urn with replacement.

11/25/2021 23
Step II: find random variable X (difference of highest to lowest value)

Step III. Find PMF (or probability distribution for discrete random variable)

11/25/2021 24
 Find CDF: Do your self
 Mean value or Expected of discrete random variable X

 Variance of discrete random variable X

 Standard deviation of discrete random variable X.

11/25/2021 25
11/25/2021 26
Continuous RV

11/25/2021 27
11/25/2021 28
11/25/2021 29
11/25/2021 30
11/25/2021 31
11/25/2021 32
Exercise :
Let the random variable X denote the time a person waits for an elevator to
arrive. Suppose the longest one would need to wait for the elevator is 2
minutes, so that the possible values of X (in minutes) are given by the
interval [0,2]. A possible pdf for X is given by calculate mean , varience and
SD.

Applying Definition we compute the expected value ( Mean) of X

Thus, we expect a person will wait 1 minute for the elevator on average.

11/25/2021 33
Now we calculate the variance and standard deviation of X, by first
finding the expected value of X2

11/25/2021 34
Exercise:

11/25/2021 35
Solution :

11/25/2021 36
Up to now we have studied Discrete Distributions and Continuous Distributions, we
explored probability distributions of one random variable, say X.

Here, we'll extend many of the definitions and concepts that we learned to the
case in which we have two random variables, say X and Y

• Joint Probability Distributions


– Discrete

P ( X  xi , Y  y j )  pij  0
satisfying  p
i j
ij 1

– Continuous
f ( x, y)  0 satisfying 
state space
f ( x, y)dxdx  1

11/25/2021 37
• Joint Cumulative Distribution Function
– Discrete
F ( x, y )  P ( X  xi , Y  y j )

F ( x, y )   
i:xi  x j: y j  y
pij
– Continuous

x y
F ( x, y )    f ( w, z )dzdw
w  z 

11/25/2021 38
• Example : Air Conditioner Maintenance
– A company that services air conditioner units in
residences and office blocks is interested in how
to schedule its technicians in the most efficient
manner
– The random variable X, taking the values 1,2,3 and
4, is the service time in hours
– The random variable Y, taking the values 1,2 and 3,
is the number of air conditioner units

From the table given below find the joint PMF


and Joint CDF.
11/25/2021 39
Y= X=service time in Hour
number
of units Joint p.m.f
1 2 3 4

 p ij 0.12  0.18
1 0.12 0.08 0.07 0.05 i j

  0.07  1.00

2 0.18 0.15 0.21 0.13


Joint cumulative distribution function

3 0.01 0.01 0.02 0.07 F (2, 2)  p11  p12  p21  p22


 0.12  0.18  0.08  0.15
 0.43

11/25/2021 40
Conditional Probability Distribution for Discrete Random
Variables

11/25/2021 41
11/25/2021 42
11/25/2021 43
Continue...

11/25/2021 44
Conditional probability Distribution for Continuous Random Variables
(Conditional probability density function)
The probability distribution of a continuous random variable can be characterized
by its probability density function (pdf). When the probability distribution of the
random variable is updated, by taking into account some information that gives
rise to a conditional probability distribution, then such a distribution can be
characterized by a conditional probability density function.

11/25/2021 45
Continue..

11/25/2021 46
11/25/2021 47
11/25/2021 48
Exercise :

11/25/2021 49
11/25/2021 50
11/25/2021 51
Exercise :

11/25/2021 52
Solution:

11/25/2021 53
Continue..

11/25/2021 54
Exercise:

Solution:

11/25/2021 55
• A Gaussian random variable is one whose probability density function can
be written in the general form

11/25/2021 56
Special Distribution:
Continuous Probability Distributions
 UNIFORM DISTRIBUTION

PDF CDF

11/25/2021 57
 EXPONENTIAL DISTRIBUTION
PDF CDF

Application: Exponential distributions find wide applicability in queuing theory, reliability


theory, and communication theory

 Normal (Gaussian) Distribution

Application: A random variable X consisting of a number of components, each with a


general distribution tends to a normal distribution as the number becomes very large.
11/25/2021 58
 LAPLACE DISTRIBUTION
The Laplace density, also called a double-exponential density, is defined by

Applications: To model navigation and pilot errors, speech, and image processing.

11/25/2021 59
CAUCHY DISTRIBUTION

Application: A Cauchy distribution is a good indicator of how sensitive the tests are to heavy-
tail departures from normality.

BETA DISTRIBUTION

11/25/2021 60
Discrete Probability Distributions
 BERNOULLI DISTRIBUTION
A single event is Bernoulli distributed if the probability of success is p and probability of
failure is q

 BINOMIAL DISTRIBUTION
The probability b(k; n, p) that the event A occurs exactly k times in n Bernoulli trials.

This is called the binomial distribution, and b(k;n,p) is called a probability mass function

11/25/2021 61
POISSON DISTRIBUTION
In the regular Poisson distribution the cumulative distribution has unit jumps at random times
and not at discrete times. Thus, it is discrete in state but continuous in time.

Applications:

11/25/2021 62
GEOMETRIC DISTRIBUTION

A sequence of independent Bernoulli trials with p as the probability of success can be


modeled in two different ways. The distribution of the number of successes k is binomial.
The waiting time until the first success occurs is geometrically distributed. If the first
success is to occur at the kth trial, then we must have (k -1) failures preceding the first
success

11/25/2021 63
NEGATIVE BINOMIAL DISTRIBUTION
Let us now define the following events to find this distribution

HYPERGEOMETRIC DISTRIBUTION
 The binomial distribution is obtained while sampling with replacement. Let us
select a sample of n microprocessor chips from a bin of N chips. It is known
that K of these chips are defective.

 If we sample with replacement then the probability of any defective chip is K/N.

11/25/2021 64
 The probability that k of them will be defective in a sample size of n is given by the
binomial distribution since each drawing of a chip constitutes a Bernoulli trial.

 On the other hand, if we sample without replacement, then the probability for the first
chip is K/N, the probability for the second chip is (K- 1)/(N-1), and for each succeeding
sample the probability changes.

 Hence the drawings of the chips do not constitute Bernoulli trials and binomial
distribution does not hold. Hence we have to use alternate methods to arrive at the
probability of finding k defective chips in n trials.

11/25/2021 65
Thank You...

11/25/2021 66

You might also like