Homework 6: Probability, Simulation, Estimation,
and Assessing Models
Reading
:
Randomness
()
Sampling and Empirical Distributions
()
Testing Hypotheses
()
Please complete this notebook by filling in the cells provided. Before you begin, execute the
following cell to load the provided tests. Each time you start your server, you will need to execute
this cell again to load the tests.
Homework 6 is due Thursday, 3/18, at 11:59pm. Start early so that you can come to oﬃce hours if
you're stuck. Check the website for the oﬃce hours schedule. Late work will not be accepted as
per the policies of this course.
Directly sharing answers is not okay, but discussing problems with the course staff or with other
students is encouraged. Refer to the policies page to learn more about how to learn cooperatively.
In [ ]:
1. Probability
We will be testing some probability concepts that were introduced in lecture. For all of the following
problems, we will introduce a problem statement and give you a proposed answer. Next, for each
of the following questions, you must assign the provided variable to one of three integers. You are
more than welcome to create more cells across this notebook to use for arithmetic operations, but
be sure to assign the provided variable to 1, 2, or 3 in the end.
1. Assign the variable to 1 if you believe our proposed answer is too low.
2. Assign the variable to 2 if you believe our proposed answer is correct.
3. Assign the variable to 3 if you believe our proposed answer is too high.
Question 1.1.
You roll a 6-sided die 10 times. What is the chance of getting 10 sixes?
# Don't change this cell; just run it.
import
numpy
as
np
from
datascience
import
*
# These lines do some fancy plotting magic.
import
matplotlib
%
matplotlib inline
import
matplotlib.pyplot
as
plt
plt.style.use(
'fivethirtyeight'
)
import
warnings
warnings.simplefilter(
'ignore'
, FutureWarning)

Our proposed answer:
Assign
ten_sixes
to either 1, 2, or 3 depending on if you think our answer is too low, correct, or
too high.
In [ ]:
Question 1.2.
Take the same problem set-up as before, rolling a fair dice 10 times. What is the
chance that every roll is less than or equal to 5?

In [ ]:
Question 1.3.
Assume we are picking a lottery ticket. We must choose three distinct numbers from
1 to 100 and write them on a ticket. Next, someone picks three numbers one by one, each time
without putting the previous number back in. We win if our numbers are all called.
If we decide to play the game and pick our numbers as 12, 14, and 89, what is the chance that we
win?