You are on page 1of 16

Chapter 3.

Discrete Random Variables and


Probability Distribution
Session 5-6

PhD. Tri Tuyen Luc

December 13, 2021


3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.1 Discrete Random Variables

Example 3.1: A voice communication system for a business


contains 48 external lines. At a particular time, the system is
observed, and some of the lines are being used. Let the random
variable X denote the number of lines in use. Then, X can assume
any of the integer values 0 through 48. When the system is
observed, if 10 lines are in use, x = 10.
Example 3.2: Define the random variable X to be the number of
contamination particles on a wafer in semiconductor
manufacturing. If the maximum number of particles that can be
found on one of the wafers is very large, we might simply assume
that the range of X is the set of integers from zero to infinity.
we might also define the random variable Y to be the number of
chips from a wafer that fail the final test.

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.2 Probability Distributions and Probability Mass


Functions
The probability distribution of a random variable X is a description
of the probabilities associated with the possible values of X.
Example 3.2: Let X equal the number of bits in error in the next
four bits transmitted. Suppose that the probabilities are
P (X = 0) = 0.6561, P (X = 1) = 0.2916, P (X = 2) = 0.0486,
P (X = 3) = 0.0036, P (X = 4) = 0.0001.

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.2 Probability Distributions and Probability Mass


Functions

Definition 1 (Probability Mass Function).


For a discrete random variable X with possible values
x1 , x2 , · · · , xn , a probability mass function of X is the function
such that
(1) f (xi ) ≥ 0,
Pn
(2) f (xi ) = 1,
i=1
(3) f (xi ) = P (X = xi ) (1)

For the bits in error in the Example 3.2, f (0) = 0.6561,


f (1) = 0.2916, f (2) = 0.0486, f (3) = 0.0036, f (4) = 0.0001.

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.2 Probability Distributions and Probability Mass


Functions
Example 3.3: Let the random variable X denote the number of
semiconductor wafers that need to be analyzed until detecting a
large particle of contamination. Assume that the probability that a
wafer contains a large particle is 0.01 and that the wafers are
independent. Determine the probability distribution of X.
Solution: Let p denote a wafer in which a large particle is present and p′
be its complement. That is,

S = {p, p′ p, p′ p′ p, p′ p′ p′ p, p′ p′ p′ p′ p, p′ p′ p′ p′ p′ p and so forth}

We have P (X = 1) = 0.01, P (X = 2) = P (p′ p) = 0.99(0.01).


A general formula is
f (x) = P (X = x) = P (p′ p′ ...p′ p) = 0.99x−1 (0.01) for x = 1, 2, 3...
| {z }
x−1

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.2 Probability Distributions and Probability Mass


Functions
Example 3.4: An assembly consists of two mechanical components.
Suppose that the probabilities that the first and second
components meet specifications are 0.95 and 0.98. Assume that
the components are independent. Determine the probability mass
function of the number of components in the assembly that meet
specifications.
Solution: Let X be the number of components in the assembly that
meet specifications. We have
P (X = 0) = 0.05(0.02) = 0.001,
P (X = 1) = 0.95(0.02) + 0.98(0.05) = 0.068,
P (X = 2) = 0.95(0.98) = 0.931. So the mass function of X is
x 0 1 2
f(x) 0.001 0.068 0.931

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.2 Probability Distributions and Probability Mass


Functions

Example 3.5: Verify that the following function is probability mass


functions, and determine the requested probabilities.
f (x) = (3/4)(1/4)x , x = 0, 1, 2, ...
(a) P (X = 2) (b) P (X ≤ 2) (c) P (X > 2) (d) P (X ≥ 1).
Solution: We have f (xi ) ≥ 0.
∞ 1
f (xi ) = (3/4) 1 + 14 + 412 + · · · = (3/4)
P 
= 1.
i=0 1 − 14
(a) P (X = 2) = f (2) = 3/64.
(b) P (X ≤ 2) = f (0) + f (1) + f (2) = 63/64.
(c) P (X > 2) = 1 − P (X ≤ 2) = 1/64.
(d) P (X ≥ 1) = 1 − P (X < 1) = 1 − f (0) = 1 − 3/4 = 1/4.

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.3 Cumulative Distribution Functions

Definition 2 (Cumulative distribution function).


The cumulative distribution function of a discrete random variable X,
denoted as F (x), is
X
F (x) = P (X ≤ x) = f (xi )
xi ≤x

For a discrete random variable


P X, F (x) satisfies the following properties
(1) F (x) = P (X ≤ x) = f (xi ).
xi ≤x
(2) 0 ≤ F (x) ≤ 1.
(3) If x ≤ y then F (x) ≤ F (y) (2)

Notice that, when the values


P xi are increasingly
P ordered:
f (xi ) = P (X = xi ) = f (xj ) − f (xj ) = F (xi ) − F (xi−1 ).
xj ≤xi xj ≤xi−1

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.3 Cumulative Distribution Functions

Example 3.6: Determine the probability mass function of X from


the following
 cumulative distribution function:


 0 x < −2

0.2 −2 ≤ x < 0
F (x) =


 0.7 0 ≤ x < 2

