Help Manual

Contents






Sigma Magic Help Version 15

Generate Random Numbers

Overview

The Random Numbers analysis can be used to 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.
inputs
1
Data Type: Specify the type of data you would like to generate. The available options are:
OptionDescription
DiscreteDiscrete data is like count data that has only finite set of values (like the number of defects in a product example 20, 30, 43).
ContinuousContinuous data can take any arbitrary value (like the temperature of the room example 34.53 deg centigrade).
2
Distribution Name: Specify the name of the distribution to use for generating random numbers. Note that that options shown in the dropdown box depends 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:
OptionDescription
Latin HypercubeStratifies the input probability distribution and generates random value for each interval of the input distribution. Hence, the random data more closely matches the distribution but is more computationally intensive to generate the random numbers.
Monte CarloGenerates 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:
OptionDescription
RandomEvery time the analysis is run, we will get different random numbers.
FixedSpecify 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, for the normal distribution, this includes the mean and standard deviation.
8
Distribution Parameters: Specify the parameters for the random distribution. For example, for the normal distribution, this 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.
inputs
1
Statistics: Select all the statistics that you would like to report for the random numbers.
MeasureDescription
NNumber of data points.
MeanReports the average or the mean value of the data within that group
MedianReports 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 to categories to be numeric in order to report the median value.
ModeReports 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 MeanReports the mean value after subtracting the bottom 5% and the top 5% of the data points. Basically, it is like reporting the mean value after possibly removing the outliers.
MinReports the minimum value observed in the data. Note that for Ordinal data type, this value is reported only if the categories are numeric. If text values are entered in the category column, then no minimum values are reported.
MaxReports the maximum value observed in the data. Note that for Ordinal data type, this value is reported only if the categories are numeric. If text values are entered in the category column, then no maximum values are reported.
RangeReports the range values (max - min) observed in the data. Note that for Ordinal data type, this value is reported only if the categories are numeric. If text values are entered in the category column, then no range values are reported.
StdevReports the sample standard deviation value for the given data set within a group. Note that this is the sample standard deviation and not the population standard deviation.
VarianceReports 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.
Q1Reports the first quartile of the data values for discrete and continous. 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% of the data points are greater than Q1.
Q3Reports the third quartile of the data values for discrete and continous. 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% of the data points are greater than Q3.
IQRReports the difference between Q3 and Q1 values. This value is reported for ordinal data only if the category values are numeric.
SumReports the sum of all the data values within a group.
SSQReports 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.
CVReports the coefficient of variation for the given set of data within a group. The coefficient of variation is the ration 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 and if CV > 1, then the data has high variation.
SkewnessReports 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 then left tail is longer and if the skewness is positive then the right tail is longer.
KurtosisReports a measure of the shape of the distribution. If the Kurtosis is close to 3, the shape of the distribution is similar to normal distribution. If Kurtosis is less than 3, then there are fewer outliers and if the Kurtosis is greater than 3, there could be more number of outliers.
P Value (Normality)Reports the P value of the normality test to check if the given data is normally distributed. If P value is less than alpha, we conclude that the data is not normally distributed.

Charts

If you click on the Charts button, you will see the following dialog box. Charts
1
Title: The system will automatically pick a title for your chart. However, if you would like to override that with your own 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 would like to override that with your own subtitle you can 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 own 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 own 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 then 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 will not be able to 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 then the minimum y-axis scale is set at 10 and the maximum y-axis scale 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: If you want to add a few extra horizontal reference lines on top of your chart you can specify the values here. The format for this input is numeric values separated by semi-colon. For example, if you specify 12;15 then two horizontal lines are plotted at Y = 12 and Y = 15 respectively. Note that this input is optional.
8
Vertical Lines: If you want to add a few extra vertical reference lines on top of your chart you can specify the values here. The format for this input is numeric values separated by semi-colon. For example, if you specify 2;5 then two vertical lines are plotted at X = 2 and X = 5 respectively. Note that this input is optional.

Verify

If you click on the Verify button, the software will perform some checks on the data you have entered. A sample screenshot of the dialog box is shown in the figure below. Verify The objective of this analysis as well as any checks that are performed is listed in this dialog box. For example, the software may check 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, then they are shown as a green-colored checkmark. If the verification checks fail, then they are shown as a red-colored cross. If the verification checks result in a warning, they are shown in the orange color exclamation mark and finally, any checks that are required to be performed by the user are shown as blue info icons.

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. outputs 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

Following examples can be found in the Examples folder.
  • Generate 500 random numbers for a binomial distributed data with n = 100 and p = 0.5. (Random 1.xlsm).