MM_RANDOMSAMPLE function

Returns a random integer between two specified numbers. You can choose to sample integers without replacement through simulations.

Written By Son Nguyen (Administrator)

Updated at October 5th, 2022

Description

Returns a random integer between two specified numbers. You can choose to sample integers without replacement through simulations.

Syntax

=MM_RANDOMSAMPLE([WithReplacement], [Min,Max])=MM_RANDOMSAMPLE([WithReplacement], [Min,Max])
  • WithReplacement (optional)
    Boolean value.
    TRUE: The sampling is done with replacement.
    FALSE: The sampling is done without replacement, meaning that the function never returns the same integer for 2 different simulations of a same run.

  • Min, Max (optional)
    Min: The smallest integer MM_RANDOMSAMPLE will return.
    Max: The largest integer MM_RANDOMSAMPLE will return.

Remarks

  • If WithReplacement = FALSE and if the number of simulations is greater than the number of integer between Min and Max, then for simulation number n > Max, Mind will return the error NaN.