Class: Modesty::Experiment::DistributionStat

Inherits:
Stat
  • Object
show all
Defined in:
lib/modesty/experiment/stats.rb

Instance Method Summary collapse

Methods inherited from Stat

#initialize, #report, #significant?, #title

Constructor Details

This class inherits a constructor from Modesty::Experiment::Stat

Instance Method Details

#analysis(*args) ⇒ Object



125
126
127
# File 'lib/modesty/experiment/stats.rb', line 125

def analysis(*args)
  Significance.dist_significance(data(*args))
end

#data(*args) ⇒ Object



119
120
121
122
123
# File 'lib/modesty/experiment/stats.rb', line 119

def data(*args)
  @exp.alternatives.hashmap do |a|
    data_for(a, *args)
  end
end

#default_get_data(on_param) ⇒ Object



109
110
111
112
113
# File 'lib/modesty/experiment/stats.rb', line 109

def default_get_data(on_param)
  lambda do |metrics|
    metrics[on_param].distribution
  end
end

#inspectObject



115
116
117
# File 'lib/modesty/experiment/stats.rb', line 115

def inspect
  "#<Modesty::Experiment::DistributionStat[ (on #{@exp.slug}) (of #{@metric_sym.inspect}) ]>"
end

#significance(*args) ⇒ Object



129
130
131
# File 'lib/modesty/experiment/stats.rb', line 129

def significance(*args)
  analysis(*args)[:significant]
end