## Description

See the attachments below for more details.

**Attachment preview**

1. Suppose that we have two bags each containing black and white balls. One bag contains three times as many white balls as blacks. The other bag contains three times as many black balls as white. Suppose we choose one of these bags at random. For this bag we select five balls at random, replacing each ball after it has been selected. The result is that we find 4 white balls and one black. What is the probability what we were using the bag with mainly white balls?

### Unformatted Attachment Preview

Purchase answer to see full attachment

## Explanation & Answer

Here is your assignment :). Let me know if you need more help :)

1

Question 4 - MLE and Naive Bayes - 10 points

1. Solution:

𝑃(𝑎1 |𝐵) =

𝑃(𝐵|𝑎1 ) ∗ (𝑃(𝑎1 )

𝑃(𝐵|𝑎1) ∗ 𝑃(𝑎1 ) + 𝑃(𝐵|𝑎1 ) ∗ 𝑃(𝑎2 )

The probability of a b (bags with mostly while balls):

3 4 1 1

5

𝑃(𝐵|𝑎1 ) = ( ) ( ) ( )

1 4

4

=

𝟒𝟎𝟓

𝟏𝟎𝟐𝟒

Similarly:

1 4 3 1

5

𝑃(𝐵|𝑎2 ) = ( ) ( ) ( )

1 4

4

=

𝟏𝟓

𝟏𝟎𝟐𝟒

Therefore we have:

405

1024

𝑃(𝑎1|𝐵) =

405

15

+

1024 1024

=

405

420

= 𝟎. 𝟗𝟔...