Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Romblon State University

College of Engineering and Technology


Civil Engineering Department

Engineering Data Analysis

Chapter 2
Probability

Prepared by:

Engr. Jeffy Jones F. Fetalvero


Lecturer
ENGINEERING DATA ANALYSIS BASIC PROBABILITY

Topic Overview

In this chapter we examine the basic ideas and approaches to probability and its
calculation. We look at calculating the probabilities of combined events. Under
some circumstances, probabilities can be found by using counting theory
involving permutations and combinations. The same ideas can be applied to
somewhat more complex situations, some of which will be examined in this
chapter.

Intended Learning Outcomes

At the end of this chapter, the students are expected to:

1. Understand the fundamental concepts of probability.

2. Learn and understand the techniques in solving probability problems including


permutations and combinations.

3. Apply these fundamental concepts effectively in solving probability problems.

ENGR. JEFFY JONES F. FETALVERO 2


ENGINEERING DATA ANALYSIS BASIC PROBABILITY

1.1 Fundamental Concepts

(a) Probability as a specific term is a measure of the likelihood that a particular


event will occur. Just how likely is it that the outcome of a trial will meet a particular
requirement? If we are certain that an event will occur, its probability is 1 or 100%.
If it certainly will not occur, its probability is zero. The first situation corresponds to
an event which occurs in every trial, whereas the second corresponds to an event
which never occurs. At this point we might be tempted to say that probability is
given by relative frequency, the fraction of all the trials in a particular experiment
that give an outcome meeting the stated requirements. But in general, that would
not be right. Why? Because the outcome of each trial is determined by chance.
Say we toss a fair coin, one which is just as likely to give heads as tails. It is entirely
possible that six tosses of the coin would give six heads or six tails, or anything in
between, so the relative frequency of heads would vary from zero to one. If it is
just as likely that an event will occur as that it will not occur, its true probability is
0.5 or 50%. But the experiment might well result in relative frequencies all the way
from zero to one. Then the relative frequency from a small number of trials gives
a very unreliable indication of probability. If we were able to make an infinite
number of trials, then probability would indeed be given by the relative frequency
of the event.

As an illustration, suppose the weather man on TV says that for a particular region
the probability of precipitation tomorrow is 40%. Let us consider 100 days which
have the same set of relevant conditions as prevailed at the time of the forecast.
According to the prediction, precipitation the next day would occur at any point
in the region in about 40 of the 100 trials. (This is what the weather man predicts,
but we all know that the weather man is not always right!)

(b) Although we cannot make an infinite number of trials, in practice we can


make a moderate number of trials, and that will give some useful information. The
relative frequency of a particular event, or the proportion of trials giving outcomes
which meet certain requirements, will give an estimate of the probability of that
event. The larger the number of trials, the more reliable that estimate will be. This
is the empirical or frequency approach to probability. (Remember that
“empirical” means based on observation or experience.)

Example 1.1
260 bolts are examined as they are produced. Five of them are found to be
defective. On the basis of this information, estimate the probability that a bolt will
be defective.

ENGR. JEFFY JONES F. FETALVERO 3


ENGINEERING DATA ANALYSIS BASIC PROBABILITY

Answer
The probability of a defective bolt is approximately equal to the relative
frequency, which is 5/260 = 0.019.

(c) Another type of probability is the subjective estimate, based on a person’s


experience. To illustrate this, say a geological engineer examines extensive
geological information on a particular property. He chooses the best site to drill
an oil well, and he states that on the basis of his previous experience he estimates
that the probability the well will be successful is 30%. (Another experienced
geological engineer using the same information might well come to a different
estimate.) This, then, is a subjective estimate of probability. The executives of the
company can use this estimate to decide whether to drill the well.

