0% found this document useful (0 votes)
38 views111 pages

Wa0007.

Uploaded by

kreithabetse
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)
38 views111 pages

Wa0007.

Uploaded by

kreithabetse
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/ 111

ST2504 – INTRODUCTION TO PROBABILITY

THEORY
CHAPTER 3
• Discrete Random Variables and Their Distribution
Functions
Random Variables
• In performing experiments, it often happens that we are not
interested in the actual outcome of the experiment but rather in
some function of the outcome.
• Thus, if a coin is tossed n times, one is interested in the total number
of heads or tails observed not in the 2n ordered outcomes in the
sample space.
• In the game of chance one is interested in the net gain or loss of a
certain player
Cont.
• Random variables are classified as either Discrete or Continuous. A
discrete R.V. is one which can take on only a finite or countably
infinite number of distinct values. A r.v. is said to be continuous in a
given range if it can assume any value in that range.
Random Variables
• A random variable defined on the sample space of a random
experiment can be thought of as a rule that associates a real number
with every possible outcome (or element of S).
• Definition: A random variable X takes on various variables arbitrarily
with probabilities specified with its probability distributions. The
range of X is denoted by Rx.
Cont.
• Since random variables are some special mathematical function of
some sort, we use a functional notation. Let ω (omega) be a generic
element of the sample space, then X(ω) will be the functional
representation of the random variable X.
• We use capital letters like U, V, W, etc. to represent random variables
and lower case letters like x, y, z etc. to represent a particular value in
the range of a random variable.
Example
• We roll a pair of dice 1 time. Let X(.) be the sum of the two numbers
that occur. Then the sample space is: S = ( x1, x2 ) : x1 = 1,2,...,6; x2 = 1,2,..6
• And we have defined X ( ) = x1 + x2 , for  = ( x1 , x2 )  S .
• The range of X is Rx = {2, 3, …, 12}
• Consider an example of 3 flips of a fair coin. Suppose we are
interested in the number of heads, and we define the random
variable X as the number of heads observed.
• 𝑆 = {𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝐻𝑇𝑇, 𝑇𝐻𝐻, 𝑇𝐻𝑇, 𝑇𝑇𝐻, 𝑇𝑇𝑇}
• The range of X is Rx = {0, 1, 2, 3}
Random Variables and Events
• The probability distribution for a discrete random variable, also called
a probability mass function of X is defined as
P  X (.) = x  = PX ( x ) , x  Rx .
• The probability mass function of a discrete random variable X can be
easily found if X is defined on the sample space S and we know the
probability function for S.
• Let’s assume we have an experiment with sample space S and we
know probability function for S. For instance, suppose we have

S = 1 , 2 ,..., 7 
Cont.
• And define the events
A = 1 , 3 , 4 
B = 6 , 7 
C = 2 , 5 
• Then the probability function of X is:
P  X = x1  = P ( A )
P  X = x2  = P ( B )
P  X = x3  = P ( C )
• Therefore, it is possible to find the probability function of a discrete
random variable because we know how to assign probabilities to events.
Example
• Suppose that a fair coin is tossed 3 times. Let the random variable X
be the number of heads observed.
• What is the sample space?
• What is the range of X?
• Find the probability distribution corresponding to the r.v. X.
• Construct a graph
Solution
• 𝑆 = 𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝐻𝑇𝑇, 𝑇𝐻𝐻, 𝑇𝐻𝑇, 𝑇𝑇𝐻, 𝑇𝑇𝑇
1
• The probability of each outcome is since all the outcomes are equally
8
likely simple events. With each sample point we can associate a number of
X
Sample TTT TTH THT HTT HHT HTH THH HHH
Points
No. of 0 1 1 1 2 2 2 3
Heads
P(X = x) 1 1 1 1 1 1 1 1
8 8 8 8 8 8 8 8
• The Table shows that the r.v. can take the values 0, 1, 2, 3.
Example
• Suppose that a fair coin is tossed 3 times. Let the random variable X
be the number of heads observed.
• Then 𝑆 = 𝐻𝐻𝐻, 𝐻𝐻𝑇, 𝐻𝑇𝐻, 𝐻𝑇𝑇, 𝑇𝐻𝐻, 𝑇𝐻𝑇, 𝑇𝑇𝐻, 𝑇𝑇𝑇
• Then Rx = {0, 1, 2, 3}.
• We see that A = (TTT )
B = ( HTT ) , (THT ) , (TTH )
C = ( HHT ) , ( HTH ) , (THH )
D = ( HHH )
Cont.
• The probability function for X is
1
P X = 0 =
8
3
P X = 1 =
8
3
P X = 2 =
8
1
P X = 3 =
8
Probability Mass Function
• Now the Probability Mass Function of a discrete random variable can
be represented in a table as follows:

X 0 1 2 3 Total
P(X=x) 1/8 3/8 3/8 1/8 1

• The table illustrates what we mean by a probability distribution of a


random variable
Class Exercise
• In an experiment of rolling a balanced die twice, let X be the
maximum of the two numbers obtained.
• What are the possible values of X?
• Write down the sample space
• What is the probability function for X?
• Determine and sketch the probability mass function of X.
• Find the expected value of X.
• Find the variance of X.
Probability Mass Function Graph
• A graph can also be used to visualize a probability mass function.
• The height of the bar is equal to the probability that a random
variable assumes the value over the bar
Probability Mass Function
• The Probability Mass Function of a discrete random variable

X 0 1 2 3 Total
P(X=x) 1/8 3/8 3/8 1/8 1

• Note that the above function is a true pdf and all the probabilities are
greater than 0.
Graph
Interpretation of Figure
• The figure clearly indicates that the events X = 1 and X = 2 are twice
as likely as the other two possible values.
Cont.
• If we wish to determine the probability that the discrete random
variable X is greater than or equal to a but less than or equal to b
(with a ≤ b), we only need to sum the probabilities of the occurrence
of the values a through b; that is
b
P (a  X  b) =  P ( X = x)
x=a
Example
• Consider the experiment of throwing a pair of dice. We are interested
in the sum of the two numbers that occur. We know that X can
assume the numbers 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12.
• What is the pmf of X?
• What is the probability that the number sum of numbers will be at
least 4 and at most 6?
• Find the probability that the sum will be at least 7.
• Find the probability that the sum will be at most 7.
Solution
𝒙 2 3 4 5 6 7 8 9 10 11 12 To
𝑃(𝑋 = 𝑥) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36 1

• 𝑃 4 ≤ 𝑋 ≤ 6 =?
• 𝑃(𝑋 ≥ 7)=?
• 𝑃 𝑋 ≤ 7 =?
Cont.

6
a ) P(4  X  6) =  P( X = x) = PX ( x = 4) + PX ( x = 5) +PX ( x = 6)
x=4
12
b) P( X  7) =  P( X = x)
x =7
7
c) P( X  7) =  P( X = x)
x=2
Cont.
• The probability mass function of a discrete random variable X can be
represented in a table as follows:
x 0 1 2 3 4 5 Total
P(X = x) 1/6 5/18 2/9 1/6 1/9 1/18 1

• Note: The random variable X is the absolute difference of the dots


that appear when rolling a pair of dice.
• Find 𝑃 3 ≤ 𝑋 ≤ 5
• Find the probability that the number of dots will be at least 2.
Properties
• The probability mass function gives the probabilities of occurrence for
different possible values of a random variable.
• The probability mass function must satisfy the following properties
a )  PX ( x ) = 1
xRX

b) PX ( x )  0, for all x in the range of X

• Any function of a real variable PX(x) that satisfies these two conditions
can serve as a probability mass function of a discrete random variable
X.
Example

a) Define Rx = 1,2,3,4 and a function g ( x) as follows:

1
 x, if x  Rx
g( x) = 10
0, otherwise

Is the above a probability function of some random variable?


Example
x−2
• 1. CanP ( x ) = 5 ,
X x = 1,2,3,4,5 serve as a probability mass function?

• 2. A discrete function
 1
is given by
 ( 2 x + 3) , x = 1,2,3
PX ( x) =  21
0, elsewhere

• Is the above a probability function of some random variable?


