28
Bayesian Probability Examples Conclusion MATH 105: Finite Mathematics 8-1: Bayes’ Formula Prof. Jonathan Duncan Walla Walla College Winter Quarter, 2006

MATH 105: Finite Mathematics 8-1: Bayes' Formula

  • Upload
    others

  • View
    3

  • Download
    1

Embed Size (px)

Citation preview

Bayesian Probability Examples Conclusion

MATH 105: Finite Mathematics8-1: Bayes’ Formula

Prof. Jonathan Duncan

Walla Walla College

Winter Quarter, 2006

Bayesian Probability Examples Conclusion

Outline

1 Bayesian Probability

2 Examples

3 Conclusion

Bayesian Probability Examples Conclusion

Outline

1 Bayesian Probability

2 Examples

3 Conclusion

Bayesian Probability Examples Conclusion

When Trees Don’t Work

In the past few setions we have used tree diagrams to help us workwith conditional probabilities. These questions have been set up sothat the work out easily. For example. . .

Example

A store sells 3 types of CD-Rs: 50% are brand A, 20% are brandB, and the remaining 30% are brand X . It is known that 10% ofthe brand A, 5% of the brand B, and 20% of the brand X CD-Rsare defective.

1 If you pick a brand B CD-R, what is the probability it is good?

2 If you pick a good CD-R, what is the probability it is brand B?

Bayesian Probability Examples Conclusion

When Trees Don’t Work

In the past few setions we have used tree diagrams to help us workwith conditional probabilities. These questions have been set up sothat the work out easily. For example. . .

Example

A store sells 3 types of CD-Rs: 50% are brand A, 20% are brandB, and the remaining 30% are brand X . It is known that 10% ofthe brand A, 5% of the brand B, and 20% of the brand X CD-Rsare defective.

1 If you pick a brand B CD-R, what is the probability it is good?

2 If you pick a good CD-R, what is the probability it is brand B?

Bayesian Probability Examples Conclusion

When Trees Don’t Work

In the past few setions we have used tree diagrams to help us workwith conditional probabilities. These questions have been set up sothat the work out easily. For example. . .

Example

A store sells 3 types of CD-Rs: 50% are brand A, 20% are brandB, and the remaining 30% are brand X . It is known that 10% ofthe brand A, 5% of the brand B, and 20% of the brand X CD-Rsare defective.

1 If you pick a brand B CD-R, what is the probability it is good?

2 If you pick a good CD-R, what is the probability it is brand B?

Bayesian Probability Examples Conclusion

When Trees Don’t Work

In the past few setions we have used tree diagrams to help us workwith conditional probabilities. These questions have been set up sothat the work out easily. For example. . .

Example

A store sells 3 types of CD-Rs: 50% are brand A, 20% are brandB, and the remaining 30% are brand X . It is known that 10% ofthe brand A, 5% of the brand B, and 20% of the brand X CD-Rsare defective.

1 If you pick a brand B CD-R, what is the probability it is good?

2 If you pick a good CD-R, what is the probability it is brand B?

Bayesian Probability Examples Conclusion

More Fun with CD-Rs

Example

It is more difficult to find Pr[B|G ] than Pr[G |B] because of theway the tree is arranged. How can we find Pr[B|G ]?

1 We could reverse the tree, but this is difficult!

2 We can use the formula Pr[B|G ] =Pr[B ∩ G ]

Pr[G ].

Computing Pr[G ]

When we compute Pr[G ] we actually partition the good tapes intoPr[G ∩ A], Pr[G ∩ B] and Pr[G ∩ X ]. Then, adding these togethergives us Pr[G ].

Bayesian Probability Examples Conclusion

More Fun with CD-Rs

Example

It is more difficult to find Pr[B|G ] than Pr[G |B] because of theway the tree is arranged. How can we find Pr[B|G ]?

1 We could reverse the tree, but this is difficult!

2 We can use the formula Pr[B|G ] =Pr[B ∩ G ]

Pr[G ].

Computing Pr[G ]

When we compute Pr[G ] we actually partition the good tapes intoPr[G ∩ A], Pr[G ∩ B] and Pr[G ∩ X ]. Then, adding these togethergives us Pr[G ].