(d) A third approach is possible in certain cases. This includes various gambling
games, such as tossing an unbiased coin; drawing a colored ball from a number
of balls, identical except for color, which are put into a bag and thoroughly
mixed; throwing an unbiased die; or drawing a card from a well-shuffled deck of
cards. In each of these cases we can say before the trial that a number of possible
results are equally likely. This is the classical or “a priori” approach. The phrase “a
priori” comes from Latin words meaning coming from what was known before.
This approach is often simple to visualize, so giving a better understanding of
probability. In some cases, it can be applied directly in engineering.

Example 1.2
Three nuts with metric threads have been accidentally mixed with twelve nuts
with U.S. threads. To a person taking nuts from a bucket, all fifteen nuts seem to
be the same. One nut is chosen randomly. What is the probability that it will be
metric?

Answer
There are fifteen ways of choosing one nut, and they are equally likely. Three of
these equally likely outcomes give a metric nut. Then the probability of choosing
a metric nut must be 3/15, or 20%.

In the study of probability an event is a set of possible outcomes which meets


stated requirements. If a six-sided cube (called a die) is tossed, we define the
outcome as the number of dots on the face which is upward when the die comes
to rest. The possible outcomes are 1,2,3,4,5, and 6. We might call each of these
outcomes a separate event—for example, the number of dots on the upturned
face is 5. On the other hand, we might choose an event as those outcomes which
are even, or those evenly divisible by three.

ENGR. JEFFY JONES F. FETALVERO 4


ENGINEERING DATA ANALYSIS BASIC PROBABILITY

(e) Remember that the probability of an event which is certain is 1, and the
probability of an impossible event is 0. Then no probability can be more than 1 or
less than 0. If we calculate a probability and obtain a result less than 0 or greater
than 1, we know we must have made a mistake. If we can write down
probabilities for all possible results, the sum of all these probabilities must be 1, and
this should be used as a check whenever possible.

Sometimes some basic requirements for probability are called the axioms of
probability. These are that a probability must be between 0 and 1, and the simple
addition rule. These axioms are then used to derive theoretical relations for
probability.

(f) An alternative quantity, which gives the same information as the probability, is
called the fair odds. This originated in betting on gambling games. If the game is
to be fair (in the sense that no player has any advantage in the long run), each
player should expect that he or she will neither win nor lose any money if the game
continues for a very large number of trials. Then if the probabilities of various
outcomes are not equal, the amounts bet on them should compensate. The fair
odds in favor of a result represent the ratio of the amount which should be bet
against that particular result to the amount which should be bet for that result, in
order to give fairness as described above. Say the probability of success in a
particular situation is 3/5, so the probability of failure is 1 – 3/5 = 2/5. Then to make
the game fair, for every two dollars bet on success, three dollars should be bet
against it. Then we say that the odds in favor of success are 3 to 2, and the odds
against success are 2 to 3. To reason in the other direction, take another example
in which the fair odds in favor of success are 4 to 3, so the fair odds against success
are 3 to 4. Then

4 4
Pr[𝑠𝑢𝑐𝑐𝑒𝑠𝑠] = = = 0.571
4+3 7
𝑝
In general, if Pr [failure] = 1 – p, then the fair odds in favor of success are to 1,
1−𝑝
1−𝑝
and the fair odds against success are to 1. These are the relations which we
𝑝
use to relate probabilities to the fair odds.

1.2 Basic Rules of Combining Probabilities

The basic rules or laws of combining probabilities must be consistent with the
fundamental concepts.

ENGR. JEFFY JONES F. FETALVERO 5


ENGINEERING DATA ANALYSIS BASIC PROBABILITY

1.2.1 Addition Rule

This can be divided into two parts, depending upon whether there is overlap
between the events being combined.

(a) If the events are mutually exclusive, there is no overlap: if one event occurs,
other events cannot occur. In that case the probability of occurrence of one or
another of more than one event is the sum of the probabilities of the separate
events. For example, if I throw a fair six-sided die the probability of any one face
coming up is the same as the probability of any other face, or one-sixth. There is
no overlap among these six possibilities. Then Pr [6] = 1/6, Pr [4] = 1/6, so Pr [6 or 4]
is 1/6 + 1/6 = 1/3. This, then, is the probability of obtaining a six or a four on throwing
one die. Notice that it is consistent with the classical approach to probability: of
six equally likely results, two give the result which was specified. The Addition Rule
corresponds to a logical or and gives a sum of separate probabilities.

Often, we can divide all possible outcomes into two groups without overlap. If
one group of outcomes is event A, the other group is called the complement of
A and is written 𝐴̅ or A′. Since A and 𝐴̅ together include all possible results, the sum
of Pr [A] and Pr [𝐴̅] must be 1. If Pr [𝐴̅] is more easily calculated than Pr [A], the
best approach to calculating Pr [A] may be by first calculating Pr [𝐴̅].

Example 1.3
A sample of four electronic components is taken from the output of a production
line. The probabilities of the various outcomes are calculated to be: Pr [0
defectives] = 0.6561, Pr [1 defective] = 0.2916, Pr [2 defectives] = 0.0486, Pr [3
defectives] = 0.0036, Pr [4 defectives] = 0.0001. What is the probability of at least
one defective?

Answer
It would be perfectly correct to calculate as follows:
Pr [at least one defective] = Pr [1 defective] + Pr [2 defectives] + Pr [3 defectives]
+Pr [4 defectives] = 0.2916 + 0.0486 + 0.0036 + 0.0001 = 0.3439.

but it is easier to calculate instead:


Pr [at least one defective] = 1 – Pr [0 defectives] = 1 – 0.6561 = 0.3439 or 0.344.

(b) If the events are not mutually exclusive, there can be overlap between them.
This can be visualized using a Venn diagram. The probability of overlap must be
subtracted from the sum of probabilities of the separate events (i.e., we must not
count the same area on the Venn Diagram twice).

ENGR. JEFFY JONES F. FETALVERO 6


ENGINEERING DATA ANALYSIS BASIC PROBABILITY

Figure 1.1. Venn Diagram

The circle marked A represents the probability (or frequency) of event A, the circle
marked B represents the probability (or frequency) of event B, and the whole
rectangle represents all possibilities, so a probability of one or the total frequency.
The set consisting of all possible outcomes of a particular experiment is called the
sample space of that experiment. Thus, the rectangle on the Venn diagram
corresponds to the sample space. An event, such as A or B, is any subset of a
sample space. In solving a problem, we must be very clear just what total group
of events we are concerned with—that is, just what is the relevant sample space.

Set notation is useful:


Pr [A ∪ B) = Pr [occurrence of A or B or both], the union of the two events A and
B.

Pr [A ∩ B) = Pr [occurrence of both A and B], the intersection of events A and B.

Then in Figure 1.2, the intersection A ∩ B represents the overlap between events A
and B.

Figure 1.2 shows Venn diagrams representing intersection, union, and


complement. The cross-hatched area of Figure 1.2(a) represents event A. The
cross-hatched area on Figure 1.2(b) shows the intersection of events A and B. The
union of events A and B is shown on part (c) of the diagram. The cross-hatched
area of part (d) represents the complement of event A.

ENGR. JEFFY JONES F. FETALVERO 7


ENGINEERING DATA ANALYSIS BASIC PROBABILITY

Figure 1.2. Set Relations on Venn Diagram

If the events being considered are not mutually exclusive, and so there may be
overlap between them, the Addition Rule becomes

Pr [A ∪ B) = Pr [A] + Pr [B] – Pr [A ∩ B] (1.1)

In words, the probability of A or B or both is the sum of the probabilities of A and


of B, less the probability of the overlap between A and B. The overlap is the
intersection between A and B.

