Discrete Probability
Contents
6.3. Discrete Probability#
Now that we know how to count objects, permutations, and combinations, a natural extension is to ask what is the chance or probability of a particular permutation, combination, etc. actually occurring?
First, let’s get some terminology.
6.3.1. Finite Probability#
Finite probability derives from Pierre-Simon Laplace’s classic theory of probability. In this context we have three key terms.
Definition (experiment)
An experiment is a procedure which yields a particular outcome from a set of possible outcomes.
Definition (sample space)
The sample space of an experiment is the set of all possible outcomes.
Definition (event)
An event is a subset of a sample space.
The simplest method of determining the chance of a particular outcome occurring is counting the number of occurrence of that outcome and dividing by the total number of possible outcomes.
If you roll a fair 6-sided die, there is
When we can do simple counting and division to compute probability, the outcomes are called equally likely.
Definition (equally likely outcomes)
In a finite sample space
In a sample space of equally likely outcomes, we always have
In probability theory a classic problem is an “urn” filled with colored marbles.
Fig. 6.4 An urn filled with 5 blue marbles and 5 green marbles.#
An urn of marbles
In an urn filled with
There are
The event
Rolling dice
What is the probability of rolling two fair 6-sided dice and having their sum equal 9?
There are
Of those outcomes there are
With and without replacement#
When taking a sample (one step in an experiment), there are different ways for that sample to interact with the next.
“With replacement” means that a sample does not affect the probability of the next.
“Without replacement” means that a sample does affect the probability of the next.
This terminology comes again from the classic example of choosing marbles from urns.
Urns and replacement
Assume that an urn contains
The first marble is put back into the urn before choosing the second (with replacement), and
The first marble is not put back into the urn (without replacement).
Solution:
With replacement, there are
possible outcomes by the product rule. On the first choice marbles are blue. On the second choice marbles are green. There is a chance of drawing blue on the first draw. There is an chance of drawing green on the second draw. In total, the number of outcomes which have blue first and green second is . .Without replacement, there are
possible outcomes, since the first choice reduces the number of outcomes of the second choice. Therefore, possible outcomes. There are still outcomes which have blue first and green second. Thus, the total probability is
Probability of Complements and Unions#
If we know the probability of an event occurring, what is the probability of an event not occurring?
Theorem
Let
Proof: The sample space is finite. We know that
Bits of probability
The bits of a byte are chosen randomly. What is the probability
that at least one bit is
Let
For each bit we have two choices:
Therefore, the probability of having at least one bit being
So we know how to compute the probability of an event not occurring. The next obvious question is: what are the chances that either one of two events occurs?
Theorem
Let
Proof: this follows directly from the inclusion-exclusion principle applied to the sets
Probability of divisibility
Given a randomly chosen positive integer less than
Every third number is divisible by
But, how many numbers are divisible by
Thus, the probability of the number being divisible by
The Monty Hall Problem
The Monty Hall problem is a classical probability argument applied to a game show.
You have three closed boxes to choose from. Two contain squids, and one contains gold!
Choosing a box at random, you have a
Of the two remaining unchosen boxes, the host opens one which contains a squid. They present you with this question: stick with your first choice or switch your box for the remaining closed box. Which do you do?
Probability says you should always switch.
On your first choice, the probability of choosing the gold is
6.3.2. Exercises#
Exercise 6.11
In a lottery, the grand prize occurs when a player picks the same four digits, in order, as those chosen by a random mechanical process. Assume repeated numbers are allowed. What is the probability of winning? What is the probability of getting 3 out of 4 numbers correct?
Solution to Exercise 6.11
There are
To match exactly three digits, one of the four must be incorrect.
To be incorrect, there are
Therefore, the probability of matching exactly
Exercise 6.12
In a lottery, a winner is determined by choosing
Solution to Exercise 6.12
The set
Exercise 6.13
In a roll of two 6-sided fair dice,
what is the probability that the sum
of the numbers showing on the dice is less than
Solution to Exercise 6.13
There are
If the first dice is
, the other can beIf the first dice is
, the other can beIf the first dice is
, the other can beIf the first dice is
, the other can be
The total number of outcomes totally less than
Exercise 6.14
In 5-card poker, 5 cards from a standard 52-card is dealt to each player.
What is the probability of being dealt a flush (all 5 cards of the same suit)?
What is the probability of being dealt a flush or a straight (5 cards, of any suit, in sequence; Ace is high or low)?
Solution to Exercise 6.14
There are
How many different flushes are there?
How many different straights are there?
A-5, 2-6, 3-7, 4-8, 5-9, 6-10, 7-J, 8-Q, 9-K, 10-A.
10 different straights, ignoring suit. Including suit, each card can be 1 of 4 suits.
Now, how many straight flushes are there? For each suit there are