You are on page 1of 26

Engineering Data analysis

( )
Discrete Random Variables and Probability and Distributions

Christopher Isaac l. Razo, m.sc.


University of Santo Tomas || Faculty of Engineering
Discrete Random Variables and Probability Distributions
DISCRETE VARIABLES
A discrete variable is a variable which can only take a countable number of values.

Loading at discrete points on a long, thin beam

University of Santo Tomas


2
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
DISCRETE VARIABLES
Example 1
There is a chance that a bit transmitted through a
digital transmission channel is received in error.
Let Xequal the number of bits in error in the next
four bits transmitted. The possible values for X are
{0, 1, 2, 3, 4}.

A graphical description of the probability distribution of X is

University of Santo Tomas


3
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
DISCRETE VARIABLES
In a semiconductor manufacturing process, two wafers
from a lot are tested. Each wafer is classified as passor fail.
Assume that the probability that a wafer passes the test is
0.8 and that wafers are independent. The sample space for
the experiment and associated probabilities are shown in
Table.

The random variable X is defined to be


equal to the number of wafers that pass.

University of Santo Tomas


4
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
CUMULATIVE DISTRIBUTION FUNCTIONS
In Example 1, we might be interested in the probability of
Example 1 three or fewer bits being in error.
There is a chance that a bit transmitted through a P(X≤ 3) = ?
digital transmission channel is received in error.
Let Xequal the number of bits in error in the next P(X≤ 3) = P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3)
four bits transmitted. The possible values for X are = 0.6561 + 0.2916 + 0.0486 + 0.0036
{0, 1, 2, 3, 4}. = 0.9999

In Example 1, we might be interested in the probability from


2 to 3 bits being error. P(2 ≤ X≤ 3) = ?
P(2 ≤ X≤ 3) = P(X ≤ 3) - P(X ≤ 2)
= 0.0036

University of Santo Tomas


5
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
CUMULATIVE DISTRIBUTION FUNCTIONS
Suppose that a day’s production of 850 manufactured parts
contains 50 parts that do not conform to customer
requirements. Two parts are selected at random, without
replacement, from the batch. Let the random variable X
equal the number of nonconforming parts in the sample.
What is the cumulative distribution function of X?

University of Santo Tomas


6
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
MEAN AND VARIANCE OF A DISCRETE RANDOM VARIABLE

University of Santo Tomas


7
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
MEAN AND VARIANCE OF A DISCRETE RANDOM VARIABLE
Example 1
There is a chance that a bit transmitted through a
digital transmission channel is received in error.
Let X equal the number of bits in error in the next
four bits transmitted. The possible values for X are
V(X) = σ2 = ???
{0, 1, 2, 3, 4}.

University of Santo Tomas


8
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
MEAN AND VARIANCE OF A DISCRETE RANDOM VARIABLE
Example 1
The number of messages sent per hour over a computer
network has the following distribution

V(X) = σ2 = ???
σ = ???
Show the Mean on the graph

University of Santo Tomas


9
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
DISCRETE UNIFORM DISTRIBUTION

a b

University of Santo Tomas


10
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
DISCRETE UNIFORM DISTRIBUTION

Example 1
Thickness measurements of a coating process are made to
the nearest hundredth of a millimeter. The thickness
measurements are uniformly distributed with values 0.15,
0.16, 0.17, 0.18, and 0.19. Determine the probability,
mean and variance of the coating thickness for this
process.
0.15 + 0.19
𝜇= = 0.17 𝑚𝑚
𝑓 𝑥 = 1ൗ𝑛 2
0.19 − 0.15 + 1 2 −1
𝑓 𝑥 = 1ൗ5 = 0.2 𝜎2 = = 0.0068 𝑚𝑚2
12

𝜎 = 0.0068 = .08246 𝑚𝑚

University of Santo Tomas


11
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
BINOMIAL DISTRIBUTION
1. Flip a coin 10 times. Let X = number of heads
obtained.

2. A worn machine tool produces 1% defective parts.


Let X = number of defective parts in the next 25
parts produced.

3. Each sample of air has a 10% chance of containing


a particular rare molecule. Let X = the number of
air samples that contain the rare molecule in the
next 18 samples analyzed.
A trial with only two possible outcomes is used
4. A multiple choice test contains 10 questions, each so frequently as a building block of a random
with four choices, and you guess at each question. experiment that it is called a Bernoulli trial.
Let X = the number of questions answered
correctly.
University of Santo Tomas
12
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
RACALL PERMUTATION AND COMBINATION!!! First, ways in getting 2 defective parts from the 3 defective
parts
A bin of 50 manufactured parts contains three defective 3 3!
parts and 47 nondefective parts. A sample of six parts is = = 3 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑡 𝑤𝑎𝑦𝑠
2 2! 1!
selected from the 50 parts. Selected parts are not replaced. 𝑛 𝑛!
That is, each part can only be selected once and the sample = ; 𝑛 = 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠, 𝑟 = 𝑠𝑢𝑏𝑠𝑒𝑡𝑠
𝑟 𝑟! (𝑛 − 𝑟)!
is a subset of the 50 parts. How many different samples are
there of size six that contain exactly two defective parts? Second, ways in getting 4 parts from remaining 47 parts

47 47!
= = 178,365 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑡 𝑤𝑎𝑦𝑠
the number of subsets of size six that contain exactly two defective items is 4 4! 43!

3 𝑥 178,365 = 535,095 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑡 𝑤𝑎𝑦𝑠


the probability that a sample contains exactly two defective parts is
the total number of different subsets of size six is found to be 178,365
𝑃(𝑋 = 𝑥) = = 0.034
50 50! 15,890,700
= = 15,890,700 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑡 𝑤𝑎𝑦𝑠
6 6! 44!

University of Santo Tomas


13
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
BINOMIAL DISTRIBUTION
Example.
The chance that a bit transmitted through a digital
transmission channel is received in error is 0.1. Also,
assume that the transmission trials are independent.
Let X = the number of bits in error in the next four bits
transmitted. Determine f(X=2)
Therefore,
𝑓 𝑋 = 2 = 6 0.0081
= 0.0486 The event X has 6 possible outcomes
In general,
4 Probability of having at 2 errors (E):
𝑥 4−𝑥
𝑓 𝑋=2 = 0.1 0.9 p(EEOO) = (0.1) (0.1) (0.9) (0.9)
𝑥
= 0.0081
The probability mass function of binomial
distributions X is
𝑛 𝑟 𝑛−𝑟
𝑓(𝑥) = 𝑝 1−𝑝 University of Santo Tomas
𝑟 Faculty of Engineering || ENG2015
14
Discrete Random Variables and Probability Distributions
BINOMIAL DISTRIBUTION Determine the probability that at least four samples
contain the pollutant
Example. 18
Each sample of water has a 10% chance of containing 18 𝑥 18−𝑥
𝑓(𝑋 ≥ 4) = ෍ 0.1 0.9
a particular organic pollutant. Assume that the 𝑥
𝑥=4
samples are independent with regard to the presence = 0.098
of the pollutant. Find the probability that in the next
18 samples, exactly 2 contain the pollutant. Or, it is easier to use
𝑓 𝑋 ≥ 4 = 1 – f(X<4)
18 2 18−2
𝑓 𝑋=2 = 0.1 0.9 3
2 18 𝑥 18−𝑥
= 0.284 𝑓 𝑋 ≥4 =1−෍ 0.1 0.9
𝑥
𝑥=0
= 0.098

Determine the probability that 3 ≤ X < 7.

6
18 𝑥 18−𝑥
𝑓 3 ≤ X<7 = ෍ 0.1 0.9
𝑥
𝑥=3
= 0.265 University of Santo Tomas
15
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
BINOMIAL DISTRIBUTION
0.3
Example.
Each sample of water has a 10% chance of containing 0.25

a particular organic pollutant. Assume that the 0.2


samples are independent with regard to the presence
of the pollutant. Find the probability that in the next

f(x)
0.15

18 samples, exactly 2 contain the pollutant. 0.1

18 2 18−2
𝑓 𝑋=2 = 0.1 0.9 0.05
2
= 0.284 0
18 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
18 𝑥 18−𝑥
number of samples that contain pollutants, X
𝑓(𝑋 ≥ 4) = ෍ 0.1 0.9
𝑥
𝑥=4
= 0.098

