1. Consider a $$\text{Binomial}(K, p)$$ distribution.

1. Is a Binomial random variable discrete or continuous? Use the words support and finite in your answer.

2. Pick values for the population parameters $$K$$ and $$p$$, store them as variables.

3. Use rbinom(N, K, p) to randomly generate observations from the Binomial distribution and store them in a variable.

4. Explain two of these observations in complete English sentences.

5. Estimate $$P(X = x)$$ for some value $$0 < x < K$$.

6. Interpret this number in context of the data.

7. Estimate $$P(X \geq x)$$ for some value $$0 < x < K$$.

8. Interpret this number in context of the data.

9. Use table() and prop.table() to create a dataframe of the density function evaluated at each point in the support of your Binomial data. Your dataframe should have two columns, one for the values in the support $$\text{Binomial}(K, p)$$ and one for the estimates of the density function.

10. Use ggplot() to plot the estimated density function.

11. Challenge. Use choose() to calculate the true density function at each value in the support of $$\text{Binomial}(K, p)$$ and add this as a column to your dataframe. Hint: you can assign into df\$newname. Then overlay the estimated density function, in orange, over the true density function, in blue, in one plot.

2. Consider the dataset orion. Use the Exponential distribution to analyze these data.

1. Is a Exponential random variable discrete or continuous? Use the words support and infinite in your answer.

2. Write a sentence, in your own words, explaining this dataset and why the Exponential distribution is appropriate for the variable diff.

3. Use ggplot() to make a histogram of the variable diff.

4. Use ggplot() to make a density plot of the variable diff.

5. Challenge. See if you can overlay the two plots. Hint: see this stackoverflow post.

6. Use the likelihood method to estimate the population parameter $$\lambda$$ for the variable diff.

7. Interpret your estimate in context of the data.

8. Estimate the expected value of the variable diff.

9. Interpret your estimate in context of the data.