|
85 | 85 |
|
86 | 86 | result = described_class.paired_test(alpha, :one_tail, before, after)
|
87 | 87 |
|
88 |
| - # https://github.com/estebanz01/ruby-statistics/issues/13 |
89 |
| - # In the example, the p-value for one-side is 0.0006 but we have 0.0004 |
90 |
| - # Apparently, it's how ruby handles and calculates the float points |
91 |
| - # expect(result[:p_value]).to eq 0.0006 |
| 88 | + expect(result[:p_value].round(4)).to eq 0.0006 |
92 | 89 | expect(result[:null]).to be false
|
93 | 90 | expect(result[:alternative]).to be true
|
94 | 91 | end
|
|
100 | 97 |
|
101 | 98 | result = described_class.paired_test(alpha, :two_tail, before, after)
|
102 | 99 |
|
103 |
| - # https://github.com/estebanz01/ruby-statistics/issues/13 |
104 |
| - # In the example, the p-value for one-side is 0.0012 but we have 0.0008 |
105 |
| - # Apparently, it's how ruby handles and calculates the float points |
106 |
| - # expect(result[:p_value].round(4)).to eq 0.0012 |
| 100 | + expect(result[:p_value].round(4)).to eq 0.0012 |
107 | 101 | expect(result[:null]).to be false
|
108 | 102 | expect(result[:alternative]).to be true
|
109 | 103 | end
|
|
123 | 117 |
|
124 | 118 | result = described_class.paired_test(alpha, :two_tail, five_mts, ten_mts)
|
125 | 119 |
|
126 |
| - # https://github.com/estebanz01/ruby-statistics/issues/13 |
127 |
| - # In the example, the p-value for one-side is 0.0026 but we have 0.0024 |
128 |
| - # Apparently, it's how ruby handles and calculates the float points |
129 |
| - # expect(result[:p_value].round(3)).to eq 0.026 |
| 120 | + expect(result[:p_value].round(3)).to eq 0.026 |
130 | 121 | expect(result[:null]).to be false
|
131 | 122 | expect(result[:alternative]).to be true
|
132 | 123 | end
|
|
0 commit comments