abanalyzer 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -1
- data/Rakefile +7 -2
- data/lib/abanalyzer/abtest.rb +1 -1
- data/lib/abanalyzer/version.rb +3 -0
- data/lib/abanalyzer.rb +1 -0
- metadata +5 -4
data/README.rdoc
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
= ABAnalyzer
|
2
2
|
|
3
|
-
ABAnalyzer is a Ruby library that will perform testing to determine if there is a statistical difference in categorical data (typically called an A/B Test).
|
3
|
+
ABAnalyzer is a Ruby library that will perform testing to determine if there is a statistical difference in categorical data (typically called an A/B Test). By default, it uses a G-Test for independence, but a Chi-Square test for independence can also be used. For more information, see:
|
4
|
+
* http://en.wikipedia.org/wiki/G-test
|
5
|
+
* http://en.wikipedia.org/wiki/Pearson%27s_chi-square_test
|
4
6
|
|
5
7
|
== Installation
|
6
8
|
Simply run:
|
data/Rakefile
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
1
2
|
require 'rubygems'
|
2
3
|
require 'rake'
|
3
4
|
require 'rake/testtask'
|
4
5
|
require 'rake/rdoctask'
|
5
6
|
require 'rake/gempackagetask'
|
6
7
|
|
8
|
+
require 'date'
|
9
|
+
|
10
|
+
require "abanalyzer/version"
|
11
|
+
|
7
12
|
desc "Create documentation"
|
8
13
|
Rake::RDocTask.new("doc") { |rdoc|
|
9
14
|
rdoc.title = "ABAnalyzer - A/B test analysis library for Ruby"
|
@@ -21,9 +26,9 @@ Rake::TestTask.new("test") { |t|
|
|
21
26
|
|
22
27
|
spec = Gem::Specification.new do |s|
|
23
28
|
s.name = "abanalyzer"
|
24
|
-
s.version =
|
29
|
+
s.version = ABAnalyzer::VERSION
|
25
30
|
s.authors = ["Brian Muller"]
|
26
|
-
s.date =
|
31
|
+
s.date = Date.today.to_s
|
27
32
|
s.description = "A/B test analysis library for Ruby - performs Chi-Square tests and G-tests on A/B results."
|
28
33
|
s.summary = "Performs statistical tests for significant differences in categorical data."
|
29
34
|
s.email = "brian.muller@livingsocial.com"
|
data/lib/abanalyzer/abtest.rb
CHANGED
@@ -36,7 +36,7 @@ module ABAnalyzer
|
|
36
36
|
private
|
37
37
|
def test_sufficient_data(colname, rowname, expected, value)
|
38
38
|
msg = "Insufficient data size for column #{colname} row #{rowname}. Expected value must be >= 5, and value must be > 0."
|
39
|
-
raise InsufficientDataError, msg if expected < 5 or value
|
39
|
+
raise InsufficientDataError, msg if expected < 5 or value <= 0
|
40
40
|
end
|
41
41
|
|
42
42
|
def expected(colname, rowname)
|
data/lib/abanalyzer.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: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Muller
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-03-29 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -45,6 +45,7 @@ files:
|
|
45
45
|
- lib/abanalyzer/abtest.rb
|
46
46
|
- lib/abanalyzer/exceptions.rb
|
47
47
|
- lib/abanalyzer/matrix.rb
|
48
|
+
- lib/abanalyzer/version.rb
|
48
49
|
- lib/abanalyzer.rb
|
49
50
|
- LICENSE
|
50
51
|
- Rakefile
|