This assignment is designed to review the materials you learn in the lab. Be sure to comment your code to clarify what you are doing. Not only does it help with grading, but it will also help you when you revisit it in the future. Please post any questions on Piazza.

1) Checking Intuition

Think about the research you are interested in. Give one example of a you might use, and what each of \(x\), \(p\), and \(1-p\) would mean in that context. For example, JDW studies municipal dissolution in the United States. For him, \(x = 1\) means a municipality successfully dissolved with probability \(p\) and \(x = 0\) means a municipality failed to dissolve with probability \((1-p)\).

2) Math

Let \(X\) be a random variable with the following PMF: \[\begin{equation*} \mathbb{P}(X = x) = f_X(x) = \begin{cases} cx & \text{if } x \in [1,5]\\ 0 & \text{otherwise} \end{cases} \end{equation*}\]

Solve for \(c\) (hint: \(\displaystyle \sum_{j=1}^{\infty} \mathbb{P}(X = x_j) = 1\)).

3) Coding in R

Let \(X \sim \text{Bin}(n = 15, p = 0.75)\) and \(Y \sim \text{Bern}(p = 0.4)\). Finally, let \(Z = \mathbb{P}(X = 8) + \mathbb{P}(Y = 0)\). What is \(Z\)?