Category: Helper Functions
Returns random real number according to (continuous) empirical distribution. A new random real number is returned every time the worksheet is calculated.
The syRandomEmpirical function syntax has the following arguments:
- Values: required. Range of data.
Return value is real number generated according to empirical distribution and given data.
This function is defined as continuous. If you provide a range with a huge number of integer values, it will appear as the function returns these integers, however some of the return values will not be integers. This happens because the function interpolates if two neighbouring values are not equal - this is clearly visible when the dataset is small. If you would like to avoid analysing the dataset with estimating frequencies of discrete values and constructing a discrete distribution, you could write
=ROUND(syRandomEmpirical(H6:Q16),0), however you should always be careful and prepare an unbiased random number generator.
=syRandomEmpirical(H6:Q16)- The function generates real numbers according to the continuous empirical distribution.