Class: Num4TstStatistic2Lib::OutlierLib

Inherits:
Object
  • Object
show all
Defined in:
lib/num4tststatistic2.rb

Overview

外れ値検定

Instance Method Summary collapse

Constructor Details

#initializeOutlierLib



317
318
319
320
# File 'lib/num4tststatistic2.rb', line 317

def initialize
    @outlier = Num4TstStatisticLib::OutlierLib.new
    @hypothTest2 = Num4HypothTestLib::GrubbsTestLib.new
end

Instance Method Details

#errbar(dname, xi) ⇒ void

エラーバー出力

Examples:

xi = [3.4, 3.5, 3.3, 2.2, 3.3, 3.4, 3.6, 3.2]
outlier = Num4TstStatistic2Lib::OutlierLib.new
outlier.errbar("LDH", xi)
=> errbar.jpeg


348
349
350
# File 'lib/num4tststatistic2.rb', line 348

def errbar(dname, xi)
    @outlier.errbar(dname, xi)
end

#grubbs(xi, xk, a) ⇒ double

グラプス・スミルノフの外れ値の検定

Examples:

xi = [3.4, 3.5, 3.3, 2.2, 3.3, 3.4, 3.6, 3.2]
outlier = Num4TstStatistic2Lib::OutlierLib.new
outlier.grubbs(xi, 2.2, 0.05)
=> true


332
333
334
335
336
# File 'lib/num4tststatistic2.rb', line 332

def grubbs(xi, xk, a)
    n = xi.size
    statistic = @outlier.grubbs(xi, xk)
    @hypothTest2.twoSideTest(statistic, n, a)
end