Example 1.4
If one card is drawn from a well-shuffled bridge deck of 52 playing cards (13 of
each suit), what is the probability that the card is a queen or a heart? Notice that
a card can be both a queen and a heart. Then a queen of hearts (or queen ∩
heart) overlaps the two categories.

Answer
Pr [queen] = 4/52.
Pr [heart] = 13/52.
Pr [queen ∩ heart] = 1/52.

ENGR. JEFFY JONES F. FETALVERO 8


ENGINEERING DATA ANALYSIS BASIC PROBABILITY

These quantities are shown on the Venn diagram of Figure 1.3:

Figure 1.3. Venn Diagram for Queen of Hearts

Then Pr [queen ∪ heart] = Pr [queen] + Pr [heart] – Pr [queen ∩ heart] =


4/52 + 13/52 – 1/52 = 16/52

1.2.2 Multiplication Rule

(a) The basic idea for calculating the number of choices can be described as
follows: Say there are n1 possible results from one operation. For each one of
these, there are n2 possible results from a second operation. Then there are (n1 ×
n2) possible outcomes of the two operations together. In general, the numbers of
possible results are given by products of the number of choices at each step.
Probabilities can be found by taking ratios of possible results.

Example 1.5
In one case a byte is defined as a sequence of 8 bits. Each bit can be either zero
or one. How many different bytes are possible?

Answer
We have 2 choices for each bit and a sequence of 8 bits. Then the number of
possible results is 28 = 256.

(b) The simplest form of the Multiplication Rule for probabilities is as follows: If the
events are independent, then the occurrence of one event does not affect the
probability of occurrence of another event. In that case the probability of
occurrence of more than one event together is the product of the probabilities
of the separate events. (This is consistent with the basic idea of counting stated
above.) If A and B are two separate events that are independent of one another,
the probability of occurrence of both A and B together is given by:

ENGR. JEFFY JONES F. FETALVERO 9


ENGINEERING DATA ANALYSIS BASIC PROBABILITY

Pr [A ∩ B] = Pr [A] × Pr [B] (1.2)

Example 1.6
If a player throws two fair dice, the probability of a double one (one on the first
die and one on the second die) is (1/6)(1/6) = 1/36. These events are independent
because the result from one die has no effect at all on the result from the other
die. (Note that “die” is the singular word, and “dice” is plural.)

(c) If the events are not independent, one event affects the probability for the
other event. In this case conditional probability must be used. The conditional
probability of B given that A occurs, or on condition that A occurs, is written Pr [B
| A]. This is read as the probability of B given A, or the probability of B on condition
that A occurs. Conditional probability can be found by considering only those
events which meet the condition, which in this case is that A occurs. Among these
events, the probability that B occurs is given by the conditional probability, Pr [B
| A]. In the reduced sample space consisting of outcomes for which A occurs,
the probability of event B is Pr [B | A].

The multiplication rule for the occurrence of both A and B together when they are
not independent is the product of the probability of one event and the
conditional probability of the other:

Pr [A ∩ B] = Pr [A] × Pr [B | A] = Pr [B] × Pr [A | B] (1.3)

This implies that conditional probability can be obtained by

𝐏𝐫[𝑨∩𝑩]
𝑷𝒓[𝑩 | 𝑨] = 𝑷𝒓[𝑨]
(1.4)

𝐏𝐫[𝑨∩𝑩]
𝑷𝒓[𝑨 | 𝑩] = (1.5)
𝑷𝒓[𝑩]

These relations are often very useful.

Example 1.7
A fair six-sided die is tossed twice. What is the probability that a five will occur at
least once?

Answer
Note that this problem includes the possibility of obtaining two fives. On any one
toss, the probability of a five is 1/6, and the probability of no fives is 5/6. This
problem will be solved in several ways.

ENGR. JEFFY JONES F. FETALVERO 10


ENGINEERING DATA ANALYSIS BASIC PROBABILITY

First solution (using the addition rule, eq. 1.1):


Pr [at least one 5 in two tosses]
= Pr [(5 on the first toss) ∪ (5 on the second toss)]
= Pr [5 on the first toss] + Pr [5 on the second toss] – Pr [(5 on the first toss) ∩ (5 on
the second toss)]
1/6 + 1/6 – (1/6)(1/6) = 6/36 + 6/36 – 1/36 = 11/36

Second solution: Look at the sample space (i.e., consider all possible outcomes).
Let’s use a matrix notation where each entry gives first the result of the first toss
and then the result of the second toss, as follows:

Figure 1.4. Sample Space of Two Tosses

In the fifth row the result of the first toss is a 5, and in the fifth column the result of
the second toss is a 5. This row and this column have been shaded and represent
the part of the sample space which meets the requirements of the problem. This
area contains 11 entries, whereas the whole sample space contains 36 entries, so
Pr [at least one 5 in two tosses] = 11/36

Third solution (and the fastest): The probability of no fives in two tosses is (5/6)(5/6)
= 25/36
Because the only alternative to no fives is at least one five,
Pr [at least one 5 in two tosses] = 1 – 25/36 = 11/36

Before we start to calculate we should consider whether another method may


give a faster correct result!

1.3 Permutations and Combinations

Permutations and combinations give us quick, algebraic methods of counting.


They are used in probability problems for two purposes: to count the number of
equally likely possible results for the classical approach to probability, and to
count the number of different arrangements of the same items to give a
multiplying factor.

ENGR. JEFFY JONES F. FETALVERO 11


ENGINEERING DATA ANALYSIS BASIC PROBABILITY

(a) Each separate arrangement of all or part of a set of items is called a


permutation. The number of permutations is the number of different
arrangements in which items can be placed. Notice that if the order of the items
is changed, the arrangement is different, so we have a different permutation. Say
we have a total of n items to be arranged, and we can choose r of those items
at a time, where r ≤ n. The number of permutations of n items chosen r at a time
is written nPr. For permutations we consider both the identity of the items and their
order.

