abanalyzer 0.0.6 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,152 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
-
8
- <title>Class: ABAnalyzer::MatrixFormatError</title>
9
-
10
- <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
-
12
- <script src="../js/jquery.js" type="text/javascript"
13
- charset="utf-8"></script>
14
- <script src="../js/thickbox-compressed.js" type="text/javascript"
15
- charset="utf-8"></script>
16
- <script src="../js/quicksearch.js" type="text/javascript"
17
- charset="utf-8"></script>
18
- <script src="../js/darkfish.js" type="text/javascript"
19
- charset="utf-8"></script>
20
-
21
- </head>
22
- <body class="class">
23
-
24
- <div id="metadata">
25
- <div id="home-metadata">
26
- <div id="home-section" class="section">
27
- <h3 class="section-header">
28
- <a href="../index.html">Home</a>
29
- <a href="../index.html#classes">Classes</a>
30
- <a href="../index.html#methods">Methods</a>
31
- </h3>
32
- </div>
33
- </div>
34
-
35
- <div id="file-metadata">
36
- <div id="file-list-section" class="section">
37
- <h3 class="section-header">In Files</h3>
38
- <div class="section-body">
39
- <ul>
40
-
41
- <li><a href="../lib/abanalyzer/exceptions_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
- class="thickbox" title="lib/abanalyzer/exceptions.rb">lib/abanalyzer/exceptions.rb</a></li>
43
-
44
- </ul>
45
- </div>
46
- </div>
47
-
48
-
49
- </div>
50
-
51
- <div id="class-metadata">
52
-
53
- <!-- Parent Class -->
54
-
55
- <div id="parent-class-section" class="section">
56
- <h3 class="section-header">Parent</h3>
57
-
58
- <p class="link">RuntimeError</p>
59
-
60
- </div>
61
-
62
-
63
- <!-- Namespace Contents -->
64
-
65
-
66
- <!-- Method Quickref -->
67
-
68
-
69
- <!-- Included Modules -->
70
-
71
- </div>
72
-
73
- <div id="project-metadata">
74
-
75
-
76
- <div id="fileindex-section" class="section project-section">
77
- <h3 class="section-header">Files</h3>
78
- <ul>
79
-
80
- <li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
81
-
82
- </ul>
83
- </div>
84
-
85
-
86
- <div id="classindex-section" class="section project-section">
87
- <h3 class="section-header">Class Index
88
- <span class="search-toggle"><img src="../images/find.png"
89
- height="16" width="16" alt="[+]"
90
- title="show/hide quicksearch" /></span></h3>
91
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
92
- <fieldset>
93
- <legend>Quicksearch</legend>
94
- <input type="text" name="quicksearch" value=""
95
- class="quicksearch-field" />
96
- </fieldset>
97
- </form>
98
-
99
- <ul class="link-list">
100
-
101
- <li><a href="../ABAnalyzer.html">ABAnalyzer</a></li>
102
-
103
- <li><a href="../ABAnalyzer/ABTest.html">ABAnalyzer::ABTest</a></li>
104
-
105
- <li><a href="../ABAnalyzer/InsufficientDataError.html">ABAnalyzer::InsufficientDataError</a></li>
106
-
107
- <li><a href="../ABAnalyzer/Matrix.html">ABAnalyzer::Matrix</a></li>
108
-
109
- <li><a href="../ABAnalyzer/MatrixFormatError.html">ABAnalyzer::MatrixFormatError</a></li>
110
-
111
- </ul>
112
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
113
- </div>
114
-
115
-
116
- </div>
117
- </div>
118
-
119
- <div id="documentation">
120
- <h1 class="class">ABAnalyzer::MatrixFormatError</h1>
121
-
122
- <div id="description">
123
-
124
- </div>
125
-
126
- <!-- Constants -->
127
-
128
-
129
- <!-- Attributes -->
130
-
131
-
132
- <!-- Methods -->
133
-
134
-
135
- </div>
136
-
137
-
138
- <div id="rdoc-debugging-section-dump" class="debugging-section">
139
-
140
- <p>Disabled; run with --debug to generate this.</p>
141
-
142
- </div>
143
-
144
- <div id="validator-badges">
145
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
146
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
147
- Rdoc Generator</a> 1.1.6</small>.</p>
148
- </div>
149
-
150
- </body>
151
- </html>
152
-
@@ -1,237 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
- <head>
7
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
-
9
- <title>File: README.rdoc [ABAnalyzer - A/B test analysis library for Ruby]</title>
10
-
11
- <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
12
-
13
- <script src="./js/jquery.js" type="text/javascript"
14
- charset="utf-8"></script>
15
- <script src="./js/thickbox-compressed.js" type="text/javascript"
16
- charset="utf-8"></script>
17
- <script src="./js/quicksearch.js" type="text/javascript"
18
- charset="utf-8"></script>
19
- <script src="./js/darkfish.js" type="text/javascript"
20
- charset="utf-8"></script>
21
- </head>
22
-
23
- <body class="file">
24
- <div id="metadata">
25
- <div id="home-metadata">
26
- <div id="home-section" class="section">
27
- <h3 class="section-header">
28
- <a href="./index.html">Home</a>
29
- <a href="./index.html#classes">Classes</a>
30
- <a href="./index.html#methods">Methods</a>
31
- </h3>
32
- </div>
33
- </div>
34
-
35
- <div id="project-metadata">
36
-
37
-
38
- <div id="fileindex-section" class="section project-section">
39
- <h3 class="section-header">Files</h3>
40
- <ul>
41
-
42
- <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
43
-
44
- </ul>
45
- </div>
46
-
47
-
48
- <div id="classindex-section" class="section project-section">
49
- <h3 class="section-header">Class Index
50
- <span class="search-toggle"><img src="./images/find.png"
51
- height="16" width="16" alt="[+]"
52
- title="show/hide quicksearch" /></span></h3>
53
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
54
- <fieldset>
55
- <legend>Quicksearch</legend>
56
- <input type="text" name="quicksearch" value=""
57
- class="quicksearch-field" />
58
- </fieldset>
59
- </form>
60
-
61
- <ul class="link-list">
62
-
63
- <li><a href="./ABAnalyzer.html">ABAnalyzer</a></li>
64
-
65
- <li><a href="./ABAnalyzer/ABTest.html">ABAnalyzer::ABTest</a></li>
66
-
67
- <li><a href="./ABAnalyzer/InsufficientDataError.html">ABAnalyzer::InsufficientDataError</a></li>
68
-
69
- <li><a href="./ABAnalyzer/Matrix.html">ABAnalyzer::Matrix</a></li>
70
-
71
- <li><a href="./ABAnalyzer/MatrixFormatError.html">ABAnalyzer::MatrixFormatError</a></li>
72
-
73
- </ul>
74
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
75
- </div>
76
-
77
-
78
- </div>
79
- </div>
80
-
81
- <div id="documentation">
82
- <h1><a href="ABAnalyzer.html">ABAnalyzer</a></h1>
83
- <p>
84
- <a href="ABAnalyzer.html">ABAnalyzer</a> is a Ruby library that will
85
- perform testing to determine if there is a statistical difference in
86
- categorical data (typically called an A/B Test). By default, it uses a
87
- G-Test for independence, but a Chi-Square test for independence can also be
88
- used. For more information, see:
89
- </p>
90
- <ul>
91
- <li><p>
92
- <a
93
- href="http://en.wikipedia.org/wiki/G-test">en.wikipedia.org/wiki/G-test</a>
94
- </p>
95
- </li>
96
- <li><p>
97
- <a
98
- href="http://en.wikipedia.org/wiki/Pearson%27s_chi-square_test">en.wikipedia.org/wiki/Pearson%27s_chi-square_test</a>
99
- </p>
100
- </li>
101
- </ul>
102
- <h2>Installation</h2>
103
- <p>
104
- Simply run:
105
- </p>
106
- <pre>
107
- gem install abanalyzer
108
- </pre>
109
- <h2>Basic Usage</h2>
110
- <p>
111
- The simplest test (which uses a gtest):
112
- </p>
113
- <pre>
114
- require 'rubygems'
115
- require 'abanalyzer'
116
-
117
- values = {}
118
- values[:agroup] = { :opened =&gt; 100, :unopened =&gt; 300 }
119
- values[:bgroup] = { :opened =&gt; 50, :unopened =&gt; 350 }
120
-
121
- tester = ABAnalyzer::ABTest.new values
122
- # Are the two different? Returns true or false (at 0.05 level of significance)
123
- puts tester.different?
124
- </pre>
125
- <h2>Multiple Categories</h2>
126
- <p>
127
- You can use the <a href="ABAnalyzer.html">ABAnalyzer</a> module to test for
128
- differences in more than two categories. For instance, to test accross
129
- three:
130
- </p>
131
- <pre>
132
- require 'rubygems'
133
- require 'abanalyzer'
134
-
135
- values = {}
136
- values[:agroup] = { :male =&gt; 200, :female =&gt; 250 }
137
- values[:bgroup] = { :male =&gt; 150, :female =&gt; 300}
138
- values[:cgroup] = { :male =&gt; 50, :female =&gt; 50 }
139
-
140
- tester = ABAnalyzer::ABTest.new values
141
- # Are the two different? Returns true or false (at 0.05 level of significance)
142
- puts tester.different?
143
- </pre>
144
- <h2>Tests Available</h2>
145
- <p>
146
- You can get the actual p-value for either a Chi-Square test for
147
- independence or a G-Test for independence.
148
- </p>
149
- <pre>
150
- ...
151
- tester = ABAnalyzer::ABTest.new values
152
- puts tester.chisquare_p
153
- puts tester.gtest_p
154
- </pre>
155
- <p>
156
- You can additionally get the actual score for either a Chi-Square test for
157
- independence or a G-Test for independence.
158
- </p>
159
- <pre>
160
- ...
161
- tester = ABAnalyzer::ABTest.new values
162
- puts tester.chisquare_score
163
- puts tester.gtest_score
164
- </pre>
165
- <h2>Sample Size Calculations</h2>
166
- <p>
167
- Let&#8217;s say you want to determine how large your sample size needs to
168
- be for an A/B test. Let&#8217;s say your baseline is 10%, and you want to
169
- be able to determine if there&#8217;s at least a 10% relative lift (1%
170
- absolute) to 11%. Let&#8217;s assume you want a <a
171
- href="http://en.wikipedia.org/wiki/Statistical_power">power</a> of 0.8 and
172
- a <a
173
- href="http://en.wikipedia.org/wiki/Statistical_significance">significance
174
- level</a> of 0.05 (that is, an 80% chance of that you&#8217;ll fail to
175
- recognize a difference when there is one, and a 5% chance of a false
176
- negative).
177
- </p>
178
- <pre>
179
- ...
180
- ABAnalyzer.calculate_size(0.1, 0.11, 0.05, 0.8)
181
- =&gt; 14751
182
- </pre>
183
- <p>
184
- This means that you will need at least 14,751 people in each group sample.
185
- You can see this same example with R at <a
186
- href="http://37signals.com/svn/posts/3004-ab-testing-tech-note-determining-sample-size">on
187
- the 37 signals blog</a>.
188
- </p>
189
- <h2>Confidence Intervals</h2>
190
- <p>
191
- You can also get a <a
192
- href="http://en.wikipedia.org/wiki/Confidence_interval">confidence
193
- interval</a>. Let&#8217;s say you have the results of a test where there
194
- were 711 successes out of 4000 trials. To get a 95% confidence interval of
195
- the &#8220;true&#8221; value of the conversion rate, use:
196
- </p>
197
- <pre>
198
- ...
199
- ABAnalyzer.confidence_interval(711, 4000, 0.95)
200
- =&gt; [0.1659025512617185, 0.1895974487382815]
201
- </pre>
202
- <p>
203
- This means (roughly) that if you ran this experiment over and over, 95% of
204
- the time the resulting proportion would be between 17% and 19%.
205
- </p>
206
- <p>
207
- You can also determine what the relative confidence intervals would be.
208
- Let&#8217;s say that your old conversion rate was 13%, and you wanted to
209
- know what sort of relative lift you could get.
210
- </p>
211
- <pre>
212
- ...
213
- ABAnalyzer.relative_confidence_interval(711, 4000, 0.13, 0.95)
214
- =&gt; [0.27617347124398833, 0.45844191337139606]
215
- </pre>
216
- <p>
217
- This means (roughly) that if you ran this experiment over and over, 95% of
218
- the time the resulting proportion would be a relative lift of between 28%
219
- and 46%. Go buy yourself a beer!
220
- </p>
221
- <h2>Running Tests</h2>
222
- <p>
223
- Testing can be run by using:
224
- </p>
225
- <pre>
226
- rake test</pre>
227
-
228
- </div>
229
-
230
- <div id="validator-badges">
231
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
232
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
233
- Rdoc Generator</a> 1.1.6</small>.</p>
234
- </div>
235
- </body>
236
- </html>
237
-
@@ -1,8 +0,0 @@
1
- Fri, 17 Aug 2012 17:17:54 -0400
2
- README.rdoc Fri, 17 Aug 2012 17:17:52 -0400
3
- lib/abanalyzer/abtest.rb Thu, 21 Apr 2011 13:28:14 -0400
4
- lib/abanalyzer/exceptions.rb Sun, 19 Dec 2010 13:09:58 -0500
5
- lib/abanalyzer/matrix.rb Sun, 19 Dec 2010 13:29:17 -0500
6
- lib/abanalyzer/sample.rb Fri, 17 Aug 2012 17:10:26 -0400
7
- lib/abanalyzer/version.rb Fri, 17 Aug 2012 17:14:58 -0400
8
- lib/abanalyzer.rb Fri, 17 Aug 2012 15:29:40 -0400
@@ -1,108 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
6
- <head>
7
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
-
9
- <title>ABAnalyzer - A/B test analysis library for Ruby</title>
10
-
11
- <link type="text/css" media="screen" href="rdoc.css" rel="stylesheet" />
12
-
13
- <script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
14
- <script src="js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
15
- <script src="js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
16
- <script src="js/darkfish.js" type="text/javascript" charset="utf-8"></script>
17
-
18
- </head>
19
- <body class="indexpage">
20
-
21
-
22
- <h1>ABAnalyzer - A/B test analysis library for Ruby</h1>
23
-
24
-
25
- <p>This is the API documentation for 'ABAnalyzer - A/B test analysis library for Ruby'.</p>
26
-
27
-
28
-
29
-
30
- <h2>Files</h2>
31
- <ul>
32
-
33
- <li class="file"><a href="README_rdoc.html">README.rdoc</a></li>
34
-
35
- </ul>
36
-
37
-
38
- <h2 id="classes">Classes/Modules</h2>
39
- <ul>
40
-
41
- <li class="module"><a href="ABAnalyzer.html">ABAnalyzer</a></li>
42
-
43
- <li class="class"><a href="ABAnalyzer/ABTest.html">ABAnalyzer::ABTest</a></li>
44
-
45
- <li class="class"><a href="ABAnalyzer/InsufficientDataError.html">ABAnalyzer::InsufficientDataError</a></li>
46
-
47
- <li class="class"><a href="ABAnalyzer/Matrix.html">ABAnalyzer::Matrix</a></li>
48
-
49
- <li class="class"><a href="ABAnalyzer/MatrixFormatError.html">ABAnalyzer::MatrixFormatError</a></li>
50
-
51
- </ul>
52
-
53
- <h2 id="methods">Methods</h2>
54
- <ul>
55
-
56
- <li><a href="ABAnalyzer.html#method-c-calculate_size">::calculate_size &mdash; ABAnalyzer</a></li>
57
-
58
- <li><a href="ABAnalyzer/ABTest.html#method-c-chi2dist">::chi2dist &mdash; ABAnalyzer::ABTest</a></li>
59
-
60
- <li><a href="ABAnalyzer.html#method-c-confidence_interval">::confidence_interval &mdash; ABAnalyzer</a></li>
61
-
62
- <li><a href="ABAnalyzer/ABTest.html#method-c-new">::new &mdash; ABAnalyzer::ABTest</a></li>
63
-
64
- <li><a href="ABAnalyzer/Matrix.html#method-c-new">::new &mdash; ABAnalyzer::Matrix</a></li>
65
-
66
- <li><a href="ABAnalyzer.html#method-c-relative_confidence_interval">::relative_confidence_interval &mdash; ABAnalyzer</a></li>
67
-
68
- <li><a href="ABAnalyzer/ABTest.html#method-i-chisquare_p">#chisquare_p &mdash; ABAnalyzer::ABTest</a></li>
69
-
70
- <li><a href="ABAnalyzer/ABTest.html#method-i-chisquare_score">#chisquare_score &mdash; ABAnalyzer::ABTest</a></li>
71
-
72
- <li><a href="ABAnalyzer/Matrix.html#method-i-column_sum">#column_sum &mdash; ABAnalyzer::Matrix</a></li>
73
-
74
- <li><a href="ABAnalyzer/ABTest.html#method-i-df">#df &mdash; ABAnalyzer::ABTest</a></li>
75
-
76
- <li><a href="ABAnalyzer/ABTest.html#method-i-different%3F">#different? &mdash; ABAnalyzer::ABTest</a></li>
77
-
78
- <li><a href="ABAnalyzer/Matrix.html#method-i-each_cell">#each_cell &mdash; ABAnalyzer::Matrix</a></li>
79
-
80
- <li><a href="ABAnalyzer/ABTest.html#method-i-expected">#expected &mdash; ABAnalyzer::ABTest</a></li>
81
-
82
- <li><a href="ABAnalyzer/Matrix.html#method-i-get">#get &mdash; ABAnalyzer::Matrix</a></li>
83
-
84
- <li><a href="ABAnalyzer/Matrix.html#method-i-get_column">#get_column &mdash; ABAnalyzer::Matrix</a></li>
85
-
86
- <li><a href="ABAnalyzer/Matrix.html#method-i-get_row">#get_row &mdash; ABAnalyzer::Matrix</a></li>
87
-
88
- <li><a href="ABAnalyzer/ABTest.html#method-i-gtest_p">#gtest_p &mdash; ABAnalyzer::ABTest</a></li>
89
-
90
- <li><a href="ABAnalyzer/ABTest.html#method-i-gtest_score">#gtest_score &mdash; ABAnalyzer::ABTest</a></li>
91
-
92
- <li><a href="ABAnalyzer/Matrix.html#method-i-row_sum">#row_sum &mdash; ABAnalyzer::Matrix</a></li>
93
-
94
- <li><a href="ABAnalyzer/ABTest.html#method-i-test_sufficient_data">#test_sufficient_data &mdash; ABAnalyzer::ABTest</a></li>
95
-
96
- <li><a href="ABAnalyzer/Matrix.html#method-i-total_sum">#total_sum &mdash; ABAnalyzer::Matrix</a></li>
97
-
98
- <li><a href="ABAnalyzer/Matrix.html#method-i-validate">#validate &mdash; ABAnalyzer::Matrix</a></li>
99
-
100
- </ul>
101
-
102
- <div id="validator-badges">
103
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
104
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
105
- Rdoc Generator</a> 1.1.6</small>.</p>
106
- </div>
107
- </body>
108
- </html>