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

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.

主站蜘蛛池模板: 剑河县| 扎赉特旗| 女性| 公安县| 衡阳市| 津市市| 杭锦后旗| 上饶市| 阿拉善盟| 广水市| 盐亭县| 阳曲县| 珠海市| 平定县| 大方县| 开远市| 淮阳县| 连城县| 达孜县| 永昌县| 京山县| 江都市| 宜君县| 水城县| 武冈市| 商丘市| 商南县| 吉安县| 凤阳县| 北京市| 商都县| 鹤山市| 鄄城县| 周口市| 望奎县| 夏邑县| 黑河市| 清原| 抚顺县| 淮南市| 长乐市|