Random Math 2
Random Math 2
Random Math 2
Chapter 2: Probability
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
In the study of statistics, we are concerned basically with the presentation and interpre-
tation of chance outcomes that occur in a planned study or scientific investigation. For
example, we may record the number of accidents that occur monthly at the intersection
of Driftwood Lane and Royal Oak Drive, hoping to justify the installation of a traffic light;
we might classify items coming off an assembly line as "defective" or "nondefective"; or
we may be interested in the volume of gas released in a chemical reaction when the
concentration of an acid is varied. Hence, the statistician is often dealing with either nu-
merical data, representing counts or measurements, or categorical data, which can
be classified according to some criterion.
We shall refer to any recording of information, whether it be numerical or categorical, as
an observation. Thus, the numbers 2, 0, 1, and 2, representing the number of accidents
that occurred for each month from January through April during the past year at the
intersection of Driftwood Lane and Royal Oak Drive, constitute a set of observations.
Similarly, the categorical data N, D, N, N, and D, representing the items found to be
defective or nondefective when five items are inspected, are recorded as observations.
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Statisticians use the word experiment to describe any process that generates a set of
data. A simple example of a statistical experiment is the tossing of a coin. In this
experiment, there are only two possible outcomes, heads or tails. Another experiment
might be the launching of a missile and observing of its velocity at specified times.
We are particularly interested in the observations obtained by repeating the experiment
several times.
In most cases, the outcomes will depend on chance and, therefore, cannot be predicted
with certainty. If a chemist runs an analysis several times under the same conditions,
he or she will obtain different measurements, indicating an element of chance in the
experimental procedure. Even when a coin is tossed repeatedly, we cannot be certain
that a given toss will result in a head. However, we know the entire set of possibilities
for each toss.
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Definition
The set of all possible outcomes of a statistical experiment is called the sample space
and is represented by the symbol S.
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
For any given experiment, we may be interested in the occurrence of certain events
rather than in the occurrence of a specific element in the sample space. For instance,
we may be interested in the event A that the outcome when a die is tossed is divisible
by 3. This will occur if the outcome is an element of the subset A = {3, 6}.
Definition
An event is a subset of a sample space consisting of basic outcomes. The null
(impossible) event represents the absence of a basic outcome and is denoted by ∅.
An event is said to occur if the random experiment results in one of the basic outcomes
in that event.
In the experiment of rolling a die the basic outcomes are 1, 2, 3, 4, 5, and 6, so S =
{1, 2, 3, 4, 5, 6}. Let A be the event that the number on the die is even and B be the
event that the number on the die is odd. Then A = {2, 4, 6} ⊂ S and B = {1, 3, 5} ⊂ S.
Event A is said to be occur if and only if the result of the experiment is one of 2, 4, or 6.
Similarly, event B occurs if and only if the result of the experiment is 1, 3, or 5.
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
The union of A and B, denoted by A ∪ B, is the set of all basic outcomes in S that
belong to at least one of A and B.
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Definition
If the events A and B have no common basic outcomes, they are called mutually
exclusive and A ∩ B = ∅.
Note: For any event A, A and Ā are always mutually exclusive!
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
One of the problems that the statistician must consider and attempt to evaluate is the
element of chance associated with the occurrence of certain events when an experiment
is performed. These problems belong in the field of probability.
In many cases, we shall be able to solve a probability problem by counting the number
of points in the sample space without actually listing each element.
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. In a medical study patients are classified according to their blood types (A,
B, AB, and 0) and according to their blood pressure levels (low, normal, and high). In
how many different ways a patient can be classified?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. How many different outcomes are possible if a coin is tossed twice and a die
is rolled?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
1. Number of orderings
We begin with the problem of ordering. Suppose that we have x objects that are to be
placed in order in such a way that each object may be used only once.
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
2. Permutations
Suppose that now we have n objects with which the x ordered boxes could be filled
(n > x) in such a way that each object may be used only once.
The total number of permutations of x object chosen from n, Pxn , is the number of pos-
sible arrangements when x objects are to be selected from a total of n and arranged
in order. This number is
n!
Pxn = n (n − 1) (n − 2) · · · (n − x + 2) (n − x + 1) = .
(n − x)!
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
3. Combinations
Suppose that we are interested in the number of different ways that x can be selected
from n (where no object may be chosen more than once) but the order is not important.
The number of combinations of x object chosen from n, Cxn , is the number of possible
selections that can be made. This number is
n!
Pxn (n−x)! n! n
Cxn = = = = .
x! x! (n − x)!x! x
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. In how many different ways can a person invite three of her eight closest
friends to a party?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. In how many ways can we choose three letters from A,B,C,D
a) if the order is important?
b) if the order is not important?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. In how many different ways can the letters in UNUSUALLY be arranged?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. Consider a shuffled deck of 52 cards. In how many different ways can an Ace
(A) be drawn?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Probability of an Event
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Suppose that a random experiment is to be carried out and we want to determine the
probability that a particular event will occur.
There are three definitions of probability:
1 Classical probability
2 Relative frequency probability
3 Subjective probability
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Classical Probability
Definition
Classical probability is the proportion of times that an event will occur (assuming that
all outcomes in a sample space are equally likely to occur). The probability of an
event A is
n (A)
P (A) = ,
n (S)
where n (A) is the number of outcomes that satisfy the condition of event A and n (S) is
the total number of outcomes in the sample space.
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. If two dice are rolled, what is the probability that the sum of the upturned
faces will equal 7?
Solution.
n(A) 6 1
Therefore, P (A) = n(S)
= 36
= 6
= 0.1667.
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. There are five laptops of which three are brand A and two are brand B. Two
of them will be chosen at random.
a) Find the sample space.
b) Define the event E by "One brand A and one brand B laptops will be chosen." and
list the elements of event E.
c) What is the probability that one brand A and one brand B laptops will be chosen?
(Find P (E).)
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. Suppose that there are ten brand A, five brand B, and four brand C laptops
and three of them will be chosen at random. What is the probability that two of them will
be brand A and one will be brand C?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Rules of Probability
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. The probability of A is 0.60, the probability of B is 0.45, and the probability of
both is 0.30.
a) What is the probability of either A and B?
b) What are P Ā and P B̄ ?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. A pair of dice is rolled. If A is the event that a total of 7 is rolled and B is the
event that at least one die shows up 4, find the probabilities for A, B, A ∩ B, and A ∪ B.
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. A corporation has just received new machinery that must be installed and
checked before it becomes operational. The accompanying table shows a manager’s
probability assessment for the number of days required before the machinery becomes
operational.
Number of days 3 4 5 6 7
Probability 0.08 0.24 0.41 0.20 0.07
Let A be the event "It will be more than four days before the machinery becomes op-
erational." and let B be the event "It will be less than six days before the machinery
becomes available."
a) P (A) =?
b) P (B) =?
c) P Ā =?
d) P (A ∩ B) =?
e) P (A ∪ B) =?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. Suppose the manufacturer’s 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.
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Conditional Probability
Suppose that two fair dice were rolled and we saw that one of them is 3. Under this
condition, what is the probability of getting a total of 5?
Solution.
Since we know that one of the the dice is 3, we will be dealing with the restricted sample
space
SR = {(1, 3) , (2, 3) , (3, 1) , (3, 2) , (3, 3) , (3, 4) , (3, 5) , (3, 6) , (4, 3) , (5, 3) , (6, 3)}
instead of the whole sample space S = {(1, 1) , (1, 2) , . . . (6, 6)} consisting of 36 basic
outcomes.
2
Therefore the desired event is {(2, 3) , (3, 2)} and the desired probability is 11
= 0.1818.
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Definition
Let A and B be two events. The conditional probability of event A, given that event
B has occurred, is denoted by P (A|B) and is defined as
P (A ∩ B)
P (A|B) = , provided that P (B) > 0.
P (B)
Similarly, the conditional probability of event B, given that event A has occurred is
P (A ∩ B)
P (B|A) = , provided that P (A) > 0.
P (A)
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. An international cargo company knows that 75% of its customers prefer
shipments with SMS support while 80% prefer shipments with internet support. It is
also known that 65% of the customers prefer both. What are the probabilities that
a) a customer who prefer SMS support will also prefer internet support?
b) a customer who prefer internet support will also prefer SMS support?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. The probability that there will be a shortage of cement is 0.28 and the prob-
ability that there will not be a shortage of cement and a construction job will be finished
on time is 0.64. What is the probability that the construction job will be finished on time
given that there will not be a shortage of cement?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Definition
Let A and B be two events. Using the definitions of conditional probabilities P (A|B)
and P (B|A), we have
P (A ∩ B) = P (A|B) P (B)
P (A ∩ B) = P (B|A) P (A) .
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. 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?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Statistical Independence
Definition
Let A and B be two events. A and B are said to be statistically independent if and
only if
P (A ∩ B) = P (A) P (B) .
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
P (A ∩ B) P (A) P (B)
P (A|B) = = = P (A) , provided that P (B) > 0
P (B) P (B)
and
P (A ∩ B) P (A) P (B)
P (B|A) = = = P (B) , provided that P (A) > 0.
P (A) P (A)
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
We can write any event A as the union of the two mutually exclusive events E ∩ A and
E 0 ∩ A. Hence, A = (E ∩ A) ∪ (E 0 ∩ A) and
P (E ∩ A) ∪ E 0 ∩ A
P (A) =
P (E ∩ A) + P E 0 ∩ A
=
P (A|E) P (E) + P A|E 0 P E 0 .
=
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Theorem
If B1 , B2 , . . . , Bk are mutually exclusive and collectively exhaustive events such that P (Bi ) 6= 0 i = 1, 2, . . . k,
then for any event A of S
Xk Xk
P (A) = P (Bi ∩ A) = P (A|Bi ) P (Bi )
i=1 i=1
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Bayes’ Rule
Instead of asking for P (A), suppose that we now consider the problem of finding the
conditional probability P (Bi |A).
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Theorem
If E1 , E2 , . . . , EK are mutually exclusive and collectively exhaustive events such that P (Ei ) 6= 0 i = 1, 2, . . . K ,
then for any event A in S such that P (A) 6= 0
P (A|Ei ) P (Ei )
P (Ei |A) =
P (A|E1 ) P (E1 ) + P (A|E2 ) P (E2 ) + · · · + P (A|EK ) P (EK )
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. A hotel rents cars for its guests from three rental agencies. It is known that
25% are from agency X , 25% are from agency Y , and 50% are from agency Z . If 8%
of the cars from agency X , 6% from agency Y , and 15% from agency Z need tune-ups,
what is the probability that a car needing a tune-up come from agency Y ?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. A life insurance salesman finds that, of all the sales he makes, 70% are to
people who already own policies. He also finds that, of all contacts for which no sale is
made, 50% already own life insurance policies. Furthermore, 40% of all contacts result
in sales. What is the probability that a sale will be made to a contact who already owns
a policy?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Example. A record-store owner assesses customers entering the store as high school
age, college age, or older, and finds that of all customers 30%, 50%, and 20%, respec-
tively, fall into these categories. The owner also found that purchases were made by
20% of high school age customers, by 60% of college age customers, and by 80% of
older customers.
a) What is the probability that a randomly chosen customer entering the store will
make a purchase?
b) If a randomly chosen customer makes a purchase, what is the probability that this
customer is high school age?
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability
Sample Space and Events
Counting Sample Points
Probability of an Event
Conditional Probability, the Product Rule, and Independence
Bayes’ Rule
Chapter 2: Probability