Class: Num4TstStatistic2Lib::ParametrixTestLib
- Inherits:
-
Object
- Object
- Num4TstStatistic2Lib::ParametrixTestLib
- Defined in:
- lib/num4tststatistic2.rb
Instance Method Summary collapse
-
#diffPopulationMean(xi1, xi2, a) ⇒ boolean
対応のある2つの母平均の差の検定量.
-
#diffPopulationMean2EquVar(xi1, xi2, a) ⇒ boolean
2つの母平均の差の検定量 (等分散性を仮定).
-
#diffPopulationMean2UnEquVar(xi1, xi2, a) ⇒ boolean
2つの母平均の差の検定量 (不等分散性を仮定).
-
#diffPopulationRatio(m1, n1, m2, n2, a) ⇒ boolean
2つの母比率の差の検定量.
-
#diffPopulationVar(xi1, xi2, a) ⇒ boolean
2つの母分散の差の検定量.
-
#fidelity(fi, pi, a) ⇒ boolean
適合度の検定量.
-
#independency(fij, a) ⇒ boolean
独立性の検定量.
-
#initialize(hypothTest3) ⇒ ParametrixTestLib
constructor
A new instance of ParametrixTestLib.
-
#populationMean(xi, m0, a) ⇒ boolean
正規母集団の母平均の検定.
-
#populationRatio(m, n, p0, a) ⇒ boolean
母比率の検定量.
-
#populationVar(xi, sig0, a) ⇒ boolean
正規母集団の母分散の検定.
Constructor Details
#initialize(hypothTest3) ⇒ ParametrixTestLib
Returns a new instance of ParametrixTestLib.
7 8 9 10 |
# File 'lib/num4tststatistic2.rb', line 7 def initialize(hypothTest3) @hypothTest3 = hypothTest3 @paraTest = Num4TstStatisticLib::ParametrixTestLib.new end |
Instance Method Details
#diffPopulationMean(xi1, xi2, a) ⇒ boolean
対応のある2つの母平均の差の検定量
121 122 123 124 125 126 |
# File 'lib/num4tststatistic2.rb', line 121 def diffPopulationMean(xi1, xi2, a) n = xi1.size df = n - 1 statistic = @paraTest.diffPopulationMean(xi1, xi2) return @hypothTest3.tDistTest(statistic, df, a) end |
#diffPopulationMean2EquVar(xi1, xi2, a) ⇒ boolean
2つの母平均の差の検定量(等分散性を仮定)
80 81 82 83 84 85 86 |
# File 'lib/num4tststatistic2.rb', line 80 def diffPopulationMean2EquVar(xi1, xi2, a) n1 = xi1.size n2 = xi2.size df = n1 + n2 - 2 statistic = @paraTest.diffPopulationMean2EquVar(xi1, xi2) return @hypothTest3.tDistTest(statistic, df, a) end |
#diffPopulationMean2UnEquVar(xi1, xi2, a) ⇒ boolean
2つの母平均の差の検定量(不等分散性を仮定)
102 103 104 105 106 |
# File 'lib/num4tststatistic2.rb', line 102 def diffPopulationMean2UnEquVar(xi1, xi2, a) df = @paraTest.df4welch(xi1, xi2) statistic = @paraTest.diffPopulationMean2UnEquVar(xi1, xi2) return @hypothTest3.tDistTest(statistic, df, a) end |
#diffPopulationRatio(m1, n1, m2, n2, a) ⇒ boolean
2つの母比率の差の検定量
161 162 163 164 |
# File 'lib/num4tststatistic2.rb', line 161 def diffPopulationRatio(m1, n1, m2, n2, a) statistic = @paraTest.diffPopulationRatio(m1, n1, m2, n2) return @hypothTest3.normDistTest(statistic, a) end |
#diffPopulationVar(xi1, xi2, a) ⇒ boolean
2つの母分散の差の検定量
141 142 143 144 145 146 |
# File 'lib/num4tststatistic2.rb', line 141 def diffPopulationVar(xi1, xi2, a) nf = xi1.size - 1 df = xi2.size - 1 statistic = @paraTest.diffPopulationVar(xi1, xi2) return @hypothTest3.fDistTest(statistic, nf, df, a) end |
#fidelity(fi, pi, a) ⇒ boolean
適合度の検定量
179 180 181 182 183 |
# File 'lib/num4tststatistic2.rb', line 179 def fidelity(fi, pi, a) df = fi.size - 1 statistic = @paraTest.fidelity(fi, pi) return @hypothTest3.chi2DistTest(statistic, df, a) end |
#independency(fij, a) ⇒ boolean
独立性の検定量
199 200 201 202 203 204 205 |
# File 'lib/num4tststatistic2.rb', line 199 def independency(fij, a) m = fij.size n = fij[0].size df = (m - 1) * (n - 1) statistic = @paraTest.independency(fij) return @hypothTest3.chi2DistTest(statistic, df, a) end |
#populationMean(xi, m0, a) ⇒ boolean
正規母集団の母平均の検定
24 25 26 27 28 |
# File 'lib/num4tststatistic2.rb', line 24 def populationMean(xi, m0, a) df = xi.size - 1 statistic = @paraTest.populationMean(xi, m0) return @hypothTest3.tDistTest(statistic, df, a) end |
#populationRatio(m, n, p0, a) ⇒ boolean
母比率の検定量
61 62 63 64 |
# File 'lib/num4tststatistic2.rb', line 61 def populationRatio(m, n, p0, a) statistic = @paraTest.populationRatio(m, n, p0) return @hypothTest3.normDistTest(statistic, a) end |
#populationVar(xi, sig0, a) ⇒ boolean
正規母集団の母分散の検定
43 44 45 46 47 |
# File 'lib/num4tststatistic2.rb', line 43 def populationVar(xi, sig0, a) df = xi.size - 1 statistic = @paraTest.populationVar(xi, sig0) return @hypothTest3.chi2DistTest(statistic, df, a) end |