The Random Numbers analysis can generate random numbers for a given distribution.
This tool can be added to your active workbook by clicking on Stats and then selecting Random Numbers > Generate Random Data.
Inputs
Click on Analysis Setup to open the menu options for this tool.
Setup
A sample screenshot of the setup menu is shown below.
1
Data Type:
Specify the type of data you would like to generate. The available options are:
Option
Description
Discrete
Discrete data is like count data that has only a finite set of values (like the number of defects in a
product example 20, 30, 43).
Continuous
Continuous data can take any arbitrary value (like the temperature of the room example, 34.53 degrees centigrade).
2
Distribution Name:
Specify the name of the distribution to use to generate random numbers. Note that the options shown in the dropdown box depend on the type
of data you have specified in the data type.
3
Sampling Algorithm:
Specify the sampling algorithm to be used to generate the random numbers. The available options are:
Option
Description
Latin Hypercube
Stratifies the input probability distribution and generates a random value for each interval of the input distribution. Hence, the random data closely matches the distribution but is more computationally intensive to generate the random numbers.
Monte Carlo
Generates random numbers entirely randomly, and sample data points can fall anywhere within the range of the specified distribution.
4
Num Rows:
Specify the number of rows of data of random numbers you would like to generate.
5
Random Seed:
Specify the initial value for the random number algorithm. The available options are:
Option
Description
Random
Every time the analysis is run, we will get different random numbers.
Fixed
Specify a fixed value so that every time the sequence of random numbers is the same. This may be useful when multiple people are generating random numbers, and we would like all of them to have similar results.
6
Seed Value:
Specify a seed value for the random numbers. This option is applicable if you have selected Random Seed as Fixed.
7
Distribution Parameters:
Specify the parameters for the random distribution. For example, the normal distribution includes the mean and standard deviation.
8
Distribution Parameters:
Specify the parameters for the random distribution. For example, the normal distribution includes the mean and standard deviation.
9
Help Button:
Click on this button to open the help file for this topic.
10
Cancel Button:
Click on this button to cancel all changes to the settings and exit this dialog box.
11
OK Button:
Click on this button to save all changes and compute the outputs for this analysis.
Stats
A sample screenshot of the stats menu is shown below.
1
Statistics:
Select all the statistics you want to report for the random numbers.
Measure
Description
N
Number of data points.
Mean
Reports the average or the mean value of the data within that group
Median
Reports the median value of the data. The median value is the central value of the data when the data is put in either increasing or decreasing order. For ordinal data, we need the categories to be numeric to report the median value.
Mode
Reports the most frequently occurring category for the binary, nominal, and ordinal data and the most frequently occurring data value for discrete and continuous data types within a group.
Trimmed Mean
Reports the mean value after subtracting the bottom 5% and the top 5% of the data points. It is like reporting the mean value after possibly removing the outliers.
Min
Reports the minimum value observed in the data. Note that this value is reported only if the categories are numeric for the Ordinal data type. No minimum values are reported if text values are entered in the category column.
Max
Reports the maximum value observed in the data. Note that this value is reported only if the categories are numeric for the Ordinal data type. No maximum values are reported if text values are entered in the category column.
Range
Reports the range values (max-min) observed in the data. Note that this value is reported only if the categories are numeric for the Ordinal data type. No range values are reported if text values are entered in the category column.
Stdev
Reports the sample standard deviation value for the given data set within a group. Note that this is the sample standard deviation, not the population standard deviation.
Variance
Reports the variance value, which is the square of the standard deviation for the given data within a group. Note that this is the variance of the sample and not the population.
Q1
Reports the first quartile of the data values for discrete and continuous. This value is reported for ordinal data only if the category values are numeric. The first quartile means that 25% of the data points are less than Q1, and 75% are greater than Q1.
Q3
Reports the third quartile of the data values for discrete and continuous. This value is reported for ordinal data only if the category values are numeric. The third quartile means that 75% of the data points are less than Q3, and 25% are greater than Q3.
IQR
Reports the difference between Q3 and Q1 values. This value is reported for ordinal data only if the category values are numeric.
Sum
Reports the sum of all the data values within a group.
SSQ
Reports the sum of squares of all the data values within a group. Note that the mean value is not subtracted from the data to calculate the Sum of Squares values.
CV
Reports the coefficient of variation for the given set of data within a group. The coefficient of variation is the ratio of the standard deviation to the mean value. It reports the amount of variation in the data. If CV < 1, then we can consider the data as having low variation; if CV > 1, then the data has high variation.
Skewness
Reports a measure of the Skewness of the data. This measure can be used to check if the distribution is symmetric. If skewness is 0, then the distribution is symmetric. If the skewness is negative, the left tail is longer, and if the skewness is positive, the right tail is longer.
Kurtosis
Reports a measure of the shape of the distribution. If the Kurtosis is close to 3, the shape of the distribution is similar to the normal distribution. If Kurtosis is less than 3, there are fewer outliers; if Kurtosis is greater than 3, there could be more outliers.
P Value (Normality)
Reports the P value of the normality test to check if the given data is normally distributed. If the P value is less than alpha, we conclude that the data is not normally distributed.
Charts
You will see the following dialog box if you click the Charts button.
1
Title:
The system will automatically pick a title for your chart. However, if you want to override that with your title, you can specify a title for your chart here. Note that this input is optional.
2
Sub Title:
The system will automatically pick a subtitle for your chart. However, if you want to override that with your subtitle, specify a subtitle for your chart here. Note that this input is optional.
3
X Label:
The system will automatically pick a label for the x-axis. However, if you would like to override that with your label for the x-axis, you can specify a different label here. Note that this input is optional.
4
Y Label:
The system will automatically pick a label for the y-axis. However, if you would like to override that with your label for the y-axis, you can specify a different label here. Note that this input is optional.
5
X Axis:
The system will automatically pick a scale for the x-axis. However, if you would like to override that with your values for the x-axis, you can specify them here. The format for this input is to specify the minimum, increment, and maximum values separated by a semi-colon. For example, if you specify 10;20, the minimum x-axis scale is set at 10, and the maximum x-axis scale is set at 20. If you specify 10;2;20, then, in addition to minimum and maximum values, the x-axis increment is set at 2. Note that this input is currently disabled, and you cannot change this setting.
6
Y Axis:
The system will automatically pick a scale for the y-axis. However, if you would like to override that with your values for the y-axis, you can specify them here. The format for this input is to specify the minimum, increment, and maximum values separated by a semi-colon. For example, if you specify 10;20, the minimum y-axis scale is set at 10, and the maximum y-axis is set at 20. If you specify 10;2;20, then, in addition to minimum and maximum values, the y-axis increment is set at 2. Note that this input is optional.
7
Horizontal Lines:
You can specify the values here if you want to add a few extra horizontal reference lines on top of your chart. The format for this input is numeric values separated by semi-colon. For example, if you specify 12;15, two horizontal lines are plotted at Y = 12 and Y = 15, respectively. Note that this input is optional.
8
Vertical Lines:
You can specify the values here if you want to add a few extra vertical reference lines on top of your chart. The format for this input is numeric values separated by semi-colon. For example, if you specify 2;5, two vertical lines are plotted at X = 2 and X = 5, respectively. Note that this input is optional.
Verify
If you click the Verify button, the software will perform some checks on the data you entered. A sample screenshot of the dialog box is shown in the figure below.
The software checks if you have correctly specified the input options and entered the required data on the worksheet. The results of the analysis checks are listed on the right. If the checks are passed, they are shown as green-colored checkmarks. If the verification checks fail, they are shown as a red-colored cross. If the verification checks result in a warning, they are shown in the orange exclamation mark. Finally, any checks that are required to be performed by the user are shown as blue info icons.
1
Item:
The left-hand side shows the major tabs and the items checked within each section
2
Status:
The right-hand side shows the status of the checks.
3
Overall Status:
The overall status of all the checks for the given analysis is shown here. The overall status check shows a green thumps-up sign if everything is okay and a red thumps-down sign if any checks have not passed. Note that you cannot proceed with generating analysis results for some analyses if the overall status is not okay.
Outputs
Click on Compute Outputs to update the random numbers. Since the numbers are all random, no two persons should have the same set of random numbers.
The random numbers are generated and stored in the worksheet. You can check the histogram to ensure that the data generated by the software is a close fit to the distribution. If not, you can click on Compute Outputs to regenerate new data points.
Notes
List of distributions and their parameters:
Num
Type
Distribution
Parameters
1
Continuous
Beta
Nu, Omega, Min, Max
2
Continuous
Cauchy
a, b
3
Continuous
Erlang
b, c
4
Continuous
Extreme Value
a, b
5
Continuous
Exponential
b
6
Continuous
Gamma
b, c
7
Continuous
Laplace
a, b
8
Continuous
Log Normal
Mu, Sigma
9
Continuous
Logistic
a, b
10
Continuous
Normal
Mu, Sigma
11
Continuous
Pareto
a, b
12
Continuous
Power
b,c
13
Continuous
Rayleigh
b
14
Continuous
Triangular
a, b, c
15
Continuous
Uniform
a, b
16
Continuous
Weibull
Eta, Beta
17
Discrete
Bernoulli
p
18
Discrete
Binomial
N, p
19
Discrete
Discrete Uniform
a, b
20
Discrete
Geometric
p
21
Discrete
Hyper Geometric
N, n, X
22
Discrete
Negative Binomial
x, p
23
Discrete
Poisson
lambda
Examples
The following examples are in the Examples folder.
Generate 500 random numbers for a binomial distributed data with n = 100 and p = 0.5. (Random 1.xlsx).
FAQ
This section contains some frequently asked questions. If you have other questions about this module, please get in touch with technical support.
How do I generate the same set of random numbers each time?
By default, the software will generate different random numbers each time you recompute the outputs. However, to get the same random numbers, set the Random Seed to Fixed and use the same seed value (say 1). This will ensure that you get the same set of random numbers each time you recompute the outputs. However, note that there is no guarantee that these random numbers will be the same between different versions of Excel or other versions of the Sigma Magic software you are running.