ジャック・ベラ検定[正規性の検定]

統計学




ジャック・ベラ検定

標本データが正規分布に従う尖度と歪度を有しているかを調べる適合度検定である。

python

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
 
nsample = 288
np.random.seed(3)
 
x = np.random.normal(1, 10, nsample)
 
x2 = np.random.gamma(1, 10, nsample)
 
 
jb = stats.jarque_bera(x)
print('T=', jb[0])
print('p_value=', jb[1])
 
jb2 = stats.jarque_bera(x2)
print('T=', jb2[0])
print('p_value=', jb2[1])

参考

  1. ジャック–ベラ検定
  2. https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.jarque_bera.html
タイトルとURLをコピーしました