Let us think for a minute about the number of choices we have at each step along
the way. If there are n distinguishable items, we have n choices for the first item.
Having made that choice, we have (n–1) choices for the second item, then (n –
2) choices for the third item, and so on until we come to the r th item, for which
we have (n – r + 1) choices. Then the total number of choices is given by the
product (n)(n – 1)(n – 2)(n – 3)...(n – r + 1). But remember that we have a short-
hand notation for a related product, (n)(n – 1)(n – 2)(n – 3)...(3)(2)(1) = n!, which is
called n factorial or factorial n. Similarly, r! = (r)(r – 1)(r – 2)(r – 3)... (3)(2)(1), and (n
– r)! = (n – r)(n – r – 1) ((n – r – 2)...(3)(2)(1). Then the total number of choices, which
is called the number of permutations of n items taken r at a time, is

𝒏! 𝒏(𝒏−𝟏)(𝒏−𝟐)…(𝟐)(𝟏)
𝒏𝑷𝒓 = (𝒏−𝒓)!
= (𝒏−𝒓)(𝒏−𝒓−𝟏)…(𝟑)(𝟐)(𝟏)
(1.6)

By definition, 0! = 1. Then the number of choices of n items taken n at a time is nPn


= n!.

Example 1.8
An engineer in technical sales must visit plants in Vancouver, Toronto, and
Winnipeg. How many different sequences or orders of visiting these three plants
are possible?

Answer
The number of different sequences is equal to 3P3 = 3! = 6 different permutations.
This can be verified by the following tree diagram:

ENGR. JEFFY JONES F. FETALVERO 12


ENGINEERING DATA ANALYSIS BASIC PROBABILITY

Figure 1.5. Tree Diagram for Visits to Plants

(b) The calculation of permutations is modified if some of the items cannot be


distinguished from one another. We speak of this as calculation of the number of
permutations into classes. We have already seen that if n items are all different,
the number of permutations taken n at a time is n!. However, if some of them are
indistinguishable from one another, the number of possible permutations is
reduced. If n1 items are the same, and the remaining (n–n1) items are the same
𝑛!
of a different class, the number of permutations can be shown to be 𝑛1!(𝑛−𝑛1)!. The
numerator, n!, would be the number of permutations of n distinguishable items
taken n at a time. But n1 of these items are indistinguishable, so reducing the
1
number of permutations by a factor , and another (n – n1) items are not
𝑛1!
distinguishable from one another, so reducing the number of permutations by
1
another factor (𝑛−1)! . If we have a total of n items, of which n1 are the same of
one class, n2 are the same of a second class, and n3 are the same of a third class,
𝑛!
such that n1 + n2 + n3 = 1, the number of permutations is .
𝑛1! 𝑛2! 𝑛3!

Example 1.9
A machinist produces 22 items during a shift. Three of the 22 items are defective
and the rest are not defective. In how many different orders can the 22 items be
arranged if all the defective items are considered identical and all the non-
defective items are identical of a different class?

Answer
The number of ways of arranging 3 defective items and 19 non-defective items is

22!
= 𝟏𝟓𝟒𝟎 𝐰𝐚𝐲𝐬
3! 19!

ENGR. JEFFY JONES F. FETALVERO 13


ENGINEERING DATA ANALYSIS BASIC PROBABILITY

Another modification of calculation of permutations gives circular permutations.


If n items are arranged in a circle, the arrangement doesn’t change if every item
is moved by one place to the left or to the right. Therefore, in this situation one
item can be placed at random, and all the other items are placed in relation to
the first item. Thus, the number of permutations of n distinct items arranged in a
circle is (n – 1)!.

The principal use of permutations in probability is as a multiplying factor that gives


the number of ways in which a given set of items can be arranged.

(c) Combinations are similar to permutations, but with the important difference
that combinations take no account of order. Thus, AB and BA are different
permutations but the same combination of letters. Then the number of
permutations must be larger than the number of combinations, and the ratio
between them must be the number of ways the chosen items can be arranged.
Say on an examination we have to do any eight questions out of ten. The number
10!
of permutations of questions would be 10P8 = . Remember that the number of
2!
ways in which eight items can be arranged is 8!, so the 1/8!. Then the number of
10! 1
combinations of 10 distinguishable items taken 8 at a time is ( 2! )(8!). In general,
the number of combinations of n items taken r at a time is

𝒏𝑷𝒓 𝒏!
𝒏𝑪𝒓 = = (𝒏−𝒓)!𝒓!
(1.7)
𝒓!

nCr gives the number of equally likely ways of choosing r items from a group of n
distinguishable items. That can be used with the classical approach to probability.

Example 1.10
In a group of 10 boys and 15 girls,
a. How many combinations of 6 students are possible?
b. How many combinations are possible if the group must consist 2 boys and
4 girls?

Answer
For the first question, we must create a group of 6 students regardless of how
many boys or girls are in each group. Therefore, we can use directly the formula
for combination considering n as 10 + 15 = 25 and r = 6.

25!
25C6 = 19!6! = 𝟏𝟕𝟕, 𝟏𝟎𝟎 𝐜𝐨𝐦𝐛𝐢𝐧𝐚𝐭𝐢𝐨𝐧𝐬

ENGR. JEFFY JONES F. FETALVERO 14


ENGINEERING DATA ANALYSIS BASIC PROBABILITY

For the second question, we must find how many groups of 2 are we going to
create with 10 boys. The same goes with the girls. Then, we can use the
multiplication rule to compute for the total combinations.

10!
10C2 = = 45 combinations for boys
8!2!

15!
15C4 = 11!4! = 1365 combinations for girls

Now for the total combinations we have 45 x 1365 = 61,425 combinations

ENGR. JEFFY JONES F. FETALVERO 15

You might also like