RANDDISCRETE

RANDDISCRETE random variate from a finite discrete distribution

Synopsis

RANDDISCRETE(val_range,prob_range)

Arguments

val_range: possible values of the random variable

prob_range: probabilities of the corresponding values in val_range, defaults to equal probabilities

Description

RANDDISCRETE returns one of the values in the val_range. The probabilities for each value are given in the prob_range.

Note

If the sum of all values in prob_range is not one, RANDDISCRETE returns #NUM! If val_range and prob_range are not the same size, RANDDISCRETE returns #NUM! If val_range or prob_range is not a range, RANDDISCRETE returns #VALUE!

See also

RANDBETWEEN, RAND.