# Addons/stats/base/distribution

From J Wiki

< Addons | stats/base

**stats/base/distribution** ` - ` statistical distributions

binomialdist v discrete values for binomial distribution binomialprob v probability of success in binomial distribution chisqcdf v chi squared CDF normalcdf v normal distribution (0,1) CDF normalprob v probability of success in normal distribution poissondist v discrete values for poisson distribution poissonprob v probability of success in poisson distribution

## Contents

### binomialdist

binomialdist (v) discrete values for binomial distribution

y has 2 elements p,n: 0 = probability of success in one trial 1 = number of trials E=n*p, var=n*p*-.p e.g. binomialdist 0.25 5 ...distribution of results from 0 to 5

### binomialprob

binomialprob (v) probability of success in binomial distribution

y has 3 or 4 elements: 0 = probability of success in one trial 1 = number of trials 2 = minimum number of successes {3} = maximum number of successes e.g. binomialprob 0.25 100 30 40 ...probability that there are between 30 and 40 successes in 100 trials, where probability = 0.25

### chisqcdf

chisqcdf (v) chi squared CDF

chi squared cumulative distribution function see wiki Essays/Chi_Squared_CDF

### normalcdf

normalcdf (v) normal distribution (0,1) CDF

normal(0,1) cumulative distribution function see wiki Essays/Normal_CDF the following are equivalent, but normalcdf more accurate: normalcdf X 1 - normalprob 0 1, X

### normalprob

normalprob (v) probability of success in normal distribution

y has 3 or 4 elements: 0 = mean of distribution 1 = standard deviation 2 = minimum result {3} = maximum result e.g. normalprob 0 1 2 ...probability that result will be greater than 2, where mean = 0, standard deviation 1 Result is rounded to 7 decimal places Algorithm has accuracy ~ 7.5*1e_8

### poissondist

poissondist (v) discrete values for poisson distribution

y has 2 elements: 0 = mean of distribution 1 = maximum value to show e.g. poissondist 2 10 = list of probabilities of values from 0 to 10 in poisson distribution of mean 2

### poissonprob

poissonprob (v) probability of success in poisson distribution

y has 2 or 3 elements: 0 = mean of distribution 1 = minimum number of successes {2} = maximum number of successes e.g. poissonprob 5 4 7 ...probability that result will be between 4 and 7 inclusive, where mean result is 5. poissonprob 5 6 6 ...probability that result will be exactly 6, where mean result is 5.