please solve this please
2. Probability and Bayes Rule [14 points] You have just purchased a two-sided die, which can come up either 1 or 2. You want to use your crazy die in some betting games with friends later this evening, but first you want to know the probability that it will roll a 1. You know know it came either from factory 0 or factory 1, but not which. Factory 0 produces dice that roll a 1 with probability do- Factory 1 produces dice that roll a 1 with probability 61. You believe initially that your die came from factory 1 with probability m. (a) [2 points] Without seeing any rolls of this die, what would be your predicted probability that it would roll at 1? (b) [2 points] If we roll the die and observe the outcome, what can we infer about where the die was manufactured? (c) [4 points] More concretely, let's assume that: . do = 1: dice from factory 0 always roll a 1 . dy = 0.5: dice from factory 1 are fair (roll a 1 with probability 0.5) . m =0.7: we think with probability 0.7 that this die came from factory 1 Now we roll it, and it comes up 1! What is your posterior distribution on which factory it came from? What is your predictive distribution on the value of the next roll? (d) [2 points] You roll it again, and it comes up 1 again. Now, what is your posterior distribution on which factory it came from? What is your predictive distribution on the value of the next roll? (e) [2 points] Instead, what if it rolls a 2 on the second roll? (f) [2 points] In the general case (not using the numerical values we have been using) prove that if you have two observations, and you use them to update your prior in two steps (first conditioning on one observation and then conditioning on the second), that no matter which order you do the updates in you will get the same result