6
18 𝑥 18−𝑥
𝑓 3 ≤ X<7 = ෍ 0.1 0.9
𝑥
𝑥=3
= 0.265 University of Santo Tomas
16
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
BINOMIAL DISTRIBUTION
Example.
The chance that a bit transmitted through a digital
transmission channel is received in error is 0.1. Also,
assume that the transmission trials are independent.
Let X the number of bits in error in the next four bits
transmitted. Determine f(X=2)
For Mean
𝝁 = 𝒏𝒑
𝜇 = 4 .1
= 0.4

For Variance
𝝈𝟐 = 𝒏𝒑(𝟏 − 𝒑)
𝝈𝟐 = 4 .1 (0.9)
= 0.36

University of Santo Tomas


17
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
MEAN AND VARIANCE OF A DISCRETE RANDOM VARIABLE (FROM SLIDE 8)
Example 1
There is a chance that a bit transmitted through a
digital transmission channel is received in error.
Let X equal the number of bits in error in the next
four bits transmitted. The possible values for X are
V(X) = σ2 = ???
{0, 1, 2, 3, 4}.

University of Santo Tomas


18
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
The probability mass function of X is
BINOMIAL DISTRIBUTION 𝑛 𝑛−𝑟
𝑓(𝑥) = 𝑝 𝑟 1−𝑝
Example 𝑟
Flip a coin 10 times. Let X = number of heads 𝝁
0.25
obtained. Show the probability distribution
0.2

𝑛 = 10; 𝑝 = 0.5
0.15

f(x)
For Mean 0.1

𝝁 = 𝒏𝒑
𝜇 = 10 .5 0.05

=5
0
0 1 2 3 4 5 6 7 8 9 10

For Standard Deviation number of heads obtained, X

𝝈 = 𝝈𝟐 = 𝒏𝒑(𝟏 − 𝒑)
= 10 .5 (0.5)
= 1.58
University of Santo Tomas
19
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
Instead of a fixed number of trials, trials are conducted until a
GEOMETRIC DISTRIBUTION
success is obtained
Example. The probability mass function of
The chance that a bit transmitted through a digital geometric variable X is
transmission channel is received in error is 0.1. Also, 𝑓(𝑥) = 1 − 𝑝 𝑥−1 (𝑝)
assume that the transmission trials are independent. 0.100

Let X = the number of bits transmitted until the first 0.090

0.080
error. 0.070

0.060

Outcomes X …. p(X=x) f(x)

f(x)
0.050

E 1 0.1 0.090 0.040

OE 2 (0.9)(0.1) 0.081 0.030

0.020
OOE 3 (0.9)(0.9)(0.1) 0.073 0.010

0.000
OOOE 4 (0.9)^3(0.1) 0.066 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
number of bits transmitted until error, X
OOOOE 5 (0.9)^4(0.1) 0.059
Probability distribution of the number of bits transmitted until
OOOOOE 6 (0.9)^6(0.1) 0.053
the first error.
University of Santo Tomas
20
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
Outcomes …. X …. x-1Cr-1 (1-p)^(x-r) p^r f(x)
NEGATIVE BINOMIAL DISTRIBUTION
EEEE 4 1 1.000 0.0001 0.0001
OEEEEE 5 4 0.900 0.0001 0.0004
Suppose the probability that a bit transmitted through a digital
EOEEOE 6 10 0.810 0.0001 0.0008
transmission channel is received in error is 0.1. Assume the OOOEEEE 7 20 0.729 0.0001 0.0015
transmissions are independent events, and let the random OOOOEEEE 8 35 0.656 0.0001 0.0023
variable X denote the number of bits transmitted until the OOOOOEEEE 9 56 0.590 0.0001 0.0033
fourth error. OOOEEEOOOE 10 84 0.531 0.0001 0.0045

Calculate the probability of X at trial 10.


0.0200
𝑓 𝑋 = 10 =? ? ?
0.0150

The probability that exactly 3 errors occur in the first 9 trials is

f(x)
0.0100

(0.1) The probability mass function of


0.0050

negative binomial variable X is 0.0000

4
8
12
16
20
24
28
32
36
40
44
48
52
56
60
64
68
72
76
80
84
88
92
96
100
104
108
𝑥−1
𝑓(𝑥) = 1 − 𝑝 𝑥−𝑟 𝑝 𝑟 number of bits transmitted until the fourth error, X

