Please use D2L to turn in both the HTML output and your R Markdown file in.

### Q1. (4 pts)

Describe the differences between probability density functions and probability mass functions.

### Q2. (8 pts)

Assume you have been given a *special* set of dice and tasked with learning the probabilities of each side being rolled. Desribe the 5 steps of a Bayesian data analysis in the context of this problem.

### Q3 (8 pts)

After a recent Strangers Things binge, you have taken up board games. Your roommate Billy Hargrove challenges you to a game of Risk. To understand the strategy you need to think about the following scenario:

- an attacking team rolls three dice and the defending team rolls two dice.
- each team’s highest two rolls are compared in a pair, for instance if the attacking team rolls (6-4-2) and defending team rolls (4-4), then the pairs would be (6-4) and (4-4).
- within each pair, if there are any ties the defending team wins that outcome.

Specifically if:

- attacking team rolls (6-4-2) and defending team rolls (4-4), each team wins one point.
- attacking team rolls (6-6-2) and defending team rolls (6-6), defending team wins two points.
- attacking team rolls (5-4-2) and defending team rolls (4-2), attacking team wins two points

**Estimate the probability that the attacking team wins two points**. This can be done analytically or through simulation.

```
attack <- sample(x = 1:6, size = 3, replace = T)
defend <- sample(x = 1:6, size = 2, replace = T)
```