Help Manual

Contents






Sigma Magic Help Version 15

Sample Size

Overview

Sample Size Analysis can be used to determine the minimum sample size required for a given level of alpha and beta error. Sample Size can be determined for 1-sample Z test, 1-sample t-test, 2-sample t-test, ANOVA, 1-sample stdev, 2-sample stdev, 1-proportion test, and 2-proportion test. This analysis can be used to determine how many data points should we collect before we perform hypothesis testing to minimize both Type I and Type II errors. Make sure that any data you collect is not biased, fully randomized, and representative of the population.

This tool can be added to your active workbook by clicking on Stats and then selecting Sample Size > Sample Size Analysis.

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 for your analysis. 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 or the number of defective products manufactured in one month).
ContinuousContinuous data can take any arbitrary value (like the temperature of the room example 34.53 deg centigrade).
2
Comparison: Specify the type comparison you want to make for your data. The available options are:
OptionDescription
MeanWe want the required sample size to compare the average value of one or more data sets.
StdevWe want the required sample size to compare the standard deviation value of one or more data sets.
ProportionWe want the required sample size to compare the proportion of defects or defectives in the data.
3
Num Samples: Specify the number of samples(data sets) you are comparing.
4
Hypothesis Test: Specify the specific hypothesis test you plan to use and the sample size will be determined for this test.
5
Help Button: Click on this button to open the help file for this topic.
6
Cancel Button: Click on this button to cancel all changes to the settings and exit this dialog box.
7
OK Button: Click on this button to save all changes and compute the outputs for this analysis.

Hypothesis

A sample screenshot of the hypothesis menu for continuous data is shown below. However, the menu options for the discrete case are very similar as well.
inputs 2
1
Null Hypothesis: Specify the null hypothesis (enter 0 if you are comparing more than 1 set of data). Note that for proportions, the null hypothesis should be between 0 and 1.
2
Alt Hypothesis: Specify the alternate hypothesis (less than, greater than, or not equal). The default setting is Not Equal. If you select either less than or greater than, then the software will perform a one-sided hypothesis test.
3
Confidence Level: Enter the confidence level required for your analysis. This controls your Type I or Alpha error (1 - Confidence Level). The default value for this is 95%.
4
Population Size: For certain types of analysis, the population size may not be very large. In these cases, we can specify the population size here so that the sample size calculator will take into account the limited size of the population when recommending the adequate sample size for analysis. For most cases, the population size is very large and in those cases you can use the character string INF to denote a very large population size.

Data

If you click on the Data button, you will see the following dialog box. Data
1
Objective: Specify the objective of this study. The available options are:
OptionDescription
Sample SizeDetermine the minimum number of samples required to detect a difference of delta with a given level of power of the test.
DeltaDetermine the minimum difference we can detect between samples when the sample size is fixed and we want to achieve a certain power of the test.
PowerDetermine the maximum power of the test to detect a difference of delta with a given number of samples.
2
Sample Size: Unless you have specified an objective of determining the sample size, you will need to specify the number of samples you have available for your study. By default, this field is not enabled as the software will determine the minimum sample size you would need. Note that the minimum sample size is across all the samples (or data sets) that you are using for the comparison.
3
Power of the Test: Unless you have specified an objective of determining the power of the test, you will need to specify the required power for your study. By default, this value is 90%. The value of power is also equal to 1 - beta (type II error). Hence, if you specify the power as 90%, then you are accepting that this study may have a Type II error of up to 10%.
4
Delta (Differnce): Unless you have specified an objective of determining the minimum difference (delta), you will need to specify the minimum difference in samples you would like your study to detect.
5
Standard Deviation: For continuous data type, you will need to specify the value of the standard deviation for your study. How much variation do you have in your data values. The more the variation (or standard deviation), the more the number of samples that would be required for your analysis.
6
Hypothesis Statement: The statement about the specific hypothesis test that is being run is displayed here. Make sure you check this statement to make sure all your inputs are correct, if not you may need to adjust your analysis inputs.

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 own values for the x-axis, you can specify them here. The format for this input is to specify the minimum, increment, and maximum values seperated 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, 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 own values for the y-axis, you can specify them here. The format for this input is to specify the minimum, increment, and maximum values seperated 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 output calculations. A sample screen shot of the worksheet is shown below. outputs The analysis reports the minimum number of samples needed in order to achieve a certain level of alpha and beta errors. The graph shows the variation in power for different values of the sample size. The recommended setting for the minimum sample size is shown by the red dot. If you are unable to get these many samples, this graph can be used to estimate how much power you lose in your analysis by having a smaller sample size.

Notes

Here are a few pointers regarding this analysis:
  • Note that the minimum sample size is reported for each data set. So, if you have two data sets, then each data set should have at least the minimum number of sample size.
  • If you have fewer samples than the one mentioned by the analysis, then you will be making larger Type I and/or Type II errors when you perform hypothesis tests.

Examples

Following examples can be found in the Examples folder.
  • Determine the minimum sample size required for checking if the time to respond to a call is similar to the industry average. The data for this example is given in the reference file (Sample Size 1.xlsm).
  • Determine the minimum sample size required for comparing the cycle time of department 1 and department 2 are similar. The data for this example is given in the reference file (Sample Size 1.xlsm).
  • Determine the minimum sample size required for comparing the number of defects by two suppliers. The data for this example is given in the reference file (Sample Size 1.xlsm).