Bayesian Probability Examples Conclusion

More Fun with CD-Rs

Example

It is more difficult to find Pr[B|G ] than Pr[G |B] because of theway the tree is arranged. How can we find Pr[B|G ]?

1 We could reverse the tree, but this is difficult!

2 We can use the formula Pr[B|G ] =Pr[B ∩ G ]

Pr[G ].

Computing Pr[G ]

When we compute Pr[G ] we actually partition the good tapes intoPr[G ∩ A], Pr[G ∩ B] and Pr[G ∩ X ]. Then, adding these togethergives us Pr[G ].

Bayesian Probability Examples Conclusion

More Fun with CD-Rs

Example

It is more difficult to find Pr[B|G ] than Pr[G |B] because of theway the tree is arranged. How can we find Pr[B|G ]?

1 We could reverse the tree, but this is difficult!

2 We can use the formula Pr[B|G ] =Pr[B ∩ G ]

Pr[G ].

Computing Pr[G ]

When we compute Pr[G ] we actually partition the good tapes intoPr[G ∩ A], Pr[G ∩ B] and Pr[G ∩ X ]. Then, adding these togethergives us Pr[G ].

Bayesian Probability Examples Conclusion

Bayes’ Formula

Bayes’ Formula

If S is a sample space partitioned into n events: A1,A2, . . ., An.Then for any event E with Pr[E ] > 0, we have

Pr[Aj |E ] =Pr[Aj ] · Pr[E |Aj ]

Pr[A1] · Pr[E |A1] + . . . + Pr[An] · Pr[E |An]

Process is the Key

Note that the formula, while useful, can be hard to remember. Ifind it easier to remember the basic conditional probability formula:

Pr[A|B] =Pr[A ∩ B]

Pr[B]

and a tree diagram to help find Pr[B].

Bayesian Probability Examples Conclusion

Bayes’ Formula

Bayes’ Formula

If S is a sample space partitioned into n events: A1,A2, . . ., An.Then for any event E with Pr[E ] > 0, we have

Pr[Aj |E ] =Pr[Aj ] · Pr[E |Aj ]

Pr[A1] · Pr[E |A1] + . . . + Pr[An] · Pr[E |An]

Process is the Key

Note that the formula, while useful, can be hard to remember. Ifind it easier to remember the basic conditional probability formula:

Pr[A|B] =Pr[A ∩ B]

Pr[B]

and a tree diagram to help find Pr[B].

Bayesian Probability Examples Conclusion

Outline

1 Bayesian Probability

2 Examples

3 Conclusion

Bayesian Probability Examples Conclusion

Mice in a Cage

Example

There are 8 mice in a cage: 4 white females, 3 white males, and 1gray male. Two mice are selected at random without replacement.

1 Find Pr[ 1st is female | 2nd male ]

2 Find Pr[ 1st is gray | 2nd male ]

Bayesian Probability Examples Conclusion

Mice in a Cage

Example

There are 8 mice in a cage: 4 white females, 3 white males, and 1gray male. Two mice are selected at random without replacement.

1 Find Pr[ 1st is female | 2nd male ]

2 Find Pr[ 1st is gray | 2nd male ]

Bayesian Probability Examples Conclusion

Mice in a Cage

Example

There are 8 mice in a cage: 4 white females, 3 white males, and 1gray male. Two mice are selected at random without replacement.

1 Find Pr[ 1st is female | 2nd male ]

Pr[ 1st F ∩ 2nd M ]

Pr[ 2nd M]=

48 · 4

738 · 3

7 + 18 · 3

7 + 48 · 4

7

=16562856

=16

28=

4

7

2 Find Pr[ 1st is gray | 2nd male ]

Bayesian Probability Examples Conclusion

Mice in a Cage

Example

There are 8 mice in a cage: 4 white females, 3 white males, and 1gray male. Two mice are selected at random without replacement.

1 Find Pr[ 1st is female | 2nd male ]

Pr[ 1st F ∩ 2nd M ]

Pr[ 2nd M]=

48 · 4

738 · 3

7 + 18 · 3

7 + 48 · 4

7

=16562856

=16

28=

4

7

2 Find Pr[ 1st is gray | 2nd male ]

Bayesian Probability Examples Conclusion