• 3. A discrete random variable has a probability mass function
k ( x − 1), x = 3,4,5
PX ( x) = 
0, elsewhere
• Find the constant k for which PX ( x) is a probability function .
Solution
• 1. The first condition is satisfied but the second condition is not
satisfied, therefore PX(x) cannot serve as a probability mass function
• 2. Yes
• 3. k = 1/9
Mean and Standard Deviation of a probability
distribution.
• Each probability distribution has a mean and standard deviation
associated with it, just as a set of data has a mean and standard deviation.
• The mean of a probability distribution is called its expected value.
Cont.
• The mean and standard deviation for a probability distribution are
computed differently from the mean and standard deviation of a set
of data.
• This section explains how these measures- as well as a new measure
called the expectation - are calculated for probability distributions.
Formula for the Mean of a Probability
Distribution
• The mean of a random variable with a discrete probability distribution
is  = X 1PX (1) + X 2 PX (2) + X 3 PX (3)... + X n PX (n)
n
=  X i PX (X i )
i =1

• Where X , X , X ,..., X are the outcomes and


1 2 3 n

• P( X1 ), P( X 2 ), P( X 3 ), ..., P( X n ) are the corresponding probabilities.


Example 2.22
• Find the mean of spots that appear when a die is rolled.
• Solution.
• In the roll of a die, the mean can be computed thus
Variance and Standard Deviation
• The variance of a probability distribution is found by multiplying the
square of each outcome by its corresponding probability, summing
those products, and subtracting the square of the mean.
• The formula for the variance of the probability distribution is

 2 = X 2  P( X ) −  2
Example
• Compute the variance and the standard deviation when a die is
rolled.  = 3.5
• Recall , as computed in the previous example.
• Square each outcome and multiply by the corresponding probability,
sum those products and then subtract the square of the mean.
Expectation
• Another concept related to the mean for a probability distribution is
that of the expected value or expectation.
• It is used in various types of games of chance, in insurance, and other
areas such as decision theory.
Mathematical Expectation of Discrete
Variables
• Let 𝑥1 , 𝑥2 , … , 𝑥𝑛 be the range of a discrete r.v. 𝑋 which assumes the
value 𝑥𝑖 with the probability 𝑝 𝑥𝑖 , 𝑖 = 1,2, … 𝑛, then the
mathematical expectation of 𝑋 is given by

• 𝐸 𝑋 = σ 𝑥𝑖 𝑝 (𝑥𝑖 )
Cont.
• The formula for the expected value is the same as the formula for the
theoretical mean. The expected value, then, is the theoretical mean
of the probability distribution
• That is E (X ) = 
Example
• Suppose that 4 children are planned in a family. Let the random
variable X stand for the number of boys. Discuss the probability
distribution of X.
• Find the mean and variance of the random variable X.
Exercise
• Recall an exercise on tossing a pair of dice and letting the random
variable X be the absolute difference of the two dots that appear.
• Find the expected value and the variance
Solution
• E(X) = 1.9444
• Var(X) = 2.0525
Variance of X
• Theorem: V (X ) = E( X 2
) −  E ( X )
2

• Proof the above theorem

Var ( X ) =  ( X −  ) P[ X = x]
2
Exercise
• The probability mass function of a discrete random variable 𝑋is given
by
𝑥
,
𝑝 𝑥 =൝ 15 , 𝑥 = 1,2,3,4,5
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

• What is the expected value of 𝑋 6 − 𝑋 ?


Class Exercise
• The probability mass function of a random variable X is given as:
x 1− x
PX ( x) = p q , 0  x 1

• Find 𝐸 𝑋 and 𝑉𝑎𝑟 𝑋 .


Mathematical Expectation of Continuous
Variables
• Suppose 𝑋 is a continuous r.v., then the expectation is given by
+
E(X ) =  xf ( x)dx
−
Example
1
𝑥 0≤𝑥≤4
• A r.v. 𝑋has the pdf 𝑓 𝑥 = ቐ8
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
• Is the above function a true pdf?
• If so, find the expectation and variance of 𝑋.
Distribution Function/Cumulative Distribution
Function
• An important special case of summing probability is the
determination of cumulative distribution function (c.d.f).
• Definition:
• For a random variable X, the distribution function or cumulative
distribution function, denoted by FX(x), is defined as the probability
that the r.v. 𝑋 takes a value less than or equal to 𝑥:
FX ( x ) = P ( X  x )
• 𝐹 𝑥 = 𝑃(−∞ < 𝑋 < 𝑥)
Cont.
• 𝐹 accumulates all the probabilities of the values of 𝑋 up to and
including 𝑥.
Distribution Function of Discrete Random
Variable
• Let 𝑋 be a discrete r.v. with probability 𝑝 𝑥𝑖 , then the cumulative
distribution function is defined by

