Professional Documents
Culture Documents
Engineering Analysis &
Statistics
Lect. # 8, 9
Introduction to Probability
Dr. Nazeer Ahmad Anjum
Mechanical Engineering Program
Engineering University Taxila
QUESTION # 2 2
Fuel Economy (km/litter)
Fuel No. Mercedes Toyota Honda Mehran
1 24.8 24.5 19.6 41.7
2 24.7 25.2 20.0 42.2
3 24.9 27.4 19.3 41.7
4 23.9 23.3 19.1 39.3
5 24.9 25.0 19.7 42.8
6 24.9 24.7 20.1 42.4
7 24.9 23.2 17.8 24.4
8 24.5 24.9 19.6 40.6
Avg 24.7 24.8 19.4 39.4
Median 24.8 24.8 19.6 41.7
S. D 0.3 1.3 0.7 6.2
Variance 0.09 1.69 .49 38.44
Qrt1 24.6 23.9 19.2 40.0
Qrt3 24.9 25.1 19.8 42.3
1/15/2019
Introduction to Probability 4
Definitions
• Probability is the possibility that an event
occur.
• If we repeat many times an experiment, when
obtained expected result, it is divided
between number of experiments to know the
probability.
• If a result is sure to occur, The probability will
be 1 (100%).
• If an event is sure that does not occur, The
probability will be 0.
1/15/2019
Why Learn Probability? 5
• Nothing in life is certain. In everything we do, we
gauge the chances of successful outcomes,
from business to medicine to the weather
• A probability provides a quantitative description
of the chances or likelihoods associated with
various outcomes
• It provides a bridge between descriptive and
inferential statistics
Probability
Population Sample
Statistics
1/15/2019
1/15/2019
Introduction to Probability 7
Examples
• If we throw a coin in the air once, the
probability to obtain face is ½, because only
we can obtain face or cross.
• If we throw a dice once, the probability to
obtain a 4 is 4/6, because there are 6 sides in
the dice.
• If we have a box with 100 balls: 5 blue, 5
green, 10 orange, 10 yellow, 20 red, 20 white
and 30 brown, the higher probability is to
obtain a brown ball, 30/100 = 0.3 = 30%.
1/15/2019
Introduction to Probability 8
The Probability of an event A:
Number of outcomes favorable to A
P( A)
Total number of possible outcomes
Counting Rules,
Combinations, and
Permutations
1/15/2019
Example 10
The sample space of throwing a pair of dice is
1/15/2019
How do we Describe Probability?11
1/15/2019
Counting 12
Any activity with an unpredictable results is called an
experiment.
The results of an experiment are called outcomes and
the set of all possible outcomes is the sample space.
The number of outcomes in the sample space S is n(S).
Examples: Identify the sample space.
Flip two coins Get at least one head {HH, HT, TH} 3
Copyright © by Houghton Mifflin
Company, Inc. All rights reserved.
1/15/2019
1/15/2019
Counting Rule for Multiple-step experiments 15
Example 1: Two coins are tossed. What is the probability
that at least one head comes up?
S = {HH, HT, TH, TT} E = {HH, HT, TH}
n( E ) 3
P( E )
n( S ) 4
Example 2: A card is drawn at random from a standard
deck of 52 cards. What is the probability the
card drawn is a face card?
S = all 52 cards in the deck n(S) = 52
E = {J, J, J, J, Q, Q, Q, Q, K, K, K, K}
n(E) = 12 n( E ) 12 3
P( E )
n( S ) 52 13
1/15/2019
1/15/2019
Counting Rule for Multiple-step Experiments 17
If an experiment can be described as a sequence of k
steps with n1 possible outcomes on the first step, n2
possible outcomes on the second step, and so on, then the
total number of experimental outcomes is given by (n1)
(n2)...(nk).
(n1 = 2) and then tossing the other coin (n2 = 2), according
to the counting rule: (2)(2) = 4 distinct experimental
outcomes are possible.
As S {(H, H),(H, T), (T, H), (T, T)}.
The number of experimental outcomes in an experiment
involving tossing six coins is = (2)(2)(2)(2)(2)(2) = 64.
1/15/2019
1/15/2019
19
Experiments, Counting Rules and Assigning Probabilities
1/15/2019
Examples 20
Example: Toss three coins. The total number of
simple events is: 222=8
Example: Toss two dice. The total number of
simple events is: 6 6 = 36
Example: Toss three dice. The total number of
simple events is: 6 6 6 = 216
1/15/2019
Counting Rule for Multiple-step 21
Experiments
Example:- analysis of a capacity expansion project for Kot Addu
Power Company (KAPCO).
Objective: Designing a project to increase the power generating
capacity.
Procedure: The project is divided into two sequential stages or
steps: stage 1 (design) and stage 2 (construction).
Problems:- Even though each stage will be scheduled and controlled
as closely as possible, management cannot predict beforehand the
exact time required to complete each stage of the project.
An analysis of similar construction projects revealed possible
completion times for the design stage of 2, 3, or 4 months and
possible completion times for the construction stage of 6, 7, or 8
months.
In addition, because of the critical need for additional electrical power,
management set a goal of 10 months for the completion of the
entire project.
1/15/2019
1/15/2019
Experimental outcomes (sample points)
23
for the KAPCO project
Completion Time (months) Notation for Total Project
Experimental Completion
Stage 1 Stage 2
Outcome Time (months)
Design Construction
2 6 (2,6) 8
2 7 (2,7) 9
2 8 (2,8) 10
3 6 (3,6) 9
3 7 (3,7) 10
3 8 (3,8) 11
4 6 (4,6) 10
4 7 (4,7) 11
4 8 (4,8) 12
1/15/2019
1/15/2019
Combinations 25
• The number of distinct combinations of n
distinct objects that can be formed, taking
them r at a time is n!
n
Cr
r! (n r )!
Example: Three members of a 5‐person committee must
be chosen to form a subcommittee. How many different
subcommittees could be formed?
5! 5(4)(3)(2)1 5(4)
The order of C35 10
the choice is 3!(5 3)! 3(2)(1)(2)1 (2)1
not important!
1/15/2019
Example of Combinations 26
Consider that a lottery system uses the random
selection of six integers from a group of 53 to
determine the weekly winner.
n!
C rn
r! (n r )!
1/15/2019
m
m m
Example of Combinations 27
m mm
Example of Combinations 28
A deck of cards consists of 52 cards, 13 "kinds"
each of four suits (spades, hearts, diamonds, and
clubs). The 13 kinds are Ace (A), 2, 3, 4, 5, 6, 7, 8,
9, 10, Jack (J), Queen (Q), King (K). In many poker
games, each player is dealt five cards from a well
shuffled deck.
52! 52(51)(50)(49)48
There are C 552 2,598,960
5!(52 5)! 5(4)(3)(2)1
possible hands
1/15/2019
Example of Combinations 29
Four of a kind: 4 of the 52 cards are the same
“kind”. What is the probability of getting four
of a kind in a five card hand?
There are 13 possible choices for the kind of
which to have four, and 52‐4=48 choices for
the fifth card. Once the kind has been
specified, the four are completely
determined: you need all four cards of that
kind. Thus there are 13×48=624 ways to get
four of a kind.
The probability=624/2598960=.000240096
and
1/15/2019
Example of Combinations 30
There are 12 kinds remaining from which to
select the other three cards in the hand. We
must insist that the kinds be different from
each other and from the kind of which we
have a pair, or we could end up with a second
pair, three or four of a kind, or a full house.
1/15/2019
Example of Combinations 32
Example of Combinations 34
Then, the second step is to select the remaining four parts
from the 47 acceptable parts in the bin. The second step
can be completed in
The probability is
1/15/2019
Permutations 35
• The number of ways you can arrange
n distinct objects, taking them r at a time is
n!
Prn
(n r )!
where n! n(n 1)(n 2)...(2)(1) and 0! 1.
Example: How many 3‐digit lock combinations
can we make from the numbers 1, 2, 3, and 4?
Examples 36
A lock consists of five parts and can be assembled in
any order. A quality control engineer wants to test each
order for efficiency of assembly. How many orders are
there?
The order of the choice is
important!
5!
P55 5(4)(3)(2)(1) 120
0!
1/15/2019
Examples 37
5! 5! 5(4)(3)(2)(1) 120
P25 20
(5 2)! 3! (3)(2)(1) 6
1/15/2019
38
Differentiate blw Combination & Permutation
Permutation Combination
Refers to the different ways Refers to several ways of
of arranging a set of objects choosing items from a large
in a sequential order. set of objects, such that their
order does not matters
Relevant Irrelevant
Arrangement Selection
Ordered elements Unordered sets
How many different How many different groups
arrangement can be can be chosen from a larger
created from a given set of group of objects?
objects?
Multiple permutation from Single combination from a
a single combination. single permutation.
1/15/2019
39
Differentiate blw Combination & Permutation
Permutation Combination
We define permutation as The combination is defined as
different ways of arranging the different ways, of selecting a
some or all the members of a group, by taking some or all the
set in a specific order. It members of a set, without the
implies all the possible following order.
arrangement or rearrangement For example, All possible
of the given set, into combinations chosen with letter
distinguishable order. m, n, o:
For example, All possible •When three out of three letters
permutation created with are to be selected, then the only
letters x, y, z:s combination is mno
•By taking all three at a time •When two out of three letters
are xyz, xzy, yxz, yzx, zxy, zyx. are to be selected, then the
•By taking two at a time are xy, possible combinations are mn,
xz, yx, yz, zx, zy. no, om.
1/15/2019
40
Differentiate b/w Combination & Permutation
Key Differences Between Permutation and
Combination
1. The term permutation refers to several ways of arranging a set of objects in a
sequential order. Combination implies several ways of choosing items from a large
pool of objects, such that their order is irrelevant.
2. The primary distinguishing point between these two mathematical concepts is
order, placement, and position, i.e. in permutation characteristics mentioned
above does matter, which does not matter in the case of the combination.
3. Permutation denotes several ways to arrange things, people, digits, alphabets,
colours, etc. On the other hand, combination indicates different ways of selecting
menu items, food, clothes, subjects, etc.
4. The permutation is nothing but an ordered combination while Combination
implies unordered sets or pairing of values within specific criteria.
5. Many permutations can be derived from a single combination. Conversely, only a
single combination can be obtained from a single permutation.
6. Permutation answers How many different arrangements can be created from a
given set of objects? As opposed to the combination which explains How many
different groups can be picked from a larger group of objects?
1/15/2019
41
Differentiate b/w Combination & Permutation
Example
Suppose, there is a situation where you have to find out
the total number of possible samples of two out of three
objects A, B, C. In this question, first of all, you need to
understand, whether the question is related to permutation
or combination and the only way to find this out is to check
whether the order is important or not.
If the order is significant, then the question is related to
permutation, and possible samples will be, AB, BA, BC,
CB, AC, CA. Where, AB is different from BA, BC is different
from CB and AC is different CA.
If the order is irrelevant, then the question is related to the
combination, and the possible samples will be AB, BC and
CA.
1/15/2019
42
Differentiate b/w Combination & Permutation
Conclusion
With the above discussion, it is clear that permutation and
combination are different terms, which are used in
mathematics, statistics, research and our day to day life. A
point to remember, regarding these two concepts is that,
for a given set of objects, permutation will always be
higher than its combination
1/15/2019
Assigning Probabilities 43
There are three approaches used for assigning
probability. Most frequently used are the classical,
relative frequency, and subjective methods.
Regardless of the method used, two basic
requirements for assigning probabilities must be met.
1. The probability assigned to each experimental
outcome must be between 0 and 1, inclusively. If we
let Ei denote the ith experimental outcome and P(Ei)
its probability, then this requirement can be written as
𝒊 ‐‐‐‐‐‐‐‐‐ (1)
2. The sum of the probabilities for all the experimental
outcomes must equal 1.0. For n experimental
outcomes, this requirement can be written as
𝟏 𝟐 𝒏 ‐‐‐‐‐‐‐ (2)
1/15/2019
Example of Combinations 44
1. A printed circuit board has eight different locations in
which a component can be placed. If five identical
components are to be placed on the board, how many
different designs are possible?
The probability is
1/15/2019
Examples Permutations 46
Consider a machining operation in which a piece of
sheet metal needs two identical diameter holes drilled
and two identical size notches cut. We denote a drilling
operation as d and a notching operation as n.
Determining possible sequences of the four operations.
The six sequences are easily summarized:
ddnn, dndn, dnnd, nddn, ndnd, nndd.
1/15/2019
Classical Method of Assigning 47
Probabilities
It is an appropriate method for assigning probabilities
when all the experimental outcomes are equally likely. If
n experimental outcomes are possible, a probability of
1/n is assigned to each experimental outcome. When
using this approach, the two basic requirements for
assigning probabilities are automatically satisfied.
Example:- Tossing a fair coin; the two experimental
outcomes—head and tail—are equally likely.
The probability of observing a head is 1/2, or .50.
Similarly, the probability of observing a tail is also 1/2, or
.50.
1/15/2019
1/15/2019
1/15/2019
Subjective Method of Assigning 53
Probabilities
In such cases, the best probability estimates often
are obtained by combining the estimates from the
classical or relative frequency approach with
subjective probability estimates.
1/15/2019
1/15/2019
Self Assessment 56
Driver using seat
Problem # 2: The National Highway Traffic belt?
Safety Administration (NHTSA) conducted a Region Yes No
survey to learn about how drivers throughout PWR 148 52
the Pakistan are using seat belts in August 25,
ISD 296 4
2016. Sample data consistent with the NHTSA
LHR 162 54
survey are as shown in table.
FD 252 48
a. For the Pakistan, what is the probability that
Total 858 228
a driver is using a seat belt?
b. The seat belt usage probability for a Pakistani driver a year earlier was 0.75.
NHTSA chief Mr. Bhatti had hoped for a 0.78 probability in 2016. Would he have
been pleased with the 2017 survey results?
c. What is the probability of seat belt usage by region of the country? What region
has the highest seat belt usage?
d. What proportion of the drivers in the sample came from each region of the
country? What region had the most drivers selected? What region had the second
most drivers selected?
e. Assuming the total number of drivers in each region is the same, do you see any
reason why the probability estimate in part (a) might be too high? Explain.
1/15/2019
Events and Their Probabilities 57
EVENT: An event is a collection of sample points.
For example, let us consider the KAPCO project and assume
that the project manager is interested in the event that the
entire project can be completed in 10 months or less.
Referring to Table A, we see that six sample points; (2, 6), (2,
7), (2, 8), (3, 6), (3, 7), and (4, 6); provide a project
completion time of 10 months or less.
Let C denote the event that the project is completed in 10
months or less; we write
C = {(2, 6), (2, 7), (2, 8), (3, 6), (3, 7), (4, 6)
Event C is said to occur if any one of these six sample
points appears as the experimental outcome.
L =The event that the project is completed in less than 10
months
M = The event that the project is completed in more than 10
months 1/15/2019
Example Problems 60
One bag contains 4 white balls and 2 black balls; another
contains 3 white and 5 black. If one ball is drawn from each
bag, find the probability that (a) both are white; (b) both are
black; (c) one is white and one is black.
Answer: (a) 4/6*3/8 = 1/4;
(b) 2/6*5/8=5/24;
(c) (4/6)(5/8)+(2/6)(3/8)= 13/24
1/15/2019
Example Problems 61
A machine produces a total of 12,000 bolts a day, which are on
average 3% defective. Find the probability that out of 600 bolts
chosen at random, 12 will be defective.
Solution, Of 12000 bolts, 360 are defective and 11640 are
not.
P= C11640,588 C360,12 /C12000,600 = 0.0347277
Some comments: This problem caused some controversy.
Some of you suggested that the probability of finding a
defective bolt is 0.03. Then the probability could be estimated
through the Binomial distribution
p(12 out of 600) = C600,12 0.03120.97588~0.036 (Eq. 2). This is
very close indeed to the result of Eq. 1. May be this tiny
difference is just a result of an error?
To demonstrate that this is not true, we consider a simpler
example. Suppose that there are 10 balls, 6 are black and 4
are white. What is the probability that of 4 balls chosen at
random, 2 are white. 1/15/2019
Example Problems 62
The conventional solution is p= C4,2C6,2/C6,4=0.429.
We can also use a Binomial formula assuming that the
probabilities are 3/5 and 2/5:
p = C4,2(2/5)2(3/5)2= 0.346.
This time the difference is significant. In addition, we can now
understand the source of the problem, The Binomial distribution
can be used only when the probabilities of two outcomes do
not depend on the number of previous trials. This condition is
not fulfilled in our example. The probability of choosing a white
ball depends on the outcomes of previous selections.
The same is true for the “bolts” problem, although the
differences are much less significant.
1/15/2019
Random Variables 63
• A quantitative variable x is a random variable if
the value that it assumes, corresponding to the
outcome of an experiment is a chance or
random event.
• Random variables can be discrete or continuous.
• Examples:
x = SAT score for a randomly selected student
x = number of people in a room at a randomly
selected time of day
x = number on the upper face of a randomly
tossed die
1/15/2019
Introduction 64
1/15/2019
Continuous Random Variables 65
A random variable is continuous if it can
assume the infinitely many values
corresponding to points on a line interval.
Examples:
Heights, weights
length of life of a particular product
experimental laboratory error
Blood pressure
the speed of a car
the real numbers from 1 to 6.
1/15/2019
We must have
0 p ( x) 1 and p ( x) 1
1/15/2019
Example 67
Toss a fair coin three times and define x
= number of heads.
x
HHH x p(x)
1/8 3 P(x = 0) = 1/8 0 1/8
HHT
1/8 2 P(x = 1) = 3/8 1 3/8
HTH P(x = 2) = 3/8
1/8 2 2 3/8
THH
P(x = 3) = 1/8
3 1/8
1/8 2
HTT
1/8 1 Probability
THT Histogram for x
1/8 1
TTH 1/8 1
TTT 1/8 0
1/15/2019
Example 68
Toss two dice and define
x = sum of two dice
x p(x)
2 1/36
3 2/36
4 3/36
5 4/36
6 5/36
7 6/36
8 5/36
9 4/36
10 3/36
11 2/36
12 1/36
1/15/2019
Probability Distributions 69
Probability distributions can be used to describe
the population, just as we described samples in
our previous lectures.
– Shape: Symmetric, skewed, mound‐shaped…
– Outliers: unusual or unlikely measurements
– Center and spread: mean and standard
deviation. A population mean is called and a
population standard deviation is called
1/15/2019
The Mean 70
and Standard Deviation
Let x be a discrete random variable with
probability distribution p(x). Then the
mean, variance and standard deviation of x
are given as
Mean : xp( x)
Variance : 2 ( x ) 2 p ( x)
Standard deviation : 2
1/15/2019
Example 71
Toss a fair coin 3 times and record x
the number of heads.
Example 72
The probability distribution for x the
number of heads in tossing 3 fair
coins.
Symmetric;
• Shape? mound-shaped
• Outliers? None
• Center? = 1.5
• Spread? = .688
1/15/2019
Example Problems 73
1. A and B play a game in which they alternately toss a pair of dice.
The one who is first to get a total of 7 wins the game. Find the
probability that (a) one who tosses first will win the game; (b) one
who tosses second will win the game. Hint: Reminder: Infinite
Geometric Progression
2. The probabilities that a husband and wife will be alive 30 years
from now are given by 0.7 and 0.8 respectively. Find the
probability that in 20 years (a) both (b) neither (c) at least one, will
be alive.
3. Four different mathematics books, six different physics books, and
two different chemistry books are to be arranged on a shelf. How
many different arrangements are possible if (a) the books in each
particular subject must all stand together. (b) only the mathematics
books must stand together
1/15/2019
Example Problems 74
4. a) Find the probability of getting the sum 7 on at least one of three
tosses of a pair of fair dice. (b) How many tosses (n) is needed in
order that this probability (getting 7 in at least 1of n tosses) is
greater than 0.95.
5. The odds in favor of A winning a game of chess against B are 3:2.
If three games are to be played, what are the odds (a) in favor of A
winning at least 2 games; (b) against A of losing the first two
games to B.
6. Out of 800 families with 4 children each, how many would be
expected to (a) 2 boys and 2 girls, (b) at least 1 boy (c) no girls (d)
at most 2 girls.
7. A pair of dice is tossed repeatedly. (a) Find the probability that the
sum of 11 occurs for the first time on the 6-th toss.
8. Find the probability of scoring a total of 7 points (a) once, (b) at
least once, (c) twice, in two tosses of a pair of dice.
9. A box contains 9 tickets numbered from 1 to 9, inclusive. If 3
tickets are drawn from the box 1 at a time, find the probability that
they are alternatively either odd-even-odd or even-odd even.
1/15/2019
Example Problems 75
10. Three cards are drawn from an ordinary deck of 52 cards. Find the
probability that (a) all cards are of the same suit (b) at least two
aces are drawn.
11. 15 students are evenly distributed among three groups. If three of
them are siblings, (a) what is the probability that all three are in the
same group? (b) What is the probability that each group gets one.
12. A marble is drawn at random from a box containing 10 red, 30
white, 20 blue and 15 orange marbles. Find a probability that it is
(a) orange or red (b) nor red or blue.
13. Two marbles are drawn at random with replacement from a box
containing 10 red, 30 white, 20 blue and 15 orange marbles.
Find a probability that (a) the first is blue and the second is orange
(b) they are either red or white or both (red and white). Hint: "both"
consists of 2 outcomes, depending on the order.
14. A batch of 500 machined parts contains 10 that do not conform to
customer requirements. The random variable is the number of
parts in a sample of 5 parts that do not conform to customer
requirements. Determine the range (possible values) of the
random variable.
1/15/2019
Example Problems 76
15. A batch of 500 machined parts contains 10 that do not conform to
customer requirements. Parts are selected successively, without
replacement, until a nonconforming part is obtained. The random
variable is the number of parts selected. Determine the range
(possible values) of the random variable.
16. Wood paneling can be ordered in thicknesses of 1/8, 1/4, or 3/8
inch. The random variable is the total thickness of paneling in two
orders. Determine the range (possible values) of the random
variable.
17. 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?
1/15/2019