Lecture No.4
Lecture No.4
Lecture No.4
Lecture No. 4
Resourse Person: Dr. Absar Ul Haq Department: Mechanical Engineering
Perhaps it was humankinds unquenchable thirst for gambling that led to the early development of probability
theory. In an effort to increase their winnings, gamblers called upon mathematicians to provide optimum
strategies for various games of chance. Some of the mathematicians providing these strategies were Pascal,
Leibniz, Fermat, and James Bernoulli. As a result of this development of probability theory, statistical infer-
ence, with all its predictions and generalizations, has branched out far beyond games of chance to encompass
many other fields associated with chance occurrences, such as politics, business, weather forecasting, and
scientific research. For these predictions and generalizations to be reasonably accurate, an understanding
of basic probability theory is essential. What do we mean when we make the statement John will proba-
bly win the tennis match, or I have a fifty-fifty chance of getting an even number when a die is tossed, or
The university is not likely to win the football game tonight, or Most of our graduating class will likely be
married within 3 years? In each case, we are expressing an outcome of which we are not certain, but owing
to past information or from an understanding of the structure of the experiment, we have some degree of
confidence in the validity of the statement. Throughout the remainder of this chapter, we consider only
those experiments for which the sample space contains a finite number of elements. The likelihood of the
occurrence of an event resulting from such a statistical experiment is evaluated by means of a set of real
numbers, called weights or probabilities, ranging from 0 to 1. To every point in the sample space we
assign a probability such that the sum of all probabilities is 1. If we have reason to believe that a certain
sample point is quite likely to occur when the experiment is conducted, the probability assigned should be
close to 1. On the other hand, a probability closer to 0 is assigned to a sample point that is not likely to
occur. In many experiments, such as tossing a coin or a die, all the sample points have the same chance
of occurring and are assigned equal probabilities. For points outside the sample space, that is, for simple
events that cannot possibly occur, we assign a probability of 0. To find the probability of an event E, we
sum all the probabilities assigned to the sample points in E. This sum is called the probability of E and
is denoted by P (E).
Definition 4.1 The probability of an event E is the sum of the weights of all sample points in E. Therefore,
0 ≤ P (E) ≤ 1, P (∅) = 0, and P (S) = 1.
Furthermore, if E1 , E2 , E3 , · · · is a sequence of mutually exclusive events, then
P (E1 ∪ E2 ∪ E3 ∪ · · ·) = P (E1 ) + P (E2 ) + P (E3 ) + · · ·.
• A coin is tossed twice. What is the probability that at least 1 head occurs?
Solution: The sample space for this experiment is
S = {HH, HT, T H, T T }.
If the coin is balanced, each of these outcomes is equally likely to occur. Therefore, we assign a
probability of Ω to each sample point. Then 4Ω = 1, or Ω = 1/4. If A represents the event of at least
1 head occurring, then
1 1 1 3
A = {HH, HT, T H} and P (A) = + + =
4 4 4 4
4-1
Lecture No. 4 4-2
• A die is loaded in such a way that an even number is twice as likely to occur as an odd number. If E
is the event that a number less than 4 occurs on a single toss of the die, find P (E).
Solution: The sample space is S = {1, 2, 3, 4, 5, 6}. We assign a probability of Ω to each odd number
and a probability of 2Ω to each even number. Since the sum of the probabilities must be 1, we have
9Ω = 1 or Ω = 1/9. Hence, probabilities of 19 and 29 are assigned to each odd and even number,
respectively. Therefore, E = {1, 2, 3} and P (E) = 19 + 92 + 91 = 94
• In Above Example, let A be the event that an even number turns up and let B be the event that a
number divisible by 3 occurs. Find P (A ∪ B) and P (A ∩ B).
Solution: For the events A = {2, 4, 6} and B = {3, 6}, we have A ∪ B = {2, 3, 4, 6} and A ∩ B = {6}.
By assigning a probability of 1/9 to each odd number and 2/9 to each even number, we have
2 1 2 2 7 2
P (A ∪ B) = + + + = and P (A ∩ B) =
9 9 9 9 9 9
If the sample space for an experiment contains N elements, all of which are equally likely to occur, we assign
a probability equal to 1/N to each of the N points. The probability of any event A containing n of these N
sample points is then the ratio of the number of elements in A to the number of elements in S.
Definition 4.2 (Rule 2.3) If an experiment can result in any one of N different equally likely outcomes,
and if exactly n of these outcomes correspond to event E, then the probability of event E is
n
P (E) =
N
• A statistics class for engineers consists of 25 industrial, 10 mechanical, 10 electrical, and 8 civil en-
gineering students. If a person is randomly selected by the instructor to answer a question, find the
probability that the student chosen is (a) an industrial engineering major and (b) a civil engineering
or an electrical engineering major.
Solution: Denote by I, M, E, and C the students majoring in industrial, mechanical, electrical, and
civil engineering, respectively. The total number of students in the classis 53, all of whom are equally
likely to be selected. (a) Since 25 of the 53 students are majoring in industrial engineering, the prob-
ability of event I, selecting an industrial engineering major at random, is
25
P (I) = .
53
(b) Since 18 of the 53 students are civil or electrical engineering majors, it follows that
18
P (C ∩ E) =
53
.
• In a poker hand consisting of 5 cards, find the probability of holding 2 aces and 3 jacks. Solution:
The number of ways of being dealt 2 aces from 4 cards is
4 4!
= = 6,
2 2!2!
By the multiplication rule (Rule 2.1), there are n = (6)(4) = 24 hands with 2 aces and 3 jacks. The
total number of 5-card poker hands, all of which are equally likely, is
52 52!
N= = = 2, 598, 960.
5 5!47!
Therefore, the probability of getting 2 aces and 3 jacks in a 5-card poker hand is
24
P (C) = = 0.9 × 10−5
2, 598, 960
If the outcomes of an experiment are not equally likely to occur, the probabilities must be assigned on
the basis of prior knowledge or experimental evidence. For example, if a coin is not balanced, we could
estimate the probabilities of heads and tails by tossing the coin a large number of times and recording the
outcomes. According to the relative frequency definition of probability, the true probabilities would be the
fractions of heads and tails that occur in the long run. Another intuitive way of understanding probability
is the indifference approach. For instance, if you have a die that you believe is balanced, then using this
indifference approach, you determine that the probability that each of the six sides will show up after a
throw is 1/6.
To find a numerical value that represents adequately the probability of winning at tennis, we must depend
on our past performance at the game as well as that of the opponent and, to some extent, our belief in our
ability to win. Similarly, to find the probability that a horse will win a race, we must arrive at a probability
based on the previous records of all the horses entered in the race as well as the records of the jockeys riding
the horses. Intuition would undoubtedly also play a part in determining the size of the bet that we might
be willing to wager. The use of intuition, personal beliefs, and other indirect information in arriving at
probabilities is referred to as the subjective definition of probability.
In most of the applications of probability in this book, the relative frequency interpretation of probability is
the operative one. Its foundation is the statistical experiment rather than subjectivity, and it is best viewed
as the limiting relative frequency. As a result, many applications of probability in science and engineering
must be based on experiments that can be repeated. Less objective notions of probability are encountered
when we assign probabilities based on prior information and opinions, as in There is a good chance that the
Giants will lose the Super Bowl. When opinions and prior information differ from individual to individual,
subjective probability becomes the relevant resource.
Often it is easiest to calculate the probability of some event from known probabilities of other events. This
may well be true if the event in question can be represented as the union of two other events or as the
complement of some event. Several important laws that frequently simplify the computation of probabilities
follow. The first, called the additive rule, applies to unions of events.
P (A ∪ B) = P (A) + P (B).
Lecture No. 4 4-4
• John is going to graduate from an industrial engineering department in a university by the end of the
semester. After being interviewed at two companies he likes, he assesses that his probability of getting
an offer from company A is 0.8, and his probability of getting an offer from company B is 0.6. If he
believes that the probability that he will get offers from both companies is 0.5, what is the probability
that he will get at least one offer from these two companies?
Solution : Using the additive rule, we have
• What is the probability of getting a total of 7 or 11 when a pair of fair dice is tossed?
Solution : Let A be the event that 7 occurs and B the event that 11 comes up. Now, a total of 7
occurs for 6 of the 36 sample points, and a total of 11 occurs for only 2 of the sample points. Since
all sample points are equally likely, we have P (A) = 1/6 and P (B) = 1/18. The events A and B are
mutually exclusive, since a total of 7 and 11 cannot both occur on the same toss. Therefore,
1 1 2
P (A ∪ B) = P (A) + P (B) = + =
6 18 9
• If the probabilities are, respectively, 0.09, 0.15, 0.21, and 0.23 that a person purchasing a new automobile
will choose the color green, white, red, or blue, what is the probability that a given buyer will purchase
a new automobile that comes in one of those colors?
Solution: Let G, W, R, and B be the events that a buyer selects, respectively, a green, white, red, or
blue automobile. Since these four events are mutually exclusive, the probability is
Often it is more difficult to calculate the probability that an event occurs than it is to calculate the probability
that the event does not occur. Should this be the case for some event A, we simply find P (Ac ) first and
then, using Theorem 4.3, find P (A) by subtraction.
P (A) + P (Ac ) = 1.
• If the probabilities that an automobile mechanic will service 3, 4, 5, 6, 7, or 8 or more cars on any
given workday are, respectively, 0.12, 0.19, 0.28, 0.24, 0.10, and 0.07, what is the probability that he
will service at least 5 cars on his next day at work?
Solution: Let E be the event that at least 5 cars are serviced. Now, P (E) = 1 − P (E c ), where E is
the event that fewer than 5 cars are serviced. Since
• Suppose the manufacturers specifications for the length of a certain type of computer cable are 2000±10
millimeters. In this industry, it is known that small cable is just as likely to be defective (not meeting
specifications) as large cable. That is,the probability of randomly producing a cable with length
exceeding 2010 millimeters is equal to the probability of producing a cable with length smaller than
1990 millimeters. The probability that the production procedure meets specifications is known to be
0.99.
(a) What is the probability that a cable selected randomly is too large?
(b) What is the probability that a randomly selected cable is larger than 1990 millimeters?
Solution: Let M be the event that a cable meets specifications. Let S and L be the events that the
cable is too small and too large, respectively. Then (a)
Thus,
P (X ≥ 1990) = 1 − P (S) = 1 − 0.005 = 0.995.
One very important concept in probability theory is conditional probability. In some applications, the
practitioner is interested in the probability structure under certain restrictions. For instance, in epidemiology,
rather than studying the chance that a person from the general population has diabetes, it might be of more
interest to know this probability for a distinct group such as Asian women in the age range of 35 to 50 or
Hispanic men in the age range of 40 to 60. This type of probability is called a conditional probability
Conditional Probability
The probability of an event B occurring when it is known that some event A has occurred is called a
conditional probability and is denoted by P (B|A). The symbol P (B|A) is usually read the probability
that B occurs given that A occurs or simply the probability of B, given A.
Consider the event B of getting a perfect square when a die is tossed. The die is constructed so that the even
numbers are twice as likely to occur as the odd numbers. Based on the sample space S = {1, 2, 3, 4, 5, 6},
with probabilities of 1/9 and 2/9 assigned, respectively, to the odd and even numbers, the probability of
B occurring is 1/3. Now suppose that it is known that the toss of the die resulted in a number greater
than 3. We are now dealing with a reduced sample space A = {4, 5, 6}, which is a subset of S. To find the
probability that B occurs, relative to the space A, we must first assign new probabilities to the elements of
A proportional to their original probabilities such that their sum is 1. Assigning a probability of Ω to the
odd number in A and a probability of 2Ω to the two even numbers, we have 5Ω = 1, or Ω = 1/5. Relative
Lecture No. 4 4-6
to the space A, we find that B contains the single element 4. Denoting this event by the symbol B|A, we
write B|A = {4}, and hence
2
P (B|A) = .
5
This example illustrates that events may have different probabilities when considered relative to different
sample spaces. We can also write
2 2/9 P (A ∩ B)
P (B|A) = = = ,
5 5/9 P (A)
where P (A ∩ B) and P (A) are found from the original sample space S. In other words, a conditional
probability relative to a subspace A of S may be calculated directly from the probabilities assigned to the
elements of the original sample space S.
As an additional illustration, suppose that our sample space S is the population of adults in a small town
who have completed the requirements for a college degree. We shall categorize them according to gender and
employment status. The data are given in Table 2.1. One of these individuals is to be selected at random
for a tour throughout the country to publicize the advantages of establishing new industries in the town.
We shall be concerned with the following events:
M: a man is chosen,
E: the one chosen is employed.
Using the reduced sample space E, we find that
460 23
P (M |E) = = .
600 30
Let n(A) denote the number of elements in any set A. Using this notation, since each adult has an equal
chance of being selected, we can write
n(EnM ) n(EnM )/n(S) P (EnM )
P (M |E) = = = ,
n(E) n(E)/n(S) P (E)
where P (E ∩ M ) and P (E) are found from the original sample space S. To verify this result, note that
600 2
P (E) = =
900 3
and
460 23
P (E ∩ M ) = = .
900 45
Lecture No. 4 4-7
Hence,
23/45 23
P (M |E) = = ,
2/3 30
as before.
• The probability that a regularly scheduled flight departs on time is P (D) = 0.83; the probability
that it arrives on time is P (A) = 0.82; and the probability that it departs and arrives on time is
P (D ∩ A) = 0.78. Find the probability that a plane
(a) arrives on time, given that it departed on time, and
(b) departed on time, given that it has arrived on time.
Solution: Using Definition 2.10, we have the following.
(a) The probability that a plane arrives on time, given that it departed on time, is
P (D ∩ A) 0.78
P (A|D) = = = 0.94.
P (D) 0.83
(b) The probability that a plane departed on time, given that it has arrived on time, is
P (D ∩ A) 0.78
P (D|A) = = = 0.95.
P (A) 0.82
• The concept of conditional probability has countless uses in both industrial and biomedical applications.
Consider an industrial process in the textile industry in which strips of a particular type of cloth are
being produced. These strips can be defective in two ways, length and nature of texture. For the case
of the latter, the process of identification is very complicated. It is known from historical information
on the process that 10% of strips fail the length test, 5% fail the texture test, and only 0.8% fail both
tests. If a strip is selected randomly from the process and a quick measurement identifies it as failing
the length test, what is the probability that it is texture defective?
Solution: Consider the events
L: length defective, T : texture defective.
Given that the strip is length defective, the probability that this strip is texture defective is given by
P (T ∩ L) 0.008
P (T |L) = = = 0.08.
P (L) 0.1
Thus, knowing the conditional probability provides considerably more information than merely knowing
P (T ).
Independent Events
In the die-tossing experiment discussed on page 62, we note that P (B|A) = 2/5 whereas P (B) = 1/3. That
is, P (B|A) = P (B), indicating that B depends on A. Now consider an experiment in which 2 cards are
drawn in succession from an ordinary deck, with replacement. The events are defined as
A: the first card is an ace,
B: the second card is a spade.
Since the first card is replaced, our sample space for both the first and the second draw consists of 52 cards,
containing 4 aces and 13 spades. Hence,
13 1 13 1
P (B|A) = = and P (B) = = .
52 4 52 4
That is, P (B|A) = P (B). When this is true, the events A and B are said to be independent.
Lecture No. 4 4-8
Although conditional probability allows for an alteration of the probability of an event in the light of addi-
tional material, it also enables us to understand better the very important concept of independence or, in the
present context, independent events. In the airport illustration in Example, P (A|D) differs from P (A). This
suggests that the occurrence of D influenced A, and this is certainly expected in this illustration. However,
consider the situation where we have events A and B and P (A|B) = P (A). In other words, the occurrence of
B had no impact on the odds of occurrence of A. Here the occurrence of A is independent of the occurrence
of B. The importance of the concept of independence cannot be overemphasized. It plays a vital role in
material in virtually all chapters in this book and in all areas of applied statistics.
assuming the existences of the conditional probabilities. Otherwise, A and B are dependent.
The condition P (B|A) = P (B) implies that P (A|B) = P (A), and conversely. For the card-drawing experi-
ments, where we showed that P (B|A) = P (B) = 1/4, . we also can see that P (A|B) = P (A) = 1/13.
Multiplying the formula in Definition 4.8 by P (A), we obtain the following important multiplicative rule (or
product rule), which enables us to calculate the probability that two events will both occur.
Theorem 4.10 If in an experiment the events A and B can both occur, then
Thus, the probability that both A and B occur is equal to the probability that A occurs multiplied by the
conditional probability that B occurs, given that A occurs. Since the events A ∩ B and B ∩ A are equivalent,
it follows from Theorem 4.10 that we can also write
P (A ∩ B) = P (B ∩ A) = P (B)P (A|B).
In other words, it does not matter which event is referred to as A and which event is referred to as B.
• Suppose that we have a fuse box containing 20 fuses, of which 5 are defective. If 2 fuses are selected
at random and removed from the box in succession without replacing the first, what is the probability
that both fuses are defective?
Solution: We shall let A be the event that the first fuse is defective and B the event that the second
fuse is defective; then we interpret A ∩ B as the event that A occurs and then B occurs after A has
occurred. The probability of first removing a defective fuse is 1/4; then the probability of removing a
second defective fuse from the remaining 4 is 4/19. Hence,
1 19
P (A ∩ B) = = 191.
4 4
• One bag contains 4 white balls and 3 black balls, and a second bag contains 3 white balls and 5 black
balls. One ball is drawn from the first bag and placed unseen in the second bag. What is the probability
that a ball now drawn from the second bag is black?
Solution: Let B1 , B2 , and W1 represent, respectively, the drawing of a black ball from bag 1, a black
Lecture No. 4 4-9
ball from bag 2, and a white ball from bag 1. We are interested in the union of the mutually exclusive
events B1 ∩ B2 and W1 ∩ B2 . The various possibilities and their probabilities are illustrated in Figure
4.1. Now
P [(B1 ∩ B2 )or(W1 ∩ B2 )] = P (B1 ∩ B2 ) + P (W1 ∩ B2 )
= P (B1 )P (B2 |B1 ) + P (W1 )P (B2 |W1 )
3 6 4 5
= + = 3863.
7 9 7 9
• A small town has one fire engine and one ambulance available for emergencies. The probability that
the fire engine is available when needed is 0.98, and the probability that the ambulance is available
when called is 0.92. In the event of an injury resulting from a burning building, find the probability
that both the ambulance and the fire engine will be available, assuming they operate independently.
Solution: Let A and B represent the respective events that the fire engine and the ambulance are
available. Then
P (A ∩ B) = P (A)P (B) = (0.98)(0.92) = 0.9016
Theorem 4.12 If, in an experiment, the events A1, A2, . . . , Ak can occur, then
P (A1 ∩ A2 ∩ · · · ∩ Ak ) = P (A1 )P (A2 |A1 )P (A3 |A1 ∩ A2 ) · · · P (Ak |A1 ∩ A2 ∩ · · · ∩ Ak−1 ).
If the events A1 , A2 , · · ·, Ak are independent, then
P (A1 ∩ A2 ∩ · · · ∩ Ak ) = P (A1 )P (A2 ) · · · P (Ak ).
Lecture No. 4 4-10
• Three cards are drawn in succession, without replacement, from an ordinary deck of playing cards.
Find the probability that the event A1 ∩ A2 ∩ A3 occurs, where A1 is the event that the first card is a
red ace, A2 is the event that the second card is a 10 or a jack, and A3 is the event that the third card
is greater than 3 but less than 7.
Solution: First we define the events
A1: the first card is a red ace,
A2: the second card is a 10 or a jack,
A3: the third card is greater than 3 but less than 7.
Now
2 8 12
P (A1 ) = , P (A2 |A1 ) = , P (A3 |A1 ∩ A2 ) = ,
52 51 50
and hence, by Theorem 4.12,
Bayesian statistics is a collection of tools that is used in a special form of statistical inference which applies
in the analysis of experimental data in many practical situations in science and engineering. Bayes rule is
one of the most important rules in probability theory.
Total Probability
Let us now return to the illustration of previous section, where an individual is being selected at random from
the adults of a small town to tour the country and publicize the advantages of establishing new industries
in the town. Suppose that we are now given the additional information that 36 of those employed and 12 of
those unemployed are members of the Rotary Club. We wish to find the probability of the event A that the
individual selected is a member of the Rotary Club. Referring to Figure 4.2, we can write A as the union of
the two mutually exclusive events E ∩ A and E c ∩ A. Hence, A = (E ∩ A) ∪ (E c ∩ A), and by first Corollary
of Theorem 4.3, and then Theorem 4.10, we can write
The data of previous section, together with the additional data given above for the set A, enable us to
compute
600 2 36 3
P (E) = = , P (A|E) = = ,
900 3 600 50
and
1 12 1
P (E c ) = , P (A|E c ) = = .
3 300 25
If we display these probabilities by means of the tree diagram of Figure 4.3, where the first branch yields
the probability P (E)P (A|E) and the second branch yields
A generalization of the foregoing illustration to the case where the sample space is partitioned into k subsets is
covered by the following theorem, sometimes called the theorem of total probability or the rule of elimination.
Theorem 4.13 If the events B1 , B2 , ..., Bk constitute a partition of the sample space S such that P (Bi) 6= 0
for i = 1, 2, ..., k, then for any event A of S,
X X
P (A) = P (Bi ∩ A) = P (Bi )P (A|Bi ).
i=1 i=1
• In a certain assembly plant, three machines, B1 , B2 , and B3, make 30%, 45%, and 25%, respectively,
of the products. It is known from past experience that 2%, 3%, and 2% of the products made by each
machine, respectively, are defective. Now, suppose that a finished product is randomly selected. What
is the probability that it is defective?
Solution: Consider the following events:
A: the product is defective,
B1 : the product is made by machine B1 ,
B2 : the product is made by machine B2 ,
B3 : the product is made by machine B3 .
Applying the rule of elimination, we can write
Referring to the tree diagram of Figure 4.4, we find that the three branches give the probabilities
Instead of asking for P (A) in above Example, by the rule of elimination, suppose that we now consider
the problem of finding the conditional probability P (Bi |A). In other words, suppose that a product was
randomly selected and it is defective. What is the probability that this product was made by machine Bi ?
Questions of this type can be answered by using the following theorem, called Bayes rule:
Theorem 4.14 (Bayes Rule) If the events B1 , B2 , · · ·, Bk constitute a partition of the sample space S such
that P (Bi ) 6= 0 for i = 1, 2, ..., k, then for any event A in S such that P (A) 6= 0,
for r = 1, 2, ..., k.
• With reference to above Example, if a product was chosen randomly and found to be defective, what
is the probability that it was made by machine B3 ?
Solution: Using Bayes rule to write
P (B3 )P (A|B3 )
P (B3 |A) =
P (B1 )P (A|B1 ) + P (B2 )P (A|B2 ) + P (B3 )P (A|B3 )
Lecture No. 4 4-13
• A manufacturing firm employs three analytical plans for the design and development of a particular
product. For cost reasons, all three are used at varying times. In fact, plans 1, 2, and 3 are used for
30%, 20%, and 50% of the products, respectively. The defect rate is different for the three procedures
as follows:
P (D|P1 ) = 0.01, P (D|P2 ) = 0.03, P (D|P3 ) = 0.02,
where P (D|Pj ) is the probability of a defective product, given plan j. If a random product was observed
and found to be defective, which plan was most likely used and thus responsible?
Solution: From the statement of the problem
we must find P (Pj |D) for j = 1, 2, 3. Bayes rule (Theorem 4.14) shows
P (P1 )P (D|P1 )
P (P1 |D) =
P (P1 )P (D|P1 ) + P (P2 )P (D|P2 ) + P (P3 )P (D|P3 )
(0.30)(0.01) 0.003
= = = 0.158.
(0.3)(0.01) + (0.20)(0.03) + (0.50)(0.02) 0.019
Similarly,
(0.03)(0.20)
P (P2 |D) = = 0.316
0.019
and
(0.02)(0.50)
P (P3 |D) = = 0.526.
0.019
References
[TT] T.T. Soong, “Fundamentals of probability and statistics for engineers,” John Wiley & Sons
Ltd, The Atrium, Southern Gate, Chichester, West Sussex PO19 8SQ, England, 2004.