Sha256: 54cf8298a765000d7d6cfd82c15263dafc0b399685486346fe7028ae458ed6a4
Contents?: true
Size: 927 Bytes
Versions: 4
Compression:
Stored size: 927 Bytes
Contents
module Distribution module Normal # TODO module Java_ class << self #== # Generate random variables from the provided distribution def rng(mean=0,sigma=1,seed=nil) dist = NormalDistributionImpl.new(mean, sigma) lambda { dist.sample } end #== # Get the inverse cumulative density function (p-value) for qn def p_value(qn) dist = NormalDistributionImpl.new dist.inverseCumulativeProbability(qn) end #== # Return the cumulative density function at x def cdf(x) dist = NormalDistributionImpl.new dist.cumulativeProbability(x) end #== # Return the probability density function at x def pdf(x) dist = NormalDistributionImpl.new dist.density(x) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems