shapiro 和 normaltest 可以在 python 中互换使用吗?

Can shapiro and normaltest be used interchangeably in python?

我曾经使用 scipy.stats.shapiro 来测试数据的正态性,但看起来像

 scipy.stats.normaltest 

也是一样。 它们可以互换使用吗?

this answer 中,Shapiro 似乎普遍优于 normaltest 中使用的 D'Agostino-Pearson 检验。

The ultimate reason why the Shapiro Wilk is popular has, I think, less to do with Pubmed or NIST but rather with its excellent power in a wide variety of situations of interest (which would in turn lead to wider implementation and hence, popularity); it generally comes out toward the top against a wide variety of non-normal distributions in power comparisons with other possible choices. I wouldn't claim it's the best possible omnibus test of normality, but it's a very solid choice.