40
2. Counting and Probability

2. Counting and Probability - Modern States

  • Upload
    others

  • View
    14

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 2. Counting and Probability - Modern States

2. Counting and Probability

Page 2: 2. Counting and Probability - Modern States

2.1.1 Factorials

2.1.2 Combinatorics

2.2.1 Probability Theory

2.2.2 Probability Examples

Page 3: 2. Counting and Probability - Modern States

2.1.1 Factorials

Page 4: 2. Counting and Probability - Modern States

• Combinatorics is the mathematics of counting. It can be quite delicate.

• Two important notions for us are those of combinations and permutations.

• In order to define these, we need the notion of factorial and binomial coefficient.

Combinatorics

Page 5: 2. Counting and Probability - Modern States

Factorial!• The factorial of a number is simply

the product of itself with all positive integers less than it.

• By convention, . • It is possible to define the factorial

for non-integers, but this quite advanced and is not part of the CLEP.

• When computing with factorials, it is helpful to write out the multiplication explicitly, as there are often cancellations to be made.

0! = 1

Page 6: 2. Counting and Probability - Modern States

n! = n⇥ (n� 1)⇥ (n� 2)⇥ ...⇥ 2⇥ 1

1! = 1

2! = 2

3! = 6

4! = 24

✓n

k

◆=

n!

k!(n� k)!

Formulas and Notations

Page 7: 2. Counting and Probability - Modern States

Compute the following:

5!

Page 8: 2. Counting and Probability - Modern States

6!

5!

Page 9: 2. Counting and Probability - Modern States

n!

(n� 1)!

Page 10: 2. Counting and Probability - Modern States

0!

2!

Page 11: 2. Counting and Probability - Modern States

✓6

2

Page 12: 2. Counting and Probability - Modern States

✓3

3

Page 13: 2. Counting and Probability - Modern States

✓7

0

Page 14: 2. Counting and Probability - Modern States

✓5

3

Page 15: 2. Counting and Probability - Modern States

2.1.2 Combinatorics

Page 16: 2. Counting and Probability - Modern States

Counting with Factorials• Factorials are useful for combinatorics, i.e.

problems involving counting. • Given objects, the number of groups of size

when order doesn’t matter is

• Given objects, the number of groups of size when order matters is .

✓n

k

◆=

n!

k!(n� k)!

n k

n kn!

(n� k)!

Page 17: 2. Counting and Probability - Modern States

How many groups of 3 from 10 are possible, if order matters?

Page 18: 2. Counting and Probability - Modern States

If order doesn’t matter?

Page 19: 2. Counting and Probability - Modern States

How many codes of length 2 may be generated from the letters {A,B,C,D,E,D} if the letters cannot be repeated, and order matters?

Page 20: 2. Counting and Probability - Modern States

What if repeats were allowed?

Page 21: 2. Counting and Probability - Modern States

2.2.1 Probability Theory

Page 22: 2. Counting and Probability - Modern States

Probability• Probability in mathematics quantifies random

events. • It is a large subject with a rich history; we focus on a

few basic ideas. • We consider the probability that events occur:

• Our goal is to understand how to compute such probabilities.

• Note that all probabilities have values between 0 and 1.

P(A)

Page 23: 2. Counting and Probability - Modern States

Notation• Let be any two events. • The union of is the event that either

occurs. It is denoted . • The intersection of is the event the that

both occur. It is denoted . • The complement of is the event that does not

occur. It is denoted . • There are some principle that dictate how to

compute these quantities.

A,BA,B A or B

A [BA,B

A and B A \BA AAc

Page 24: 2. Counting and Probability - Modern States

Basic Principles• Union Law:

• Events are independent if:

• The conditional probability of on is

• The law of the complement states

P(A [B) = P(A) + P(B)� P(A \B)

A,B

P(A \B) = P(A)P(B)

A B

P(A|B) =P(A \B)

P(B)

P(Ac) = 1� P(A)

Page 25: 2. Counting and Probability - Modern States

2.2.1 Probability Theory

Page 26: 2. Counting and Probability - Modern States

Probability• Probability in mathematics quantifies random

events. • It is a large subject with a rich history; we focus on a

few basic ideas. • We consider the probability that events occur:

• Our goal is to understand how to compute such probabilities.

• Note that all probabilities have values between 0 and 1.

P(A)

Page 27: 2. Counting and Probability - Modern States

Notation• Let be any two events. • The union of is the event that either

occurs. It is denoted . • The intersection of is the event the that

both occur. It is denoted . • The complement of is the event that does not

occur. It is denoted . • There are some principle that dictate how to

compute these quantities.

A,BA,B A or B

A [BA,B

A and B A \BA AAc

Page 28: 2. Counting and Probability - Modern States

Basic Principles• Union Law:

• Events are independent if:

• The conditional probability of on is

• The law of the complement states

P(A [B) = P(A) + P(B)� P(A \B)

A,B

P(A \B) = P(A)P(B)

A B

P(A|B) =P(A \B)

P(B)

P(Ac) = 1� P(A)

Page 29: 2. Counting and Probability - Modern States

2.2.1 Probability Theory

Page 30: 2. Counting and Probability - Modern States

Probability• Probability in mathematics quantifies random

events. • It is a large subject with a rich history; we focus on a

few basic ideas. • We consider the probability that events occur:

• Our goal is to understand how to compute such probabilities.

• Note that all probabilities have values between 0 and 1.

P(A)

Page 31: 2. Counting and Probability - Modern States

Notation• Let be any two events. • The union of is the event that either

occurs. It is denoted . • The intersection of is the event the that

both occur. It is denoted . • The complement of is the event that does not

occur. It is denoted . • There are some principle that dictate how to

compute these quantities.

A,BA,B A or B

A [BA,B

A and B A \BA AAc

Page 32: 2. Counting and Probability - Modern States

Basic Principles• Union Law:

• Events are independent if:

• The conditional probability of on is

• The law of the complement states

P(A [B) = P(A) + P(B)� P(A \B)

A,B

P(A \B) = P(A)P(B)

A B

P(A|B) =P(A \B)

P(B)

P(Ac) = 1� P(A)

Page 33: 2. Counting and Probability - Modern States

2.2.2 Probability Examples

Page 34: 2. Counting and Probability - Modern States

Draw one card from a full deck of 52, well-shuffled.

P(diamond or Queen)

Page 35: 2. Counting and Probability - Modern States

P(ace or King)

Page 36: 2. Counting and Probability - Modern States

P(diamond or club)

Page 37: 2. Counting and Probability - Modern States

Roll a die twice

P(roll 1 2 and roll 2 3)

Page 38: 2. Counting and Probability - Modern States

P(sum of rolls = 7)

Page 39: 2. Counting and Probability - Modern States

P(second roll di↵erent from first)

Page 40: 2. Counting and Probability - Modern States

For two events A,B, suppose P(A) =

1

2

,P(B) =

1

2

,P(A \B) =

1

3

.

Are A,B independent?