Chi-square

Chi-square

Function for generating values from chi-square distributions. Interface chisq(n:int) : real where n>=1. It returns a drawing from a chi-square distribution with n degrees of freedom. The sum of the squares of n independent normally distributed random variables with mean 0.0 and standard deviation 1.0 is a chi-squared distribution with n degrees of freedom. It raises Chisq exception if n<1. Characteristics Mean: n Variance: 2n […]

Read Me Leave comment

Binomial

Binomial

Function for generating values from binomial distributions. Interface binomial(n:int, p:real) : int where n>=1 and 0.0<=p<=1.0. This function returns a drawing from a binomial distribution with n experiments and probability p for success. It raises Binomial exception if n<1 or p<0.0 or p>1.0. Characteristics Mean: np Variance: np(1-p) Probability mass functions for binomial distributions: Example binomial (100, 1.0/6.0) Throw a die 100 times and observe […]

Read Me Leave comment

Beta

Beta

Note: Introduced in CPN Tools 3.2.2. Interface  beta(a:real, a:real) : real where a,b>=0.0. Returns a drawing from a beta distribution with parameters a and b. Raises Beta exception, ifa<=0.0 or b<=0.0. Related pages Random distribution functions

Read Me Leave comment

Bernoulli

Bernoulli

Function for generating values from Bernoulli distributions. Interface bernoulli(p:real) : int where 0.0<=p<=1.0. The value returned is either 0 or 1. The function returns a drawing from a Bernoulli distribution with probability p for success (i.e., success=1). It raises Bernoulli exception if p<0.0 or p>1.0. Characteristics Mean: p Variance: p(1-p) Example bernoulli(1.0/6.0) Throw a die and observe if a six was thrown. This experiment has […]

Read Me Leave comment

Random distribution functions

Random distribution functions

Term definitions Random-number generator: A function that generates numbers that are uniformly distributed over the interval (0,1). Random-variate generator: A function that generates numbers whose probability distribution is different from that of the uniform on the interval (0,1). Random-variate generators Below is a brief summary of the random-number generators that are available. Click on a function name to see a more detailed explanation. bernoulli(p:real) : […]

Read Me Leave comment