1. Let $$X \sim \text{Uniform(1, 26)}$$.

1. Use a computer to “roll” this 26 sided die $$N = 10$$ times and store the results into a numpy array. Use the function np.random.choice().

2. Estimate the population mean using only the sample you just created.

3. Look at your friend’s answer to 2. Did you two get the exact same number? Why not?

4. Repeat 1. - 3. with $$N = 100$$ and $$N = 1000$$. Did you and your friend get the same answers? Are these estimates more or less reliable than your solution to 1. with $$N = 10$$?

5. Create a variable named seed that stores any integer value you and your friend choose between 1 and 10000.

6. Use the function np.random.seed() to set the seed to the value seed.

7. Repeat 1. - 3. Explain why this time you and your friend got the same answer.

8. What is the true population probability $$P(X = 14)$$?

9. Provide a calculation of $$P(X = 14)$$ using the probability density function for a discrete uniform random variable.

10. Make a line plot with the roll number on the x-axis and the estimated probability of $$P(X = 14)$$ on the y-axis. Use the function bp.line().

2. Let $$X \sim \text{Bernoulli}(p = .314)$$. Recall, the probability $$p$$ is always associated with the value $$1$$.

1. For $$N = 10, 100, 1000$$, flip this unfair coin using the function np.random.choice(). Hint: look up the function documentation to figure out how to assign unequal probabilities.

2. Estimate $$P(X = 1)$$ for each sample size $$N$$.

3. Make a line plot with the flip number on the x-axis and the estimated probability of $$P(X = 1)$$ on the y-axis. Use the function bp.line().