Module: Num4NormalityLib

Defined in:
lib/num4normality.rb

Overview

正規性の検定

(Apache commoms math3

Class Method Summary collapse

Class Method Details

.ksplot(dname, xi) ⇒ void

Note:

グラフは、jfreechartを使用

コルモゴルフ・スミルノフ検定プロット(1標本)

Examples:

xi = [320, 240, 402, 325, 440, 286, 362, 281, 560, 212, 198, 209, 374]
Num4NormalityLib.ksplot("LDH", xi)
=> kstest.jpeg

This method returns an undefined value.

Returns ksplot.jpegファイルを出力.

Parameters:

  • dname (String)

    データ名

  • xi (Array)

    データ(double[])



39
40
41
# File 'lib/num4normality.rb', line 39

def ksplot(dname, xi)
    Normality.ksplot(dname, xi.to_java(Java::double))
end

.kstest(xi) ⇒ boolean

コルモゴルフ・スミルノフ検定(1標本)

Examples:

xi = [320, 240, 402, 325, 440, 286, 362, 281, 560, 212, 198, 209, 374]
Num4NormalityLib.kstest(xi)
=> false

Returns 検定結果(true:棄却域内 false:棄却域外).

Parameters:

  • xi (Array)

    データ(double[])

Returns:

  • (boolean)

    検定結果(true:棄却域内 false:棄却域外)



51
52
53
# File 'lib/num4normality.rb', line 51

def kstest(xi)
    Normality.kstest(xi.to_java(Java::double))
end

.kurtosistest(xi) ⇒ boolean

タコスディーノ検定(尖度)

Examples:

xi = [320, 240, 402, 325, 440, 286, 362, 281, 560, 212, 198, 209, 374]
Num4NormalityLib.kurtosistest(xi)
=> false

Returns 検定結果(true:棄却域内 false:棄却域外).

Parameters:

  • xi (Array)

    データ(double[])

Returns:

  • (boolean)

    検定結果(true:棄却域内 false:棄却域外)



76
77
78
# File 'lib/num4normality.rb', line 76

def kurtosistest(xi)
    Normality.kurtosistest(xi.to_java(Java::double))
end

.qqplot(dname, xi) ⇒ void

Note:

グラフは、jfreechartを使用

Q-Qプロット

Examples:

xi = [320, 240, 402, 325, 440, 286, 362, 281, 560, 212, 198, 209, 374]
Num4NormalityLib.qqplot("LDH", xi)
=> qqplot.jpeg

This method returns an undefined value.

Returns qqplot.jpegファイルを出力.

Parameters:

  • dname (String)

    データ名

  • xi (Array)

    データ(double[])



24
25
26
# File 'lib/num4normality.rb', line 24

def qqplot(dname, xi)
    Normality.qqplot(dname, xi.to_java(Java::double))
end

.skewnesstest(xi) ⇒ boolean

タコスディーノ検定(歪度)

Examples:

xi = [320, 240, 402, 325, 440, 286, 362, 281, 560, 212, 198, 209, 374]
Num4NormalityLib.skewnesstest(xi)
=> false

Returns 検定結果(true:棄却域内 false:棄却域外).

Parameters:

  • xi (Array)

    データ(double[])

Returns:

  • (boolean)

    検定結果(true:棄却域内 false:棄却域外)



64
65
66
# File 'lib/num4normality.rb', line 64

def skewnesstest(xi)
    Normality.skewnesstest(xi.to_java(Java::double))
end