In: Statistics and Probability
2. Every day, Chung-Li buys a scratch-off lottery ticket with a 40% chance of winning some prize. He noticed that whenever he wears his red shirt he usually wins. He decided to keep track of his winnings while wearing the shirt and found that he won 6 out of 9 times.
# of wins out of 9 |
Frequency |
0 |
10 |
1 |
60 |
2 |
161 |
3 |
251 |
4 |
252 |
5 |
167 |
6 |
74 |
7 |
21 |
8 |
4 |
9 |
0 |
Let p be the true Chung-Li's chance of winning while wearing the shirt. We want to test the null hypothesis that Chung-Li's chance of winning while wearing the shirt is 40% as always versus the alternative that the chance is somehow greater. That is, we want to test the following hypotheses
Let X be the number of wins out of 9. From the results of 1000 simulations, we can get the relative frequency and hence probability of X=x wins out of 9, by dividing each frequency by 1000.
# of wins out of 9 (x) |
Frequency | P(x) |
0 | 10 | 10/1000=0.01 |
1 | 60 | 60/1000=0.06 |
2 | 161 | 161/1000=0.161 |
3 | 251 | 251/1000=0.251 |
4 | 252 | 252/1000=0.252 |
5 | 167 | 167/1000=0.167 |
6 | 74 | 74/1000=0.074 |
7 | 21 | 21/1000=0.021 |
8 | 4 | 4/1000=0.004 |
9 | 0 | 0/1000=0 |
We get the following
# of wins out of 9 (x) |
Frequency | P(x) |
0 | 10 | 0.01 |
1 | 60 | 0.06 |
2 | 161 | 0.161 |
3 | 251 | 0.251 |
4 | 252 | 0.252 |
5 | 167 | 0.167 |
6 | 74 | 0.074 |
7 | 21 | 0.021 |
8 | 4 | 0.004 |
9 | 0 | 0 |
Note: P(x) will sum to 1, if the calculations are correct.
the probability of winning 6 times or more out of 9 is same as the probability of X>=6
ans: the probability of winning 6 times or more out of 9 is 0.099
if the observed outcome has a probability less than 1% under the tested hypothesis, we will reject the hypothesis.
Here, the observed outcome has a probability of 0.099 and it is greater than 0.01 (which is 1%). Hence we do not reject the null hypothesis.
What should we conclude regarding the hypothesis?
ans: We cannot reject the null hypothesis.
It means that Chung-Li's chance of winning while wearing the shirt is 40% as always.