Module: Kder::Statistics
- Defined in:
- lib/util/statistics.rb
Constant Summary collapse
- SQ2PI =
Math.sqrt(2 * Math::PI)
Class Method Summary collapse
-
.custom_pdf(x, sigma = 1.0) ⇒ Object
Normal pdf with a custom sigma value, still centered around 0.
Class Method Details
.custom_pdf(x, sigma = 1.0) ⇒ Object
Normal pdf with a custom sigma value, still centered around 0.
5 6 7 8 |
# File 'lib/util/statistics.rb', line 5 def self.custom_pdf(x, sigma = 1.0) mean = 0 (1.0/( sigma*SQ2PI))*Math::exp(-0.5*((x-mean)/sigma)**2) end |