3 Probability
3 Probability
MATH142-3
Engineering Data Analysis
Course Outcome
Compute the probability distribution of a random variable for
both discrete and continuous data.
Learning Objectives
• At the end of the lesson, the• Identify various ways of
students are expected to solving for the probability of
• Define probability; and an event;
• Relate counting techniques to• Differentiate discrete and
real life situations. continuous random variables;
and
• Compute for the probability of
an event; • Classify variables according to
scales of measurement.
Probability
• A tool to relate the descriptive statistics to Sample Space
inferential statistics • The set of all possible outcomes of a random
• Ratio of number of samples derived from the experiment
total population • Denoted as S
• Deals with counting elements
Examples:
Random Experiment • Consider the experiment of tossing a die.
• An experiment that can result in different• Sample space for the number appearing on the
outcomes, even though it is repeated in the top face:
same manner every time
S1 = {1, 2, 3, 4, 5, 6}
• Examples: • Sample space for the number appearing on the
top face whether it is even or odd:
- Measuring energy lost on a simple machine. S2 = {even, odd}
- Measuring the strength of steel.
Sample Spaces
DISCRETE SAMPLE SPACE CONTINUOUS SAMPLE SPACE
• A sample space is discrete if it consists of a • A sample space is continuous if it
finite or countable infinite set of outcomes. contains an interval (either finite or
• Examples: infinite) of real numbers.
- Sample space for the number appearing on
the top face: Example:
• S = {1, 2, 3, 4, 5, 6} - Sample space of the life in years (t) of a
certain component:
- Sample space for a thrown die until a five S = {t|t ≥ 0}
occurs:
• S = {F, NF, NNF, NNNF, …}
• where F = occurrence of 5 and N =
nonoccurrence of 5.
Event
• Subset of the sample space of a random
experiment Complement of an event
• Consider the events E1 and E2. - Set of outcomes in the sample space that
Union of two events are not in the event
- Consists of all outcomes that are contained- The complement of the event E is E′ or EC.
in either of the two events - (E′)′ = E
- Denoted by E1 ∪ E2
Mutually Exclusive Events
• Two events, denoted as E1 and E2 , such that
Intersection of two events E1 ∩ E2 = ∅
- Consists of all outcomes that are contained• Let M = {a, e, i, o, u} and N = {r, s, t}; then it
in both of the two events follows that M ∩ N = ∅. That is, M and N have
- Denoted by E1 ∩ E2 no elements in common and, therefore,
cannot occur simultaneously.
Counting Techniques
• An important part of combinatorics Multiplication Rule
(study of arrangement of objects
which is part of discrete• If an operation can be performed in n1
ways, and if for each of these a second
mathematics) operation can be performed in n2 ways,
• Methods used for counts of the then the two operations can be
numbers of outcomes in the sample performed in n1n2 ways.
space and various events for• Example:
analyzing random experiments
• How many sample points are in the
• Used for more complicated problems sample space when a pair of dice is
and more difficult sample space or an thrown once?
event
• The first die can land in any one of n1 =
6 ways. For each of these 6 ways the
second die can also land in n2 = 6 ways.
Therefore, the pair of dice can land in
• n1n2 = (6)(6) = 36 possible ways.
Generalized Multiplication Rule
• If an operation can be Example:
performed in n1 ways, and if for • Sam is going to assemble a
each of these a second computer by himself. He has the
operation can be performed in choice of ordering chips from two
n2 ways, and for each of the brands, a hard drive from four,
first and two a third operation memory from three and an
can be performed in n3 ways, accessory bundle from five local
and so forth, then the sequence stores. How many different ways
of k operations can be can Sam order the parts?
performed in n1n2…nk ways. Since n1 = 2, n2 = 4, n3 = 3, and n4
= 5, there are
n1 × n2 × n3 × n4 = 2×4×3×5
= 120 ways.
Generalized Multiplication Rule
• 2-16/46 How many even four-digit• 2-34/28 A wireless garage door
numbers can be formed from the opener has a code determined by the
digits 0, 1, 2, 5, 6, and 9 if each digit up or down setting of 10 switches.
can be used only once? How many outcomes are in the
sample space of possible codes?
• 2-30/51 In how many different ways• 2-35/28 An order for a computer can
can a true-false test consisting of 9 specify any one of five memory sizes,
questions can be answered? any one of three types of displays,
and any one of five sizes of hard
disks, and can either include or not
include a pen tablet? How many
different systems can be ordered?
Guided Learning Activity 1
• 14/340 In a version of the computer• 15/340 Each user on a computer
language BASIC, the name of a system has a password, which is six
variable is a string of one or two to eight characters long, where each
alphanumeric characters, where character is an uppercase letter or a
uppercase and lowercase letters are digit. Each password must contain at
not distinguished. (An alphanumeric least one digit. How many possible
character is either one of the 26 passwords are there?
English letters or one of the 10
digits.) Moreover, a variable name
must begin with a letter and must be
different from the five strings of two
characters that are reserved for
programming use. How many
different variable names are there in
this version of BASIC?
Counting Techniques
An ordered sequence of the elements • The number of permutations of
Example: subsets of r elements selected from a
set of n different elements is
• Consider the three letters a, b, and c.
The possible permutations are abc,
acb, bac, bca, cab, and cba. • 𝑃𝑟𝑛 = 𝑛 × 𝑛 − 1 × 𝑛 − 2 × ⋯ ×
𝑛−𝑟+1
The number of permutations of n
different elements is n! (read as n 𝑛!
• 𝑃𝑟𝑛 =
factorial) where 𝑛−𝑟 !
n! = n × (n ─ 1) × (n ─ 2) × … × 2 × 1
• Note: 𝑃𝑟𝑛 = 𝑛𝑃𝑟 = 𝑃 𝑛, 𝑟
Note: 0! = 1
Permutation
2-10/24 Printed Circuit Board Circular Permutation
A printed circuit board has eight The number of permutations of n
different locations in which a distinct objects arranged in a circle
component can be placed. If four is (n − 1)!.
different components are to be
placed on the board, how many
different designs are possible? Example:
2-43/52 In how many ways can 5
different trees be planted in a
8!
P48 = 8P4 = P(8, 4) = 8 × 7 × 6 × 5 = circle?
4!
= 1680 different designs are possible
Permutation of Similar Objects
PERMUTATION WITH REPETITION ORDERED PARTITION
The number of permutations of n = n1 + n2 The number of ways of partitioning a set of
+ … + nr objects of which n1 are of one n objects into r cells with n1 elements in the
type, n2 are of second type, … , and nr are offirst cell, n2 elements in the second, and so
𝑛! forth, is
an rth type is .
𝑛1 !𝑛2 !𝑛3 !…𝑛𝑟 !
𝑛 𝑛!
• 𝑛 ,𝑛 ,…,𝑛 =
1 2 𝑟 𝑛1 !𝑛2 !…𝑛𝑟 !
Example: where n1 + n2 + … + nr = n.
2-45/52 How many distinct permutations Example:
can be made from the letters of the word
2-20/49 In how many ways can 7 scientists
INFINITY?
be assigned to one triple and two double
hotel rooms?
Combination
A combination is actually a partition of two cells, the
one cell containing the r objects selected and the
other cell containing the (n − r) objects that are left.
Examples:
The number of such combinations, denoted by 2-13/25 Printed Circuit Board Layout
A printed circuit board has eight different
𝑛 𝑛 locations in which a component can be placed. If
, is usually shortened to , five identical components are to be placed on
𝑟, 𝑛 − 𝑟 𝑟 the board, how many different designs are
possible?
since the number of elements in the second cell
must be (n − r). 8 8!
5
= 8C5 = C 8,5 = = 56
The number of combinations of n distinct objects 5! 8−5 !
taken r at a time is
𝑛 𝑛!
• = 𝑛𝐶𝑟 = 𝐶 𝑛, 𝑟 = .
𝑟 𝑟! 𝑛−𝑟 !
Guided Learning Activity
2.31/51 A witness to a hit-and-run accident told 2.33/52 If a multiple-choice test consists of 5
the police that the license number contained questions each with 4 possible answers of
the letters RLH followed by 3 digits, the first of which only 1 is correct,
which was a 5. If the witness cannot recall the (a) In how many different ways can a student
last 2 digits, but is certain that all 3 digits are check off one answer to each question?
different, find the maximum number of (b) In how many ways can a student check off
automobile registrations that the police may one answer to each question and get all the
have to check. answers wrong?
2.32/52 (a) In how many ways can 6 people be 2.36/52 (a) How many three-digit numbers
lined up to get on a bus? can be formed from the digits 0, 1, 2, 3, 4, 5,
(b) If 3 specific persons, among 6, insist on and 6 if each digit can be used only once?
following each other, how many ways are (b) How many of these are odd numbers?
possible? (c) How many are greater than 330?
(c) If 2 specific persons, among 6, refuse to
follow each other, how many ways are
possible?
Guided Learning Activity
2-46/52 In how many ways can 3 oaks, 4 pines, and 2-22/50 A young boy asks his mother to get five
2 maples be arranged along a property line if one game-boy cartridges from his collection of 10
does not distinguish among trees of the same kind? arcade and 5 sports games. How many ways are
there that his mother will get 3 arcade and 2
sports games, respectively?
2-12/26 A part is labeled by printing with four thick
lines, three medium lines, and two thin lines. If each
ordering of the nine lines represent a different label, 11/358 How many poker hands of five cards can
how many different labels can be generated by using be dealt from a standard deck of 52 cards? Also,
this scheme? how many ways are there to select 47 cards from
a standard deck of 52 cards?
2-14/25 Sampling without Replacement
12/360 How many ways are there to select five
A bin of 50 manufactured parts contains three players from a 10-member tennis team to make
defective parts and 47 nondefective parts. A sample a trip to a match at another school?
of six parts is selected from the 50 parts without
replacement. 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 6 that
contain exactly 2 defective parts?
Guided Learning Activity
• 13/360 A group of 30 people have been trained as astronauts to go
on the first mission to Mars. How many ways are there to select a
crew of six people to go on this mission (assuming that all crew
members have the same job)?
4.25/195 A firm is placing three orders for supplies 2-16/31 A random experiment can result in one
among five different distributors. Each order is of the outcomes {a, b, c, d} with probabilities 0.1,
randomly assigned to one of the distributors, and a 0.3, 0.5, and 0.1, respectively. Let A denote the
distributor can receive multiple orders. Find the event {a, b}, B the event {b, c, d}, and C the event
following probabilities. {d}.
(a) All orders go to different distributors.
(b) All orders go to the same distributor.
(c) Exactly two of the three orders go to one
particular distributor. Determine the following probabilities.
P(A) P(B) P(C)
2-58/33 Each of the possible five outcomes of a
random experiment is equally likely. The sample P(A′) P(B’) P(C′ )
space is {a, b, c, d, e}. Let A denote the event {a, b}, P(A ∩ B)
and B denote the event {c, d, e}. Determine the
following. P(A ∪ B)
(a) P(A) (b) P(B) P(A ∩ C).
(c) P(A′) (d) P(A ∪ B)
(e) P(A ∩ B)
Theorems on Probability
Probability of a Union 2-92/39 A Web ad can be designed from
For any two events A and B, four different colors, three font types,
five font sizes, three images, and five
P(A ∪ B) = P(A) + P(B) − P(A ∩ B) text phrases. A specific design is
(2-5) randomly generated by the Web server
Examples: when you visit the site. Let A denote the
event that the design color is red and let
2-53/59 The probability that an American B denote the event that the font size is
industry will locate in Shanghai, China, is not the smallest one. Use addition rules
0.7, the probability that it will locate in to calculate the following probabilities.
Beijing, China, is 0.4, and the probability
that it will locate in either Shanghai or (a) P(A ∪ B)
Beijing or Both is 0.8. What is the (b) P(A ∪ B′)
probability that the industry will locate
(c) P(A′ ∪ B′)
(a) in both cities?
(b) in neither city?
Addition Rules
If A and B are mutually exclusive
events,
P(A ∪ B) = P(A) + P(B) Probability of Union of Three Events
Equation 2-6
Solution:
P(A ∩ B) 0.15
(a) P(A|B) = = = 0.50 4.35/205 A manufacturer of computer keyboards has
𝑃(𝐵) 0.30
assembly plants at two different locations, one in Iowa
and the other in South Carolina. The keyboard faults in
(b) P(A ∩ B) = P(A)P(B) general are classified into three different categories
depending on the location: fault related to a letter key,
a number key, or other function key. The summary of
last year’s inspection of production estimated the fault
rates as follows (Table 4.16). If a keyboard from this
manufacturer is chosen at random, are the events
“faulty letter key” and “produced in South Carolina
facility” independent of each other?
Guided Learning Activity
2-143/52 If P(A|B) = 0.3, P(B) = 0.8, 2-150/53 In a test of a printed
and P(A) = 0.3, are the events B and circuit board using a random test
the complement of A independent? pattern, an array of 10 bits is equally
likely to be 0 or 1. Assume that the
bits are independent.
(a) What is the probability that all
bits are 1s?
2-144/52 If P(A) = 0.2, P(B) = 0.2, and A (b) What is the probability that all
and B are mutually exclusive, are they bits are 0s?
independent?
(c) What is the probability that
exactly 5 bits are 1s and 5 bits are
0s?
Reliability
Reliability theory is concerned with the A system with series configuration will
duration of the useful life of function if and only if all its components
components and systems of are functioning, while a system with
components. That is, it is concerned parallel configuration will function if and
only if at least one of the components is
with determining that a system with functioning. Different components fail
possibly many components will be independently.
functioning at time t. The components
of a system can arranged in two basic
configurations: series configuration
and parallel configuration. A real
system consists of a mixture of series
and parallel components, which can
sometimes be reduced to an
equivalent system of series
configuration or a system of parallel
configuration.
Reliability
SERIES PROCESS PARALLEL PROCESS
Consider a system with n components labeled In the case of a system of parallel components,
C1, C2, …, Cn. Let Rk(t) denote the probability we need at least one path between A and B for
that component Ck has not failed in the interval the system to be operational. The probability
(0, t], where k = 1, 2, …, n. That is, Rk(t) is the that no such path exists is the probability that
probability that Ck has not failed up to time t all the components have failed, which is given
and is called the reliability function of Ck. For a by [1 − R1(t)] [1 − R2(t)] … [1 − Rn(t)]. Thus, the
system of components in series, the system system reliability function is the complement of
reliability function is given by this function and is given by