abanalyzer 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/abanalyzer/abtest.rb +6 -2
- data/lib/abanalyzer/version.rb +1 -1
- metadata +3 -3
data/lib/abanalyzer/abtest.rb
CHANGED
@@ -34,11 +34,11 @@ module ABAnalyzer
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def chisquare_p
|
37
|
-
|
37
|
+
ABTest.chi2dist(df, self.chisquare_score)
|
38
38
|
end
|
39
39
|
|
40
40
|
def gtest_p
|
41
|
-
|
41
|
+
ABTest.chi2dist(df, 2*self.gtest_score)
|
42
42
|
end
|
43
43
|
|
44
44
|
private
|
@@ -54,6 +54,10 @@ module ABAnalyzer
|
|
54
54
|
def df
|
55
55
|
(@values.columns.length - 1) * (@values.rows.length - 1)
|
56
56
|
end
|
57
|
+
|
58
|
+
def self.chi2dist(degrees, score)
|
59
|
+
1 - Statistics2.chi2dist(degrees, score)
|
60
|
+
end
|
57
61
|
end
|
58
62
|
|
59
63
|
end
|
data/lib/abanalyzer/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abanalyzer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Muller
|