1 2≤x
Solution:
f (−2) = F (−2) − F (xi ) = 0.2 − 0 = 0.2, where xi < −2.
f (0) = F (0) − F (xi ) = 0.7 − 0.2 = 0.5, where −2 ≤ xi < 0.
f (2) = F (2) − F (xi ) = 1 − 0.7 = 0.3, where 0 ≤ xi < 2.

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.3 Cumulative Distribution Functions

Example 3.7: Given the cumulative distribution function as below,


calculate the probabilities.
(a) P (X ≤ 50) (b) P (X ≤ 40)

0 x < −10
(c) P (40 ≤ X ≤ 60)


0.25 −10 ≤ x < 30
F (x) = (d) P (X < 0)
0.75 30 ≤ x < 50

 (e) P (0 ≤ X < 10)
50 ≤ x

1 (f) P (−10 < X < 10)
Solution: (a) P (X ≤ 50) = F (50) = 1.
(b) P (X ≤ 40) = F (40) = 0.75.
(c) P (40 ≤ X ≤ 60) = P (X ≤ 60) − P (X < 40) = P (X ≤ 60) − P (X ≤ xi )
= F (60) − F (xi ) = 1 − 0.75 = 0.25, where 30 ≤ xi < 40.
(d) P (X < 0) = P (X ≤ xi ) = F (xi ) = 0.25, where −10 ≤ xi < 0.
(e) P (0 ≤ X < 10) = P (X < 10) − P (X < 0) = 0.25 − 0.25 = 0.
(f) P (−10 < X < 10) = P (X < 10) − P (X ≤ −10) = 0.25 − 0.25 = 0.

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.3 Cumulative Distribution Functions


Example 3.8: Actual lengths of stay at a hospital’s emergency
department, determine the cumulative distribution function for the
waiting time random variable? 
0 x<1
Hours Count Percent



0.038 1≤x<2


1 19 3.80



0.14 2≤x<3

2 51 10.20 


0.312 3≤x<4

3 86 17.20 



4 102 20.40



0.516 4≤x<5

5 87 17.40 0.69 5≤x<6
⇒ F (x) =
6 62 12.40 

0.814 6≤x<7
7 40 8.00 


0.894 7≤x<8
8 18 3.60

8≤x<9

0.93


9 14 2.80 


0.958 9 ≤ x < 10
10 11 2.20


0.98 10 ≤ x < 15


15 10 2.00



1 15 ≤ x

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.4 Mean and Variance of a Discrete Random Variable


Definition 3 (Mean and Variance).
The mean or expected value of the discrete random variable X,
denoted by µ or E(X), is
X
µ = E(X) = xf (x) (3)
x

The variance of X, denoted as σ 2 or V (X), is


X X
σ 2 = V (X) = E(X − µ)2 = (x − µ)2 f (x) = x2 f (x) − µ
x x
= E(X 2 ) − [E(X)]2 . (4)

The standard deviation of X is σ = σ2.

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.4 Mean and Variance of a Discrete Random Variable

Example 3.9: The number of messages


sent per hour over a computer network has the following distribution:
x =number of massages 10 11 12 13 14 15
f (x) 0.08 0.15 0.30 0.20 0.20 0.07

E(X) = 10(0.08) + 11(0.05) + · · · + 15(0.07) = 12.5


2 2 2 2
√= 10 (0.08) + 11 (0.05) + · · · + 15 (0.07) − 12.5 = 1.85.
V (X)
σ = 1.85 = 1.36.

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.4 Mean and Variance of a Discrete Random Variable


Definition 4 (Expected Value of a Function of a Discrete
Random Variable).
If X is a discrete random variable with probability mass function
f (x), X
E [h(X)] = h(x)f (x). (5)
x

Example 3.10: X is the number of bits in error in the next four bits
transmitted,
x 0 1 2 3 4
f (x) 0.6561 0.2916 0.0486 0.0036 0.0001
What is the expected value of the square of the number of bits in error?
Now, h(X) = X 2 . Hence,
E[h(X)] = E(X 2 ) =
02 (0.6561) + 12 (0.2916) + 22 (0.0486) + 32 (0.0036) + 42 (0.0001) = 0.52.
PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

3.4 Mean and Variance of a Discrete Random Variable


Example 3.11: Trees are subjected to different levels of carbon
dioxide atmosphere with 6% of the trees in a minimal growth
condition at 350 parts per million (ppm), 10% at 450 ppm (slow
growth), 47% at 550 ppm (moderate growth), and 37% at 650
ppm (rapid growth). What are the mean and standard deviation of
the carbon dioxide atmosphere (in ppm) for these trees in ppm?
Solution:
x(ppm) 350 450 550 650
f (x) 0.06 0.1 0.47 0.37

E(X) = 350(0.06) + 450(0.1) + 550(0.47) + 650(0.37) = 565.


E(X 2 ) = 3502 (0.06) + 4502 (0.1) + 5502 (0.47) + 6502 (0.37) = 326100.
2 2 2
⇒ V (X) √= E(X ) − [E(X)] = 326100 − 565 = 6875.
⇒ σ = 6875 = 82.91561976.

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu
3.1 Discrete Random Variables
3.2 Probability Distributions and Probability Mass Functions
3.3 Cumulative Distribution Functions
3.4 Mean and Variance of a Discrete Random Variable

Thank you!

PhD. Tri Tuyen Luc Chapter 3. Discrete Random Variables and Probability Distribu

You might also like