Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

スピアマンの順位相関係数(Spearman’s rho)

順序尺度 × 順序尺度 あるいは 任意の変数を順位に置き換えて測る相関(順位ベースのピアソン相関)

線形性や正規生の仮定を必要としない

2つの変数X,YX, Yのnn個の観測値の各ペア(xi,yi)(x_i, y_i)の順位の差did_iを求め

ρ=1−6∑di2n(n2−1)\rho=1-\frac{6 \sum d_i^2}{n\left(n^2-1\right)}
spearmanr(x, y).statistic=0.816
polychoric(x, y)=0.999
pearsonr(x, y).statistic=0.933
spearmanr(x, y).statistic=1.000
polychoric(x, y)=1.000
<Figure size 640x480 with 1 Axes>