𝑟−1
University of Santo Tomas
4th error at 10th trial Faculty of Engineering || ENG2015
21
Discrete Random Variables and Probability Distributions
𝐾 𝑁−𝐾
HYPERGEOMETRIC DISTRIBUTION 𝑃(𝑥) = 𝑥 𝑛−𝑥
𝑁
Example 𝑛
A day’s production of 850 manufactured parts contains N = total number of objects
50 parts that do not conform to customer requirements. K = number of success
Two parts are selected at random, without replacement n = number of objects selected w/o replacement
from the day’s production

*Trials are not independent

University of Santo Tomas


22
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
𝐾 𝑁−𝐾
HYPERGEOMETRIC DISTRIBUTION 𝑥 𝑛−𝑥
𝑃(𝑥) = 𝑁
Example
𝑛
A batch of parts contains 100 parts from a local supplier of tubing
and 200 parts from a supplier of tubing in the next state. If four What is the probability that two or more parts in
parts are selected randomly and without replacement, what is the the sample are from the local supplier?
probability they are all from the local supplier?
*Trials are not independent
X = number of parts from local suppliers
𝑃 𝑋 = 4 = ???
0.4

0.35

0.3

0.25
f(x)

0.2

0.15

0.1

0.05

0
0 1 2 3 4
University of Santo Tomas
number of part from the local suppliers, X 23
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
GEOMETRIC DISTRIBUTION HYPERGEOMETRIC DISTRIBUTION
The probability mass function of geometric variable X is The probability mass function of
𝑓(𝑥) = 1 − 𝑝 𝑥−1 (𝑝) hypergeometric variable X is

𝐾 𝑁−𝐾
𝑥 𝑛−𝑥
𝑃(𝑥) = 𝑁
𝑛

NEGATIVE BINOMIAL DISTRIBUTION


The probability mass function of negative binomial variable X is
𝑥−1
𝑓(𝑥) = 1 − 𝑝 𝑥−𝑟 𝑝 𝑟
𝑟−1

University of Santo Tomas


24
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
Example:
POISSON DISTRIBUTION Find the probability of receiving no calls in the next hour.
λ: The mean number of successes that occur in a We know that 4 calls are received every 3 hours on average, so
specified region. we should therefore expect 4/3 calls over the next hour.
x: The actual number of successes that occur in a
specified region.
f(x; λ): The Poisson probability that exactly x successes 4
occur in a Poisson experiment, when the mean number 𝑒 −4/3 4/30
3 𝑓 0 = = 0.264
of successes is λ. 0!
Find the probability of receiving 2 calls at most in the next hour.

𝑒 −4/3 4/30 𝑒 −4/3 4/31 𝑒 −4/3 4/32


𝑓 𝑋≤2 = + +
0! 1! 2!
What is the use of the Poisson distribution? 4 16
Consider an experiment in which a measuring device
= 𝑒 −4/3 (1 + + )
3 18
(possibly human) is set up to count the number of = 0.849
occurrences of some repeating event—i.e., the number of
“hits”—over a given time interval.
University of Santo Tomas
25
Faculty of Engineering || ENG2015
Discrete Random Variables and Probability Distributions
POISSON DISTRIBUTION
Determine the probability of 10 flaws in 5 millimeters of wire.
Let X denote the number of flaws in 5 millimeters of wire.

λ = np = (5 mm)(2.3 flaws/mm) = 11.5 flaws

Example 𝑒 −11.5 11.510


For the case of the thin copper wire, suppose that the
𝑓 𝑋 = 10 = = 0.113
10!
number of flaws follows a Poisson distribution with a
mean of 2.3 flaws per millimeter. Determine the Determine the probability of at least 1 flaw in 2 millimeters of
probability of exactly 2 flaws in 1 millimeter of wire. wire. Let X denote the number of flaws in 2 millimeters of wire.

λ = np = (2 mm)(2.3 flaws/mm) = 4.6flaws


λ = np = (1 mm)(2.3 flaws/mm) = 2.3 flaws
𝑓(X≥1) = 1 − 𝑓(𝑋 = 0)
𝑒 −2.3 2.32 = 1 − 𝑒 −4.6
𝑓 𝑋=2 = = 0.265 = 0.9899
2! University of Santo Tomas
26
Faculty of Engineering || ENG2015

You might also like