官术网_书友最值得收藏!

A p-value

A p-value is the probability of rejecting a null-hypothesis when the hypothesis is proven true. The null hypothesis is a statement that says that there is no difference between two measures. If the hypothesis is that people who clock in 4 hours of study everyday score more that 90 marks out of 100. The null hypothesis here would be that there is no relation between the number of hours clocked in and the marks scored.

If the p-value is equal to or less than the significance level (α), then the null hypothesis is inconsistent and it needs to be rejected.

A p-value

Let's understand this concept with an example where the null hypothesis is that it is common for students to score 68 marks in mathematics.

Let's define the significance level at 5%. If the p-value is less than 5%, then the null hypothesis is rejected and it is not common to score 68 marks in mathematics.

Let's get the z-score of 68 marks:

>>> zscore = ( 68 - classscore.mean() ) / classscore.std()
>>> zscore
2.283

Now, let's get the value:

>>> prob = 1 - stats.norm.cdf(zscore)
>>> prob
0.032835182628040638
A p-value

So, you can see that the p-value is at 3.2%, which is lower than the significance level. This means that the null hypothesis can be rejected, and it can be said that it's not common to get 68 marks in mathematics.

主站蜘蛛池模板: 彰武县| 临城县| 肃宁县| 伊川县| 峡江县| 黔西| 肥乡县| 云龙县| 临沭县| 囊谦县| 阳山县| 瑞安市| 江华| 绵竹市| 明水县| 崇文区| 文山县| 肇源县| 罗平县| 通城县| 平定县| 宁河县| 禄丰县| 横峰县| 前郭尔| 府谷县| 石楼县| 杭锦旗| 翁源县| 噶尔县| 长沙市| 格尔木市| 浮山县| 筠连县| 汤原县| 前郭尔| 塔城市| 宣恩县| 兴和县| 海兴县| 鹿邑县|