Addons/stats/base/random

From J Wiki
Jump to: navigation, search
User Guide | Installation | Development | Categories | Git | Build Log

stats/base/random - Random number generation

setrl v set random link
rand01 v generate y random numbers in interval (0,1)
rand11 v generate y random numbers in interval (_1,1)
randomize v sets a random value into random link
deal v deal x items from y (no repetition)
dealx v deal x indices from shape y (no repetition)
toss v pick x items from y (with repetition)
tossx v pick x indices from shape y (with repetition)
betarand v random numbers in a beta distribution
binomialrand v random numbers 0 and 1 in binomial distribution
cauchyrand v random numbers in a cauchy distribution
discreterand v random numbers in a discrete distribution
exponentialrand v random numbers in an exponential distribution
gammarand v random numbers in a gamma distribution
normalrand v random numbers in a standard normal distribution,
poissonrand v random numbers in a poisson distribution

setrl

setrl (v) set random link

rand01

rand01 (v) generate y random numbers in interval (0,1)

rand11

rand11 (v) generate y random numbers in interval (_1,1)

randomize

randomize (v) sets a random value into random link

deal

deal (v) deal x items from y (no repetition)

dealx

dealx (v) deal x indices from shape y (no repetition)

toss

toss (v) pick x items from y (with repetition)

tossx

tossx (v) pick x indices from shape y (with repetition)

betarand

betarand (v) random numbers in a beta distribution

y has 3 elements p,q,n
  0 = power parameter
  1 = power parameter
  2 = number of trials

binomialrand

binomialrand (v) random numbers 0 and 1 in binomial distribution

y has 2 elements:
 0  =  probability of success in one trial
 1  =  number of trials

cauchyrand

cauchyrand (v) random numbers in a cauchy distribution

with F(x)=0.5+(arctan x)%o.1

y  =  number of trials

discreterand

discreterand (v) random numbers in a discrete distribution

y has two elements
  0 =  2-row matrix: 0 =  discrete values
                     1 =  corresponding probabilities
  1 =  number of trials

exponentialrand

exponentialrand (v) random numbers in an exponential distribution

with mean=1. F(x)=1-^-x

y  =  number of trials

gammarand

gammarand (v) random numbers in a gamma distribution

y has 2 elements p,n
  0 = power parameter
  1 = number of trials

if p=1 this is the exponential distribution

normalrand

normalrand (v) random numbers in a standard normal distribution,

with  mean=0, standard deviation=1.
y  = number of trials.

poissonrand

poissonrand (v) random numbers in a poisson distribution

y has 2 elements:
  0  = mean of distribution (=variance)
  1  = number of trials