FX ( x ) = P ( X  x ) =  P ( X = xi )
xi  x

• Where the summation is taken over all mass points xi  x


• If 𝑋takes on only a finite number of values 𝑥1 , 𝑥2, … , 𝑥𝑛 then the
distribution function 𝐹(𝑥) is given by
Cont.

0, −   x  x1
 p( x ) x1  x  x2
 1
 p ( x1 ) + p ( x2 ) x2  x  x3

F ( x ) = .
.

.
 p ( x ) + p ( x ) + ... + p( x ) = 1 xn  x  +
 1 2 n
Example
• A fair coin is tossed three times. Let 𝑋 represent the number of heads
which come up.
• (a) Find the cumulative distribution function and
• (b) Sketch its graph
Solution
• (a) To obtain the distribution function by definition, we need the
following steps:
• Step 1: Find the probability mass function of the random variable 𝑋.
The probability distribution of this example was:

𝒙𝒊
𝑝(𝒙𝒊 )
Solution
• (a) To obtain the distribution function by definition, we need the
following steps:
• Step 1: Find the probability mass function of the random variable 𝑋.
The probability distribution of this example was:

𝒙𝒊 0 1 2 3 Total
𝑝(𝒙𝒊 ) 1 3 3 1 1
8 8 8 8

• Step 2: Find the distribution function:


Cont.
• The distribution function of X is found as follows:
1
FX ( 0 ) = P ( X  0 ) = P ( X = 0 ) =
8
1
FX (1) = P ( X  1) = P ( X = 0 ) + P ( X = 1) =
2
FX ( 2 ) =
FX ( 3) =
Cont.
• And we can present FX(t) as:

0, t  0
1
 , 0  t 1
8

1
FX ( t ) =  , 1  t  2
2
7
8 , 2  t  3

1, t  3

Cont.
• The distribution function has the following properties:
a ) 0  FX ( t )  1
b) lim FX ( t ) = 0, lim FX ( t ) = 1
t →− t →+

c) If a  b, then FX ( a )  FX ( b ) .
Cont.
• All probability statements about a random variable X can be
evaluated from FX(t) by noting that
1.P ( X  a ) = FX ( a )
2.P ( X  a ) = 1 − FX ( a − )
3.P ( X  a ) = 1 − P ( X  a ) = 1 − FX (a )
4.P ( X  a ) = P ( X  a ) = FX (a −)
5.P ( a  X  b ) = P ( X  b ) − P ( X  a ) = FX ( b ) − FX ( a )
6.P ( X = a ) = P ( X  a ) − P ( X  a ) = FX ( a ) − FX ( a − )
Example
• The distribution function of a discrete random variable X is given by
0, k 1
0.1, 1 k  2

0.3, 2k3
FX ( k ) = 
0.7, 3 k  4
0.8, 4k 5

1, k 5
• Find the probabilities:
• 𝑃 𝑋 = 2 ,𝑃 1 < 𝑋 ≤ 4 ,𝑃 𝑋 > 3
Example
• The cumulative distribution function of a discrete random variable X
is given by
0, k 1
0.1, 1 k  2

0.3, 2k3
FX ( k ) = 
0.7, 3 k  4
0.8, 4k 5

1, k 5

• What are the possible values of X?


• Find the probability mass function of X.
Solution
• Possible values of 𝑋 are: 𝑅𝑘 = 1,2,3,4,5
Central Moments
• For a set of N numbers comprising of X1 , X 2 , … , X N , the r th moment
(also known as r th moment about zero) is defined as
σ 𝑋𝑖𝑟
𝑋𝑟 = , 𝑟 = 1,2,3, … .
𝑁
σ 𝑋𝑖1 σ 𝑋𝑖
𝑋1 = = 𝑖𝑠 𝑡ℎ𝑒 𝑠𝑎𝑚𝑝𝑙𝑒/𝑎𝑟𝑖𝑡ℎ𝑎𝑚𝑎𝑡𝑖𝑐 𝑚𝑒𝑎𝑛
𝑁 𝑁
𝑠𝑡
• The 1 central moment about the origin
• The 2𝑛𝑑 central moment about the origin is given by
σ 𝑋𝑖2
𝑋2 =
𝑁
Cont.
σ 𝑋𝑖3
𝑋3 = = 𝑇ℎ𝑒 𝑡ℎ𝑖𝑟𝑑 𝑐𝑒𝑛𝑡𝑟𝑎𝑙 𝑚𝑜𝑚𝑒𝑛𝑡
𝑛
•.
•.
•.
σ 𝑋𝑖𝑘
𝑋𝑘 = = The 𝑘 𝑡ℎ 𝑐𝑒𝑛𝑡𝑟𝑎𝑙 𝑚𝑜𝑚𝑒𝑛𝑡
𝑛
Example
• Let 𝑥1 = −1, 𝑥2 = 0, 𝑥3 = 1, 𝑥4 = 2.
• Find the first 4 central moments
Solution
σ 𝑥𝑖 −1+0+1+2 2
• 𝑋1 = = =
𝑛 4 4

