ホーム » その他 » ねぇPython、NonParametric testって何?(実装編)

ねぇPython、NonParametric testって何?(実装編)

こんにちは。

本日はノンパラメトリック検定の実装です。rankやsignの計算に少し手間取ってしまいました、、

加えて驚いたのが既存のマンホイットニーのU検定をつかってみると

統計量あってるのにp値小さすぎて棄却されてる!

という事件が発生して調べてみると

alternative : None (deprecated), ‘less’, ‘two-sided’, or ‘greater’

Whether to get the p-value for the one-sided hypothesis (‘less’ or ‘greater’) or for the two-sided hypothesis (‘two-sided’). Defaults to None, which results in a p-value half the size of the ‘two-sided’ p-value and a different U statistic. The default behavior is not the same as using ‘less’ or ‘greater’: it only exists for backward compatibility and is deprecated.

ということでp-valueは2倍する必要があるようです。

では実装を見ましょう。

statistic < critical value

となればH_0を棄却に注意して

ノンパラということだったのでまたの機会に面白いデータでやってみたいと思います。

 

でわ

READMORE


コメントする

メールアドレスが公開されることはありません。 が付いている欄は必須項目です