Topic5 IntroductionToProbabilityForEngineering
Topic5 IntroductionToProbabilityForEngineering
INTRODUCTION
TO
PROBABILITY
1
§ 3.1
Basic Concepts of
Probability
Magu Wa Thiong'o
Probability Experiments
3
Events
Example:
A die is rolled. Event A is rolling an even number.
This is not a simple event because the outcomes of
event A are {2, 4, 6}.
Magu Wa Thiong'o
4
PROBABILITY AXIOMS
(KOLGOMOROV AXIOMS)
Magu Wa Thiong'o
5
Exercise
6
TYPES OF PROBABILITY
1. Classical probability
2. Empirical probability
3. Subjective probability
7
Classical Probability
Classical (or theoretical) probability is used when each
outcome in a sample space is equally likely to occur. The
classical probability for event E is given by
Number of outcomes in event
P (E ) .
Total number of outcomes in sample space
Example:
A die is rolled.
Find the probability of Event A: rolling a 5.
8
Empirical Probability
Empirical (or statistical) probability is based on observations
obtained from probability experiments. The empirical
frequency of an event E is the relative frequency of event E.
P (E ) Frequency of Event E
Total frequency
f
n
Example:
A travel agent determines that in every 50 reservations
she makes, 12 will be for a cruise.
What is the probability that the next reservation she
makes will be for a cruise?
12
P(cruise) = 0.24
Magu Wa Thiong'o
50
9
Subjective Probability
Subjective probability results from intuition, educated
guesses, and estimates.
Example:
A business analyst predicts that the probability of a
certain union going on strike is 0.15.
Example:
The following frequency distribution represents the ages
of 30 students in a statistics class. What is the
probability that a student is between 26 and 33 years old?
Ages Frequency, f
18 – 25 13 P (age 26 to 33) 8
30
26 – 33 8
0.267
34 – 41 4 This is the relative frequency.
42 – 49 3
50 – 57 2
Magu Wa Thiong'o
f 30
11
Complementary Events
Example:
There are 5 red chips, 4 blue chips, and 6 white chips in
a basket. Find the probability of randomly selecting a
chip that is not blue.
4
P (selecting a blue chip) 0.267
15
4 11
P (not selecting a blue chip) 1 0.733
Magu Wa Thiong'o 15 15
12
8.2
Conditional Probability and
the Multiplication Rule
Magu Wa Thiong'o
Conditional Probability
Example:
There are 5 red chip, 4 blue chips, and 6 white chips in a
basket. Two chips are randomly selected. Find the
probability that the second chip is red given that the first
chip is blue. (Assume that the first chip is not replaced.)
Example:
100 college students were surveyed and asked how many
hours a week they spent studying. The results are in the
table below. Find the probability that a student spends more
than 10 hours studying given that the student is a male.
Less More
5 to 10 Total
then 5 than 10
Male 11 22 16 49
Female 13 24 14 51
Total 24 46 30 100
The sample space consists of the 49 male students. Of
these 49, 16 spend more than 10 hours a week studying.
16
P (more than 10 hours|male) 0.327
49
15
Independent Events
Two events are independent if the occurrence of one of the
events does not affect the probability of the other event.
Two events A and B are independent if
P (B |A) = P (B) or if P (A |B) = P (A).
Events that are not independent are dependent.
Example:
Decide if the events are independent or dependent.
Selecting a diamond from a standard deck of
cards (A), putting it back in the deck, and
then selecting a spade from the deck (B).
The occurrence of A does not
P (B A ) 13 1 and P (B ) 13 1 . affect the probability of B, so
52 4 52 4
Magu Wa Thiong'o the events are independent.
16
Multiplication Rule
The probability that two events, A and B will occur in
sequence is
P (A and B) = P (A) · P (B |A).
If event A and B are independent, then the rule can be
simplified to P (A and B) =P(AB) = P (A) · P (B).
Example:
Two cards are selected, without replacement, from a
deck. Find the probability of selecting a diamond, and
then selecting a spade.
Because the card is not replaced, the events are dependent.
P (diamond and spade) = P (diamond) · P (spade |diamond).
13 13 169
0.064
Magu Wa Thiong'o
52 51 2652
17
Multiplication Rule
Example:
A die is rolled and two coins are tossed.
Find the probability of rolling a 5, and flipping two tails.
P (rolling a 5) = 1 .
6
1
Whether or not the roll is a 5, P (Tail ) = ,
2
so the events are independent.
Magu Wa Thiong'o
Mutually Exclusive Events
A and B
A
B A B
20
Mutually Exclusive Events
Example:
Decide if the two events are mutually exclusive.
Event A: Roll a number less than 3 on a die.
Event B: Roll a 4 on a die.
A B
1
4
2
21
Mutually Exclusive Events
Example:
Decide if the two events are mutually exclusive.
Event A: Select a Jack from a deck of cards.
Event B: Select a heart from a deck of cards.
A J 9 2 B
3 10
J J A 7
K 4
J 5
6Q8
22
The Addition Rule
Example:
A card is randomly selected from a deck of cards. Find the
probability that the card is a Jack or the card is a heart.
The events are not mutually exclusive because the
Jack of hearts can occur in both events.
24
The Addition Rule
Example:
100 college students were surveyed and asked how many
hours a week they spent studying. The results are in the
table below. Find the probability that a student spends
between 5 and 10 hours or more than 10 hours studying.
Less More
5 to 10 Total
then 5 than 10
Male 11 22 16 49
Female 13 24 14 51
Total 24 46 30 100
Magu Wa Thiong'o
Counting Principles
They include;
1.Multiplication rule.
2.Permutation.
3.Combination.
Magu Wa Thiong'o
Fundamental Counting Principle
If one event can occur in m ways and a second event can
occur in n ways, the number of ways the two events can
occur in sequence is m· n. This rule can be extended
for any number of events occurring in a sequence.
Example:
A meal consists of a main dish, a side dish, and a dessert.
How many different meals can be selected if there are 4
main dishes, 2 side dishes and 5 desserts available?
# of main # of side # of
dishes dishes desserts
4 2 5 = 40
There are 40 meals available.
28
Fundamental Counting Principle
Example:
Two coins are flipped. How many different outcomes are
there? List the sample space.
Start
1st Coin
Tossed
Heads Tails 2 ways to flip the coin
2nd Coin
Tossed
Heads Tails Heads Tails 2 ways to flip the coin
29
Fundamental Counting Principle
Example:
The access code to a house's security system consists of 5
digits. Each digit can be 0 through 9. How many different
codes are available if
a.) each digit can be repeated?
b.) each digit can only be used once and not repeated?
a.) Because each digit can be repeated, there are 10
choices for each of the 5 digits.
10 · 10 · 10 · 10 · 10 = 100,000 codes
b.) Because each digit cannot be repeated, there are 10
choices for the first digit, 9 choices left for the second
digit, 8 for the third, 7 for the fourth and 6 for the fifth.
10 · 9 · 8 · 7 · 6 = 30,240 codes
30
Permutations
Example:
How many different surveys are required to cover all
possible question arrangements if there are 7 questions in
a survey?
7! = 7 · 6 · 5 · 4 · 3 · 2 · 1 = 5040 surveys
31
Permutation of n Objects Taken r at a Time
Example:
You are required to read 5 books from a list of 8. In how
many different orders can you do so?
32
Distinguishable Permutations
Example:
Jessie wants to plant 10 plants along the sidewalk in her
front yard. She has 3 rose bushes, 4 daffodils, and 3 lilies.
In how many distinguishable ways can the plants be
arranged?
10! 10 9 8 7 6 5 4!
3!4!3! 3!4!3!
4,200 different ways to arrange the plants
33
Combination of n Objects Taken r at a Time
nC r
n! .
# in the (n r)! r !
collection
# taken from
the collection
Example:
You are required to read 5 books from a list of 8. In how
many different ways can you do so if the order doesn’t
matter? 8! = 8 7 6 5!
8C 5 =
3!5! 3!5!
Magu Wa Thiong'o = 56 combinations
34
Application of Counting Principles
Example:
In a state lottery, you must correctly select 6 numbers (in any order)
out of 44 to win the grand prize.
a.) How many ways can 6 numbers be chosen from the 44
numbers?
b.) If you purchase one lottery ticket, what is the
probability of winning the top prize?
44!
a.) C 7,059,052 combinations
44 6 6!38!
b.) There is only one winning ticket, therefore,
1
P (win) 0.00000014
7059052
Magu Wa Thiong'o
35
TYPES OF PROBABILITY
DISTRIBUTION
1. Discrete Probability distributions
2. Continuous probability distributions
36
Discrete Probability
Distributions
Random Variables
0 2 4 6 8 10
0 2 4 6 8 10
38
Random Variables
Example:
Decide if the random variable x is discrete or continuous.
a.) The distance your car travels on a tank of gas
The distance your car travels is a continuous
random variable because it is a measurement that
cannot be counted. (All measurements are
continuous random variables.)
In Words In Symbols
40
Constructing a Discrete Probability Distribution
Guidelines
Let x be a discrete random variable with possible
outcomes x1, x2, … , xn.
1. Make a frequency distribution for the possible
outcomes.
2. Find the sum of the frequencies.
3. Find the probability of each possible outcome by
dividing its frequency by the sum of the frequencies.
4. Check that each probability is between 0 and 1 and
that the sum is 1.
41
Constructing a Discrete Probability Distribution
Example:
The spinner below is divided into two sections. The
probability of landing on the 1 is 0.25. The probability of
landing on the 2 is 0.75. Let x be the number the spinner
lands on. Construct a probability distribution for the
random variable x.
1 x P (x)
1 0.25 Each probability is
2
2 0.75 between 0 and 1.
42
Constructing a Discrete Probability Distribution
Example:
The spinner below is spun two times. The probability of
landing on the 1 is 0.25. The probability of landing on the 2
is 0.75. Let x be the sum of the two spins. Construct a
probability distribution for the random variable x.
The possible sums are 2, 3, and 4.
Continued.
43
Constructing a Discrete Probability Distribution
Example continued:
P (sum of 3) = 0.25 0.75 = 0.1875
1
Spin a 1 on the “and” Spin a 2 on the second
first spin. spin.
2
“or”
P (sum of 3) = 0.75 0.25 = 0.1875
Sum of
P (x)
spins, x Spin a 2 on the “and” Spin a 1 on the second
2 0.0625 first spin. spin.
3 0.375
4 0.1875 + 0.1875 Continued.
44
Constructing a Discrete Probability Distribution
Example continued:
1
P (sum of 4) = 0.75 0.75 = 0.5625
2
Spin a 2 on the “and” Spin a 2 on the second
first spin. spin.
Sum of
P (x)
spins, x
Each probability is between 0 and 1,
2 0.0625 and the sum of the probabilities is 1.
3 0.375
4 0.5625
45
Graphing a Discrete Probability Distribution
Example:
Graph the following probability distribution using a histogram.
Sum of P(x)
Sum of Two Spins
P (x)
spins, x 0.6
2 0.0625 0.5
3 0.375
0.4
Probability
4 0.5625
0.3
0.2
0.1
0 x
2 3 4
Sum
46
Cumulative Probability Function
F(c) = P(X≤c)
In other words,
Less
on4-
47
47
The Expectation (Mean) of Discrete
Probability Distribution
The expectation or mean of a discrete random variable X, is
computed by the formula:
E(x) Σ[xP(x)]
x 1P(x1 ) x 2P(x 2 ) ... x nP(x n )
Example:
Toss 2 coins, x = # of heads, what is the expected value of
x?
P(0) = 0.25, P(1)=0.5, P(2)=0.25.
E(X) = P(0)*0 + P(1)*1 + P(2)*2 = 1
Lesson4-48
48
Expectation of a general functions of random
variables
Less
on4-
49
49
Expectation of a general functions of random
variables
X-value Probability
Experiment: Toss 2 Coins.
0 1/4 =0.25
Let X = # heads.
1 1/2 =0.5
g(x) = x2
2 1/4 =0.25
Less
on4-
50
50
The Expectation, Variance and
standard deviation of d.r.v
Lesson4-51
51
The Expectation, Variance and standard
deviation of d.r.v
Magu Wa Thiong'o
52
Example
53
Expected Value
Example continued:
At a raffle, 500 tickets are sold for $1 each for two prizes of
$100 and $50. What is the expected value of your gain?
54
Finding Probabilities
Example:
The following probability distribution represents the probability of
selecting 0, 1, 2, 3, or 4 red chips when 4 chips are selected.
x P (x) a.) Find the probability of selecting no
0 0.24 more than 3 red chips.
1 0.412
2 0.265
3 0.076 b.) Find the probability of selecting at
4 0.008 least 1 red chip.
a.) P (no more than 3) = P (x 3) = P (0) + P (1) + P (2) + P (3)
= 0.24 + 0.412 + 0.265 + 0.076 = 0.993
b.) P (at least 1) = P (x 1) = 1 – P (0) = 1 – 0.24 = 0.76
Complement
55
Example 1: Tossing coin(s)
Discrete Probability Distribution
Experiment: Toss 1 Coin. Let X = # heads.
Show P(x) , i.e., P(X = x) , for all values of x:
0.4
0.3
0.2
0.1
0 Less
0 on4-
1
56
56
Example 1: Tossing coin(s)
Discrete Probability Distribution
0.5
H T 0.4
0.3
0.2
H H 0.1 Less
on4-
0 57
0 1 2
57
Example 1: Tossing coin(s)
Discrete Probability Distribution
Consider a random experiment in which a coin is tossed three times. Let
x be the number of heads. Let H represent the outcome of a head and
T the outcome of a tail.
Lesson4-58
58
Features of a Univariate Discrete Distribution
event Prob.
1 or 2 0.6
2 or 3 0.3
3 or 1 0.1 Less
on4-
60
60
Variance of a linear transformed random
variable
Var(a bX ) E[ a bX (a bμ ) ]2
E[ bX bμ ]2
E[ b(X μ) ]2
E[ b 2 (X μ) 2 ]
b 2 E[ (X μ) 2 ]
b 2 Var(X)
Less
on4-
61
61
Example
A die is tossed once. A random
variable X is the number that shows
on top of the die. If the die has 6
sides labelled 1,2,3,4,5,6 answer the
following determine;
a. Probability distribution of (X)
b. E(x)
c. S.d x
Magu Wa Thiong'o
62
Example Solution A die is tossed once. A random variable X is the number
that shows on top of the die. If the die has 6 sides labelled 1,2,3,4,5,6
answer the following determine;
X=xi 1 2 3 4 5 6
Magu Wa Thiong'o
63
Example Solution A die is tossed once. A random variable X is the number
that shows on top of the die. If the die has 6 sides labelled 1,2,3,4,5,6
answer the following determine;
Magu Wa Thiong'o
64
EXAMPLE
Magu Wa Thiong'o
65
Solution: A random variable X is obtained as the sum of the number
that show up when
Dietwo
2 dice are tossed simultaneously .
1 2 3 4 5 6
1 2 3 4 5 6 7
2 3 4 5 6 7 8
(X=x)= {2,3,4,4,5,6,7,8,9,10,11,12}
Die 1
X=x 2 3 4 5 6 7 8 9 10 11 12
P(X=x)
Magu Wa Thiong'o
66
Solution: A random variable X is obtained as the sum of the number that
xi
2
P(xi) xip(xi)
show up when two dice are tossed simultaneously
4
.
3 9
4 16
5 25
6 36
7 44
8 64
9 81
10 100
11 121
12 144
Total Total
Magu Wa Thiong'o
67
Exercise q1
Magu Wa Thiong'o
68
Exercise q2
Magu Wa Thiong'o
69
Continuous Random Variables
A continuous random variable takes all real number value between a given set
of numbers.
Magu Wa Thiongo 70
70
Continuous Density Functions pdf
A function that define probabilities of a c.r.v is called probability density
function (p.d.f)
Density functions, in contrast to mass functions, distribute
probability continuously along an interval.
The loading on the beam between points a & b is the integral of
the function between points a & b.
71
A probability density function f(x) describes the
probability distribution of a continuous random
variable. It is analogous to the beam loading.
Figure 4-2 Probability is determined from the area under f(x) from a to b.
Magu Wa Thiongo 72
72
Properties of Probability Density Function
For a continuous random variable X ,
a probability density function is a function such that
b
(3) P a X b f x dx area under f x dx from a to b
a
Magu Wa Thiongo 73
73
Histograms
A histogram is graphical display of data showing a series of adjacent
rectangles. Each rectangle has a base which represents an interval of
data values. The height of the rectangle creates an area which
represents the relative frequency associated with the values included
in the base.
74
Area of a Point
If X is a continuous random variable, for any x1 and x2 ,
P x1 X x2 P x1 X x2 P x1 X x2 P x1 X x2 (4-2)
which implies that P X x 0.
Magu Wa Thiongo 75
75
THE EXPECTATION AND VARIANCE OF
C.R.V
Magu Wa Thiong'o 76
76
SUMMARY FOR GENERAL PROPERTIES OF
PROBABILITY DISTRIBUTIONS
The table below shows the summary for general properties of the fu.
Distribution
function (F)
Magu Wa Thiong'o 77
77
Example 4-1: Electric Current
Let the continuous random variable X denote the
current measured in a thin copper wire in
milliamperes (mA). Assume that the range of X is 0
≤ x ≤ 20 and f(x) = 0.05. What is the probability
that a current is less than 10mA?
Answer:
10
P X 10 0.5dx 0.5
0
Another example,
20
P 5 X 20 0.5dx 0.75 Figure 4-4 P(X < 10) illustrated.
5
Magu Wa Thiongo 78
78
Example 4-2: Hole Diameter
Let the continuous random variable X denote the diameter of a
hole drilled in a sheet metal component. The target
diameter is 12.5 mm. Random disturbances to the process
result in larger diameters. Historical data shows that the
distribution of X can be modeled by f(x)= 20e-20(x-12.5), x ≥
12.5 mm. If a part with a diameter larger than 12.60 mm is
scrapped, what proportion of parts is scrapped?
Answer:
Figure 4-5 P X 12.60
20 x 12.5
Magu Wa Thiongo
12.6
20e dx 0.135
79
79
Cumulative Distribution Functions CDF
F(x)
The cumulative distribution function
of a continuous random variable X is,
x
F x P X x f u du for x (4-3)
Magu Wa Thiongo 80
80
Relationship between probability function
f(x) and distribution function F(x)
Magu Wa Thiong'o 81
81
Properties of Distribution Function F(X).
Magu Wa Thiong'o 82
82
Measures of location using F
Magu Wa Thiong'o 83
83
Example
Magu Wa Thiong'o 84
84
Magu Wa Thiong'o 85
85
Example
Magu Wa Thiong'o 86
86
Magu Wa Thiong'o 87
87
Magu Wa Thiong'o 88
88
Magu Wa Thiong'o 89
89
Magu Wa Thiong'o 90
90
f. Variance
Magu Wa Thiong'o 91
91
Type of continuous probability
distribution function
They include
i. Uniform
ii. Exponential
iii. Normal
iv. Gamma
v. Beta
vi. Waibull
Magu Wa Thiong'o 92
92
Exercise
Magu Wa Thiong'o 93
93
Exercise
Magu Wa Thiong'o 94
94
Exercise
95
Example 4-3: Electric Current
For the copper wire current measurement in Exercise 4-1, the cumulative
distribution function (CDF) consists of three expressions to cover the
entire real number line.
0 x <0
F (x ) = 0.05x 0 ≤ x ≤ 20
1 20 < x
96
Example 4-4: Hole Diameter
For the drilling operation in Example 4-2, F(x)
consists of two expressions. This shows the proper
notation.
F x 0 for x 12.5
x
F x
20 u 12.5
12.5
20e du
20 x 12.5
1 e for x 12.5
Magu Wa Thiongo 97
97
Density vs. Cumulative Functions
dF x
Given F x , f x as long as the derivative exists.
dx
Magu Wa Thiongo 98
98
Concept of Joint Probabilities
magu wa Thiong'o 99
99
Example 5-1: Signal Bars
You use your cell phone to check your airline reservation. The airline
system requires that you speak the name of your departure city to the
voice recognition system.
Let Y denote the number of times that you have to state your
departure city.
Let X denote the number of bars of signal strength on you cell
phone.
1 2 3 Bar Chart of
10.00 20.00 25.00 Number of Repeats vs. Cell
Phone Bars
20.00 30.00 20.00
20.00 10.00 5.00
0.25
15.00 10.00 5.00
0.20
Probability
0.15
0.10
4 Times
0.05 3 Times
Figure 5-1 Joint probability Twice
0.00
distribution of X and Y. The table cells 1
2
Once
3
are the probabilities. Observe that
Cell Phone Bars
more bars relate to less repeating.
magu wa Thiong'o 100
100
Example 5-1: Signal Bars
You use your cell phone to check your airline reservation. The airline
system requires that you speak the name of your departure city to the
voice recognition system.
Let Y denote the number of times that you have to state your
departure city.
Let X denote the number of bars of signal strength on you cell
phone.
Probability
3 0.02 0.10 0.05 0.15
4 0.15 0.10 0.05 0.10
4 Times
0.05 3 Times
Figure 5-1 Joint probability Twice
0.00
distribution of X and Y. The table cells 1
2
Once
3
are the probabilities. Observe that
Cell Phone Bars
more bars relate to less repeating.
magu wa Thiong'o 101
101
Joint Probability Mass Function Defined And properties
(2) f x, y 1
x y
XY The sum of all probabilities is 1
(3) f XY x, y P X x, Y y (5-1)
102
Marginal Probability Distributions (discrete)
For a discrete joint PDF, there are marginal distributions for
each random variable, formed by summing the joint PMF
over the other variable.
Figure 5-6 From the prior example, the joint PMF is shown in
YELLOW while the two marginal PMFs are shown in PINK.
magu wa Thiong'o 103
103
Marginal Probability Distributions
(continuous)
Rather than summing a discrete joint PMF, we integrate a continuous joint
PDF.
The marginal PDFs are used to make probability statements about one
variable.
If the joint probability density function of random variables X and Y is
fXY(x,y), the marginal probability density functions of X and Y are:
f X x f XY x, y dy
y
fY y f XY x, y dx (5-3)
magu wa Thiong'o
x 104
104
Exercise
a. Use the reference book Introduction to probability and
statistics by Richard L. Scheafer
Questions
Supplementary Exercise 6.75-6.90(Hint: consider to review
exercise 6.0-6.75 before attempting this task)
105