简体   繁体   中英

unexpected Shapiro results python

Shapiro p value does not show normality though histogram and qqplot seem to show normality. My concern is if I am correctly using the scipy Shapiro function.

pty.hist(RankList[4])
sm.qqplot(np.array(RankList[4]), line='s')
print(stats.shapiro(RankList[4]))
pty.show()
RESULT From Shapiro

(0.9911481738090515, 7.637918031377922e-08)

I would expect the p value to be higher.

在此处输入图片说明

It looks like you have quite a bit of data, if you check the notes on the SciPy documentation page it states:

For N > 5000 the W test statistic is accurate but the p-value may not be.

You may want to consider using the Anderson Darling test.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM