Section 2.6 Probability and Expectation
Download
Report
Transcript Section 2.6 Probability and Expectation
Section 2.6 Probability and Expectation
• Cryptanalyzing the Vigenere cipher is not
a trivial process.
• A probabilistic method that allows one to
determine the likely keyword length is the
first step in breaking this cipher.
• In this section we cover the basic methods
of counting things…
Permutations
• Factorial: If n is a nonnegative integer,
then n factorial, denoted n!, is defined as:
– n! = n(n-1)(n-2)…2*1
– Note: 0! = 1, and 1! = 1, by definition.
– Example 1: Calculate 3!, 5!, 186!, 10! / 9!
– Example 2: Seating Arrangements
• Permutation: A permutation of a set of
objects is a listing of the objects in some
specified order…
Permutations
•
•
•
•
Example 3: Batting Orders
Example 4: Beauty Pageant
Example 5: License Plates
Formula for permutation: If you have n
things to choose from and you select k of
those things, without replacement (You
cannot select an item more than once),
and the order matters (AB is different then
BA), then P(n, k) = n! / (n – k)!...
Combinations
• A combination is similar to a permutation except
that order does not matter. AB and BA are the
same.
• Example 6: Five Shirts
• Definition of Combinations
• Example 7: Compute
• Example 8: Five Shirts revisited
• Example 9: Committee
• Example 10: Officers of Committee…
Basic Probability
• Definition: The sample space of an experiment is the
set of all possible outcomes of an experiment.
• Example 11: Single Die Sample Space
• Definition: An event is any subset of the sample space.
• Example 12: Some Events of Single Die
• Definition of Probability: The probability of an event is a
number between 0 and 1 that represents the chance of
an event occurring. If A is an event, then P(A) = (the
number of ways that event A can occur) / (total number
of outcomes that occurs in the sample space)…
Probability of Events
• Example 13: Rolling Die
• Facts about Probability:
– Given the probability P of an event occurring
• 0≤P≤1
• Given two events A and B that are mutually exclusive (A and
B are separate) then
• P(A or B) = P(A) + P(B)
• Example 14: Roll a single die
• Given the probability of an event A, then the
probability of not A is: P(not A) = 1 – P(A).
• Example 15: Not rolling 5…
Probabilities
• The sum of all the probabilities of mutually
exclusive events in a sample space is
equal to 1.
• Example 16: Equal 1 probability
• Example 17: Toss two Die…
Probability of Simultaneous Events
• Multiplication Principle of Probability
• Example 18: Without Replacement…!