Mice in a Cage

Example

There are 8 mice in a cage: 4 white females, 3 white males, and 1gray male. Two mice are selected at random without replacement.

1 Find Pr[ 1st is female | 2nd male ]

Pr[ 1st F ∩ 2nd M ]

Pr[ 2nd M]=

48 · 4

738 · 3

7 + 18 · 3

7 + 48 · 4

7

=16562856

=16

28=

4

7

2 Find Pr[ 1st is gray | 2nd male ]

Pr[ 1st G ∩ 2nd M ]

Pr[ 2nd M ]=

18 · 3

72856

=3562856

=3

28

Bayesian Probability Examples Conclusion

Another Example

Example

Events A1, A2, and A3 form a partition of a sample space S withPr[A1] = 0.30, Pr[A2] = 0.20, and Pr[A3] = 0.50. If E is an eventin S with Pr[E |A1] = 0.01, Pr[E |A2] = 0.02, and Pr[E |A3] = 0.02,compute Pr[E ] and Pr[A2|E ].

Pr[E ] = 0.30(0.01) + 0.20(0.02) + 0.50(0.02) = 0.017

Pr[A2|E ] =Pr[A2 ∩ E ]

Pr[E ]=

0.20(0.02)

0.017≈ 0.2353

Bayesian Probability Examples Conclusion

Another Example

Example

Events A1, A2, and A3 form a partition of a sample space S withPr[A1] = 0.30, Pr[A2] = 0.20, and Pr[A3] = 0.50. If E is an eventin S with Pr[E |A1] = 0.01, Pr[E |A2] = 0.02, and Pr[E |A3] = 0.02,compute Pr[E ] and Pr[A2|E ].

Pr[E ] = 0.30(0.01) + 0.20(0.02) + 0.50(0.02) = 0.017

Pr[A2|E ] =Pr[A2 ∩ E ]

Pr[E ]=

0.20(0.02)

0.017≈ 0.2353

Bayesian Probability Examples Conclusion

Another Example

Example

Events A1, A2, and A3 form a partition of a sample space S withPr[A1] = 0.30, Pr[A2] = 0.20, and Pr[A3] = 0.50. If E is an eventin S with Pr[E |A1] = 0.01, Pr[E |A2] = 0.02, and Pr[E |A3] = 0.02,compute Pr[E ] and Pr[A2|E ].

Pr[E ] = 0.30(0.01) + 0.20(0.02) + 0.50(0.02) = 0.017

Pr[A2|E ] =Pr[A2 ∩ E ]

Pr[E ]=

0.20(0.02)

0.017≈ 0.2353

Bayesian Probability Examples Conclusion

Outline

1 Bayesian Probability

2 Examples

3 Conclusion

Bayesian Probability Examples Conclusion

Important Concepts

Things to Remember from Section 8-1

1 Use the conditional probability formula to compute Baysianprobabilities:

Pr[A|B] =Pr[A ∩ B]

Pr[B]

2 Use a tree to make finding Pr[B] easier to compute.

Bayesian Probability Examples Conclusion

Important Concepts

Things to Remember from Section 8-1

1 Use the conditional probability formula to compute Baysianprobabilities:

Pr[A|B] =Pr[A ∩ B]

Pr[B]

2 Use a tree to make finding Pr[B] easier to compute.

Bayesian Probability Examples Conclusion

Important Concepts

Things to Remember from Section 8-1

1 Use the conditional probability formula to compute Baysianprobabilities:

Pr[A|B] =Pr[A ∩ B]

Pr[B]

2 Use a tree to make finding Pr[B] easier to compute.

Bayesian Probability Examples Conclusion

Next Time. . .

We are done with conditional probability now. Next time we moveon to a specialized situation involiving repeating a particular actionmultiple times. This type of procedure is called a Bernoulli Process.

For next time

Review Section 8-2

Prepare for Quiz on 7-5 and 8-1

Bayesian Probability Examples Conclusion

Next Time. . .

We are done with conditional probability now. Next time we moveon to a specialized situation involiving repeating a particular actionmultiple times. This type of procedure is called a Bernoulli Process.

For next time

Review Section 8-2

Prepare for Quiz on 7-5 and 8-1