File: beta.rb

package info (click to toggle)
ruby-distribution 0.7.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 624 kB
  • ctags: 379
  • sloc: ruby: 4,283; makefile: 7
file content (32 lines) | stat: -rw-r--r-- 1,004 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
require 'distribution/beta/ruby'
require 'distribution/beta/gsl'
# no statistics2 functions for beta.
require 'distribution/beta/java'

module Distribution
  # From Wikipedia:
  #    In probability theory and statistics, the beta distribution
  #    is a family of continuous probability distributions defined
  #    on the interval (0, 1) parameterized by two positive shape
  #    parameters, typically denoted by alpha and beta.
  # This module calculate cdf and inverse cdf for Beta Distribution.
  #
  module Beta
    extend Distributable
    SHORTHAND = 'beta'
    create_distribution_methods

    ##
    # :singleton-method: pdf(x,a,b)
    # Returns PDF of of Beta distribution with parameters a and b

    ##
    # :singleton-method: cdf(x,a,b)
    # Returns the integral of Beta distribution with parameters a and b

    ##
    # :singleton-method: p_value(qn,a,b)
    # Return the quantile of the corresponding integral +qn+
    # on a beta distribution's cdf with parameters a and b
  end
end