Class: Num4DiffTestLib::ParametrixTestLib

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

Overview

パラメトリック検定

Instance Method Summary collapse

Constructor Details

#initialize(hypothTest3) ⇒ ParametrixTestLib

Returns a new instance of ParametrixTestLib.



8
9
10
11
12
13
# File 'lib/num4difftest.rb', line 8

def initialize(hypothTest3)
    @hypothTest3 = hypothTest3
    @paraTest    = Num4TstStatistic2Lib::ParametrixTestLib.new(@hypothTest3)
    @oneWay      = Num4AnovaLib::OneWayLayoutLib.new
    @twoWay      = Num4AnovaLib::TwoWayLayoutLib.new
end

Instance Method Details

#mult_diff_test(xi1, a) ⇒ Object

Raises:

  • (TypeError)


23
24
25
26
27
# File 'lib/num4difftest.rb', line 23

def mult_diff_test(xi1, a)
    raise TypeError unless @hypothTest3.kind_of?(HypothTest3IF)

    return @oneWay.oneway_anova(xi1, a)
end

#smple_diff_test(xi1, xi2, a) ⇒ Object

Raises:

  • (TypeError)


14
15
16
17
18
19
20
21
22
# File 'lib/num4difftest.rb', line 14

def smple_diff_test(xi1, xi2, a)
    raise TypeError unless @hypothTest3.kind_of?(HypothTest3IF)

    if xi1.size == xi2.size then
        return @paraTest.diffPopulationMean(xi1, xi2, a)
    else
        return @paraTest.diffPopulationVarMean(xi1, xi2, a)
    end
end