TDSM 5.15

From The Data Science Design Manual Wikia
Jump to: navigation, search

We can test the hypothesis with permutation test. Here we have a hypothesis that there is an unfair coin, with the probability of head equal to 0.8 and probability of tail equal with 0.2

To test the hypothesis, we need the test statistic. Here we suppose the test statistic is number of heads. To run the experiments we toss the coin 100000 times and record number of heads in the experiments. If we calculate the probability of head in experiments, we expect it to be 0.8. If it is less than 0.8 and closer to 0.5 we conclude that the hypothesis about being unfair is not true. If the probability is close to 0.8, the hypothesis will be accepted. The p-value for this permutation test is the probability of seeing head when tossing the coin 100000 times.