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

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.

主站蜘蛛池模板: 铜川市| 扬州市| 伽师县| 乐亭县| 易门县| 桃园县| 定安县| 苍溪县| 阿坝| 繁昌县| 缙云县| 临猗县| 远安县| 科尔| 通化市| 皋兰县| 台北县| 闸北区| 弥渡县| 张家口市| 齐河县| 兰溪市| 凯里市| 醴陵市| 边坝县| 祥云县| 芦山县| 新营市| 辽源市| 湖南省| 腾冲县| 大丰市| 慈利县| 四会市| 福建省| 富民县| 靖宇县| 上犹县| 句容市| 天津市| 安岳县|