σ 𝑥𝑖2 1+0+1+4 6
𝑋2 = = =
𝑛 4 4

σ 𝑥𝑖3 1+0+1+8 10
𝑋3 = = =
𝑛 4 4

σ 𝑥𝑖4 1+0+1+16 18
𝑋4 = = =
𝑛 4 4
The 𝑟 𝑡ℎ moment about the mean
• For a set of N numbers comprising of X1 , X 2 , … , X N , the r th moment
about the mean is defined as:
σ 𝑥𝑖 −𝑥ҧ 𝑟
• 𝑀𝑟 =
𝑛
σ 𝑥𝑖 −𝑥ҧ 1 σ 𝑥𝑖 −σ 𝑥ҧ ҧ 𝑥ҧ
𝑛𝑥−𝑛
𝑀1 = = = =0
𝑛 𝑛 𝑛

• Remark: The first moment about the mean 𝑥ҧ is always zero.


Cont.
• The second moment about the mean, 𝜇2 , represents the variance,
and is usually denoted by 𝜎 2
Moments and Moment Generating Functions
for Random Variables
• The mean and variance describe the two aspects of a probability
distribution function of any random variable 𝑋.
• However, knowledge of 𝐸 𝑋 𝑎𝑛𝑑 𝐸 𝑋 2 alone is not enough to
describe the probability distribution of 𝑋.
• We need to know 𝐸 𝑋 3 , 𝐸 𝑋 4 , 𝐸 𝑋 5 , … , 𝐸 𝑋 𝑘 to determine the
probability function (pdf) of 𝑋 completely.
Cont.
• The 𝑘 𝑡ℎ moment of a random variable 𝑋 is given by
• 𝑀𝑘 = 𝐸 𝑋 𝑘 , 𝑘 = 1, 2, 3, …
• In general,
 x k P[ X = x] if x is discrete
E(X k ) =  k
  x P[ X = x]dx if x is continuous
Cont.
• Once 𝐸 𝑋 𝑘 , 𝑘 = 1,2,3, … is known, all properties of the pdf of the
random variable X can be determined.

• Example:
• Suppose that the only 2 possible values of a random variable 𝑋 are
0 𝑎𝑛𝑑 1.
• Let 𝑃 𝑋 = 0 = 0.1
• 𝑃 𝑋 = 1 = 0.9
• Find the 𝑘 𝑡ℎ moment of the random variable 𝑋.
Solution
• 𝑋 is a discrete random variable because its possible values are
0 𝑎𝑛𝑑 1.
• Let 𝑘 be 1

E ( X k ) = E ( X 1 ) =  x P[ X = x ] = 0(0.1) + 1(0.9) = 0.9


• Hence the mean is equal to 0.9.
• Let 𝑘 𝑏𝑒 2,3
Cont.

E ( X k ) = E ( X 2 ) =  x 2 P[ X = x ] = 0(0.1) + 1(0.9) = 0.9

E(X k
) = E ( X ) =  x P[ X = x] = 0(0.1) + 1(0.9) = 0.9
3 3
Cont.
• Similarly, 𝐸 𝑥 4 = 𝐸 𝑥 5 = 𝐸 𝑥 𝑘 = 0.9
• What is the variance of X?
2 2 2
• 𝜎 =𝐸 𝑋 − 𝐸 𝑋 = 0.9 − 0.81 = 0.09
Theorem
• i) 𝑀1 = 𝐸 𝑥
• Ii) 𝑀2 = 𝛿 2 + 𝜇 2
Moment Generating Functions
• The moment generating function for a r.v 𝑋, denoted by Mx(t), is
given as: M X ( t ) = E etx  for −   t  ,
where t is a rea l n umber

