RANDDISCRETE

RANDDISCRETE

Synopsis

RANDDISCRETE(val_range[,prob_range])

Description

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

  • If prob_range is omitted, the uniform discrete distribution is assumed.
  • If the sum of all values in prob_range is other than one, RANDDISCRETE returns #NUM! error.
  • If val_range and prob_range are not the same size, RANDDISCRETE returns #NUM! error.
  • If val_range or prob_range is not a range, RANDDISCRETE returns #VALUE! error.

Examples

RANDDISCRETE(A1:A6) returns one of the values in the range A1:A6.

See also

RANDBETWEEN, RAND.