Intuition of P-value


Let's use an example to demonstrate it. 

We suppose a coin flip is fair(null hypothesis: H: p=0.5).  We begin to experiment, and toss coins 20 times. But we found the coin tuning up heads 14 times. Can we believe our supposition?  Let's suppose it's true, and compute the possibility of this case.

P(heads=14) = C(20, 14) * (1/2)^14 * (1-1/2)^(20 - 14)

P(heads=14) = dbinom(1:20, 20, 1/2)[14] = 0.03696442.

The above point possibility is very sensitive too the distribution of  data. So the absolute value of P(heads = 14) (or the relative value against the possibility of commonest case)  is not proper as a judgment.

Here we can use P-value to judge our null hypothesis.

P-value represents the possibility of this case and cases that more extreme.

P-value(heads=14) = P(heads=14) + P(heads = 15) + ... + P(heads=20) = sum(dbinom(1:20, 20, 1/2)[14:20]) = 0.05765915

So we can say under we can't reject this null hypothesis under significant level 0.05, because P-value(heads=14) is greater than 0.05. But we can reject this null hypothesis

under significant level 0.6.

Hence, there is no absolute evidence to reject or accept a null hypothesis, even we can't say we can reject it  under some possibility. We only know we can reject or accept it under some significant level.


The example we used is from Wiki


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章