• The Taylor expansion for x is given by


e
0 1 2 3
x x x x
e x = + + + + ...
0! 1! 2! 3!
Example
0 1 2 3 4
0 0 0 0 0
e0 = + + + + + ...
0! 1! 2! 3! 4!
0 1 2 3 4
1 1 1 1 1
e1 = + + + + + ...
0! 1! 2! 3! 4!

0 1 2 3 4
2 2 2 2 2
e 2 = + + + + + ...
0! 1! 2! 3! 4!
In General
0 1 2 3 4
(tx ) (tx ) (tx ) (tx ) (tx )
etx = + + + + + ...
0! 1! 2! 3! 4!

Mgf ( x) = M x (t ) = E e  tx
Summary
• Discrete Distributions

M x (t ) = E (e tx
)=  e P[ X = x ]
tx

overallx

• Continuous Distributions

M x (t ) = E (e tx
)=  e tx
f X ( x ) dx
−
Example
• Given a probability distribution of some discrete distribution as

p X ( x) =  (1 −  )
1− x
x
, 0  x 1

• Find the moment generating function of X.


Solution
1
M X (t ) = E (e ) =  e  (1 −  )
tx tx x 1− x

x =0
Solution
1
M X (t ) = E (etx ) =  etx x (1 −  )1− x
x =0

= et 0 0 (1 −  )1−0 + et1 1 (1 −  )1−1


= (1 −  ) +  et
=f  et + (1 −  )
Example
• Given a probability distribution of some continuous distribution as
1
 , 20  x  30
f X ( x) = 10
0, elsewhere

• Find the moment generating function of X.


Solution

 30
M X (t ) =  X =  (1 / 10)dx
tx tx
e f ( x ) dx e
− 20
Solution

 30
M X (t ) =  X =  (1 / 10)dx
tx tx
e f ( x ) dx e
− 20

e30t − e20t
=
10t
Another Example
• Let − x
 e , x  0,   0
f X ( x) = 
0, Otherwise
• Find the moment generating function of x.
Solution


M X (t ) =
 −t
Chapter 4
Countinuous Random Variables - Introduction

• The probability that X falls between any two values 𝑎 𝑎𝑛𝑑 𝑏 is equal
to the area under the histogram between 𝑎 𝑎𝑛𝑑 𝑏. Because the
histogram in this case is represented by a curve, the probability would
be found by computing an integral.
• The random variable described here is an example of a continuous
random variable.
Countinuous Random Variables
• A random variable is continuous if its probabilities are given by areas
under a curve. The curve is called a probability density function for
the random variable. The probability density function is sometimes
called the probability distribution.
• Because the probability density function is a curve, the computations
of probabilities involve intergrals, rather than the sums that are used
in the discrete case.
Computing Probabilities with the Probability
Density Function
• Let 𝑋 be a continuous random variable. Let the function 𝑓(𝑥) be the
probability density function of 𝑋. Let 𝑎 𝑎𝑛𝑑 𝑏 be any two numbers,
with 𝑎 < 𝑏. Then
•𝑃 𝑎≤𝑋≤𝑏 =𝑃 𝑎≤𝑋<𝑏 =𝑃 𝑎<𝑋≤𝑏 =𝑃 𝑎<𝑋<𝑏
𝑏
• = ‫𝑓 𝑎׬‬ 𝑥 𝑑𝑥 Equation 1
Cont.
• In addition,
𝑏
•𝑃 𝑋≤𝑏 =𝑃 𝑋<𝑏 = ‫𝑓 ∞׬‬ 𝑥 𝑑𝑥 𝑎𝑛𝑑 Equation 2


