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

One-tailed and two-tailed tests

The example in the previous section was an instance of a one-tailed test where the null hypothesis is rejected or accepted based on one direction of the normal distribution.

In a two-tailed test, both the tails of the null hypothesis are used to test the hypothesis.

One-tailed and two-tailed tests

In a two-tailed test, when a significance level of 5% is used, then it is distributed equally in the both directions, that is, 2.5% of it in one direction and 2.5% in the other direction.

Let's understand this with an example. The mean score of the mathematics exam at a national level is 60 marks and the standard deviation is 3 marks.

The mean marks of a class are 53. The null hypothesis is that the mean marks of the class are similar to the national average. Let's test this hypothesis by first getting the z-score 60:

>>> zscore = ( 53 - 60 ) / 3.0
>>> zscore
-2.3333333333333335

The p-value would be:

>>> prob = stats.norm.cdf(zscore)
>>> prob

0.0098153286286453336

So, the p-value is 0.98%. The null hypothesis is to be rejected, and the p-value should be less than 2.5% in either direction of the bell curve. Since the p-value is less than 2.5%, we can reject the null hypothesis and clearly state that the average marks of the class are significantly different from the national average.

主站蜘蛛池模板: 莱芜市| 五大连池市| 正镶白旗| 镇康县| 云龙县| 宜良县| 五指山市| 宜宾市| 安岳县| 乌拉特前旗| 乌拉特中旗| 楚雄市| 离岛区| 澄城县| 新龙县| 灵台县| 濮阳市| 青铜峡市| 新津县| 武山县| 雅安市| 嘉义市| 上犹县| 若尔盖县| 柯坪县| 高要市| 娱乐| 江安县| 胶南市| 荔浦县| 香格里拉县| 阳山县| 仁化县| 新巴尔虎右旗| 柳江县| 民丰县| 绥化市| 广州市| 芦山县| 佛冈县| 徐州市|