Class: Modesty::Experiment::ConversionStat
- Inherits:
-
Stat
- Object
- Stat
- Modesty::Experiment::ConversionStat
show all
- Defined in:
- lib/modesty/experiment/stats.rb
Instance Method Summary
collapse
Methods inherited from Stat
#initialize, #report, #significant?, #title
Instance Method Details
#analysis(*args) ⇒ Object
144
145
146
147
148
|
# File 'lib/modesty/experiment/stats.rb', line 144
def analysis(*args)
@exp.alternatives.hashmap do |a|
data_for(a, *args)
end
end
|
#data(*args) ⇒ Object
150
151
152
|
# File 'lib/modesty/experiment/stats.rb', line 150
def data(*args)
analysis.values
end
|
#default_get_data(on_param) ⇒ Object
136
137
138
139
140
141
142
|
# File 'lib/modesty/experiment/stats.rb', line 136
def default_get_data(on_param)
lambda do |metrics|
num_count = metrics[on_param[0]].count
denom_count = metrics[on_param[1]].count
[num_count, denom_count - num_count]
end
end
|
#inspect ⇒ Object
154
155
156
|
# File 'lib/modesty/experiment/stats.rb', line 154
def inspect
"#<Modesty::Experiment::ConversionStat[ #{@name} ]>"
end
|
#significance(*args) ⇒ Object
158
159
160
|
# File 'lib/modesty/experiment/stats.rb', line 158
def significance(*args)
Significance.significance(*data(*args))
end
|