A casino owner is concerned based on past experience that his dice show 6 too often Currently I am trying to understand hypothesis testing, but I have a problem with the following question:
A casino owner is concerned based on past experience that his dice show
6 too often. He makes his employees roll a die 18,000 times and they observe
3,123 sixes. Is the die biased?
So from this text I used the following test:
$$ h0 := p = \frac{1}{6} = unbiased $$
$$ h1 := p \ne \frac{1}{6} = biased $$
The problem is that I don't how to calculate it. First I tried this formula:
$$ \frac{\hat x - \mu}{SE} $$
$$ SE= \frac{\sigma}{\sqrt{n}} $$
$$ \frac{3123-3000}{\frac{\sqrt{18000\cdot\frac{3123}{18000}\cdot\frac{14874}{18000}}}{\sqrt{18000}}} = 0.018478$$
Also I tried the following formula:
$$ \frac{\frac{3123}{18000} - \frac{3000}{18000}}{\sqrt{\frac{\frac{1}{6}\cdot \frac{5}{6}}{18000}}} =2.46$$
And if I look at the z value. It is different than the answer of my textbook.
Did I use the wrong formula?
According to the book, the answer is .0081
 A: When doing this test what we're interesting in is the distribution of our test statistic when the null hypothesis is true, which is binomial$(n = 18,000, p = 1/6)$.  So the standard error need not be estimated from the data, it's known to be exactly $\sqrt{18,000 \times 1/6 \times 5/6}$, and this should be the value you use in your calculation.  More importantly, the formula you use for the standard error is for the proportion of sixes, but you're apparently using the total number as a test statistic, so your standard error is off by a fairly large factor.
Also, the number of sixes go from being 3,123 in the problem to 3,126 in your answer.
A: One way to approach the problem might be to calculate the standard score as the number of standard deviations for the observation from the expected value:
$$
\sigma = \sqrt{18000\times\frac{1}{6}\times(1 - \frac{1}{6})} = 50\\
z = \frac{3123-\frac{18000}{6}}{50} = 2.46
$$
If my understanding is correct, 2.46 is a high standard score which has less than 1% probability of happening given a normal distribution so it is likely that the die is biased.
Another way to approach the problem might be to check whether the expected probability of 1/6 falls within the probability of the observation with a confidence level of 95% (Z = 1.9599):
$$
s_p = \sqrt{\frac{\frac{1}{6}\times(1 - \frac{1}{6})}{18000}} = \frac{1}{360}\\
E = Z\times s_p = \frac{1.9599}{360} = 0.0054\\
p = \frac{3123}{18000} = \frac{347}{2000} = 0.1735\\
0.1682 = p - E < r < p + E = 0.1789
$$
Again, if my understanding is correct, 1/6 does not fall within the range of the observation so it still seems likely that the die is biased.
As for the 0.0081 answer in your book, I don't understand how that can be the answer to a yes/no question. I might point out that this number happens to be the reciprocal of the difference between your observation and the expected value:
$$
\frac{1}{3123-\frac{18000}{6}} = 0.0081
$$
However, I don't understand how that relates to your problem. Please keep us posted on your progress!