•𝑃 𝑋≥𝑎 =𝑃 𝑋>𝑎 = ‫𝑥𝑑)𝑥(𝑓 𝑎׬‬ Equation 3
Cont.
• If 𝑓(𝑥) is the probability density function of a random variable 𝑋,
then the area under the entire curve from −∞ 𝑡𝑜 ∞ is the probability
that the value of 𝑋 is between −∞ 𝑎𝑛𝑑 ∞. This probability must be
equal to 1, because the value of 𝑋 is always between −∞ 𝑎𝑛𝑑 ∞.
Therefore the entire area under the curve 𝑓(𝑥) is equal to 1.

• That is, ‫׬‬−∞ 𝑓 𝑥 𝑑𝑥 = 1
Example
• a) Is the following a probability density function?
3e −3 x , 0  x  
f X ( x) = 
0, Otherwise
Example 1
• A hole is drilled in a sheet-metal component, and then a shaft is
inserted through the hole. The shaft clearance is equal to the
difference between the radius of the hole and the radius of the shaft.
Let the random variable 𝑋 denote the clearance, in millimetres. The
probability density function of 𝑋 is
1.25 1 − 𝑥 4 0<𝑥<1
• 𝑓 𝑥 =ቊ
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
• Is the above function a probability density function?
• Components with clearance larger than 0.8𝑚𝑚 must be scrapped.
What proportion of components are scrapped?
Solution
• The density function 𝑓 𝑥 𝑖𝑠 0 𝑓𝑜𝑟 𝑥 ≤ 0 𝑎𝑛𝑑 𝑓𝑜𝑟 𝑥 ≥ 1. This
indicates that the clearances are always between 0 𝑎𝑛𝑑 1𝑚𝑚. The
proportion of components that must be scrapped is 𝑃 𝑋 > 0.8 ,
which is equal to the area under the probability density function to
the right of 0.8.
1
• The area is given by 𝑃 𝑋 > 0.8 = ‫׬‬0.8 1.25 1 − 𝑥 4 𝑑𝑥 =?
Cont.
• The probability density function of 𝑋 is

1.25 1 − 𝑥 4 0<𝑥<1
• 𝑓 𝑥 =ቊ
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

• The density function 𝑓 𝑥 𝑖𝑠 0 𝑓𝑜𝑟 𝑥 ≤ 0 𝑎𝑛𝑑 𝑓𝑜𝑟 𝑥 ≥ 1. This


indicates that the clearances are always between 0 𝑎𝑛𝑑 1𝑚𝑚.
• Find the mean and variance of X.
Cumulative Distribution Function of a
Continuous Random Variable
• The cumulative distribution of a continuous random variable 𝑋 is
𝐹 𝑥 = 𝑃 𝑋 ≤ 𝑥 , just as it is for a discrete random variable. For a
discrete random variable, 𝐹 𝑥 can be found by summing values of
the probability mass function.
• For a continuous random variable, the value of 𝐹 𝑥 is obtained by
integrating the probability density function. Since 𝐹 𝑥 = 𝑃 𝑋 ≤ 𝑥 ,
𝑥
it follows from Equation 2 that 𝐹 𝑥 = ‫׬‬−∞ 𝑓 𝑡 𝑑𝑡, where 𝑓 𝑡 is the
probability density function.
Example
• Refer to example – 1.
• Find the cumulative distribution function 𝐹(𝑥).
Solution
• The probability density function of 𝑋 is given by 𝑓 𝑡 = 0 𝑖𝑓 𝑡 =
0, 𝑓 𝑡 = 1.25 1 − 𝑥 4 𝑖𝑓 0 < 𝑡 < 1, 𝑎𝑛𝑑 𝑓 𝑡 = 0 𝑖𝑓 𝑡 ≥ 1.
𝑥
• The cumulative distribution function is given by 𝐹 𝑥 = ‫׬‬−∞ 𝑓 𝑡 𝑑𝑡.
• Since 𝑓(𝑡) is defined separately on three different intervals, the
computation of the cumulative distribution function involves three
separate cases.
Cont.
• If 𝑥 ≤ 0:
𝑥 𝑥
•𝐹 𝑥 = ‫׬‬−∞ 𝑓 𝑡 𝑑𝑡 = ‫׬‬−∞ 𝑜𝑑𝑡 = 0 because 𝑓 𝑡 = 0 𝑖𝑓 𝑡 = 0,
• If 0 < 𝑥 < 1:
𝑥 0 𝑥
•𝐹 𝑥 = ‫׬‬−∞ 𝑓 𝑡 𝑑𝑡 = ‫׬‬−∞ 𝑓 𝑡 𝑑𝑡 + ‫׬‬0 𝑓 𝑡 𝑑𝑡
0 𝑥
• = ‫׬‬−∞ 0𝑑𝑡 + ‫׬‬0 1.25 1 − 𝑡 4 𝑑𝑡
𝑥5
• = 1.25 𝑥 −
5
‫‪If 𝑥 > 1‬‬
‫𝑥‬
‫𝑥 𝐹•‬ ‫𝑡𝑑 𝑡 𝑓 ∞‪−‬׬ =‬
‫‪0‬‬ ‫‪1‬‬ ‫𝑥‬
‫•‬ ‫𝑓 ‪0‬׬ ‪−∞ 𝑓 𝑡 𝑑𝑡 +‬׬ =‬ ‫𝑡𝑑 𝑡‬ ‫𝑓 ‪1‬׬ ‪+‬‬ ‫𝑡𝑑 𝑡‬
‫‪0‬‬ ‫‪1‬‬ ‫‪4‬‬ ‫𝑥‬
‫•‬ ‫‪0 1.25‬׬ ‪−∞ 0𝑑𝑡 +‬׬ =‬ ‫𝑡𝑑 𝑡 ‪1 −‬‬ ‫𝑡𝑑‪1 0‬׬ ‪+‬‬
‫•‬ ‫‪=1‬‬
Cont.
• Therefore
0, 𝑥≤0
𝑥5
𝐹 𝑥 = 1.25 𝑥 − , 0<𝑥<1
5
1, 𝑥≥1
Cont.
• Therefore

0, x0

  x 
5
F ( x) = 1.25  x −  , 0  x  1
  5
1, x 1

Mean and Variance for Continuous Random
Variables
• The population mean and variance of a continuous random variable
are defined in the same way as those of a discrete random variable,
except that a probability density function is used instead of a
probability mass function.
• Let 𝑋 be a continuous random variable with probability density
function 𝑓 𝑥 . Then the mean of 𝑋 is given by
The Mean

• 𝜇𝑥 = ‫׬‬−∞ 𝑥𝑓 𝑥 𝑑𝑥
• The mean is sometimes called the expectation or the expected value
of 𝑋, and may be denoted by 𝐸(𝑋) or by 𝜇.
The Variance
• Let 𝑋 be a continuous random variable with probability density
function 𝑓 𝑥 . Then
• The variance of 𝑋 is given by
∞ 2
•𝑉 𝑋 = ‫׬‬−∞ 𝑥 − 𝜇𝑥 𝑓 𝑥 𝑑𝑥
• Alternative formula for the variance is given by
∞ 2 2
•𝑉 𝑥 = ‫׬‬−∞ 𝑥 𝑓 𝑥 𝑑𝑥 − 𝐸 𝑋
Example
• Find the mean and variance of the clearance.
Example
Let a probability density function be given by:

3e −3 x , 0  x  
f X ( x) = 
0, Otherwise

• Find 𝐸 𝑒 𝑥 of the above probability density function.


Summary

• ‫׬‬−∞ 𝑓 𝑥 𝑑𝑥 = 1

𝑥
•𝐹 𝑥 =𝑃 𝑋≤𝑥 = ‫׬‬−∞ 𝑓 𝑡 𝑑𝑡
Exercise
• 1. The hydrogenation of benzene to cyclohexane is promoted with a
finely divided porous nickel catalyst. The catalyst particles can be
considered to be spheres of various sizes. All the particles have
masses between 10 𝑎𝑛𝑑 70 𝜇𝑔. Let 𝑋 be the mass of a randomly
chosen particle. The probability density function of 𝑋 is given by
𝑥−10
, 10 < 𝑥 < 70
𝑓 𝑥 = ቐ 1800
0, 𝑂𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Cont.
• A) What proportion of particles have masses less than 50𝜇𝑔?
• B) Find the mean mass of the particles.
• C) Find the standard deviation of the particles masses.
• Find the cumulative distribution function of the particle masses.
Cont.
• 2. A process that manufactures piston rings produces rings whose
diameters (in centimeters) vary according to the probability density
function
3 3 − 16 𝑥 − 10 2 , 9.75 < 𝑥 < 10.25
𝑓 𝑥 =ቊ
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
• Is the above function a probability density function?
• Find the mean and standard deviation of diameter of rings
manufactured by this process.
Test 1, Thursday, 20 February 2025
• Venue: ETF 3

You might also like