# How Do I Perform Power and Sample Size Calculations for a One Sample t-Test?

## Power and Sample Size One Sample t-Test Customer Data

Using the One Sample t-Test, we determined that Customer Types 1 and 3 resulted in Fail to reject H0: μ=3.5. A failure to reject H0 does not mean that we have proven the null to be true. The question that we want to consider here is What was the power of the test? Restated, What was the likelihood that given Ha: μ≠3.5 was true, we would have rejected H0 and accepted Ha? To answer this, we will use the Power and Sample Size Calculator.- Click
**SigmaXL > Statistical Tools > Power and Sample Size Calculators > 1 Sample t-Test Calculator**. We will only consider the statistics from Customer Type 3 here. We will treat the problem as a two sided test with**Ha:***Not Equal To*to be consistent with the original test. - Enter 27 in
**Sample Size (N)**. The difference to be detected in this case would be the difference between the sample mean and the hypothesized value i.e. 3.6411 3.5 = 0.1411. Enter 0.1411 in**Difference**. Leave**Power**value blank, with**Solve For Power**selected (default). Given any two values of Power, Sample size, and Difference, SigmaXL will solve for the remaining selected third value. Enter the sample standard deviation value of 0.6405 in**Standard Deviation**. Keep**Alpha**and**Ha**at the default values as shown:

- Click
**OK**. The resulting report is shown: - A power value of 0.1968 is very poor. It is the probability of detecting the specified difference. Alternatively, the associated Beta risk is 1-0.1968 = 0.8032 which is the probability of failure to detect such a difference. Typically, we would like to see Power > 0.9 or Beta < 0.1. In order to detect a difference this small we would need to increase the sample size. We could also set the difference to be detected as a larger value.
- First we will determine what sample size would be required in order to obtain a Power value of 0.9. Click
**Recall SigmaXL Dialog**menu or press**F3**to recall last dialog. Select the**Solve For Sample Size**button as shown. It is not necessary to delete the entered sample size of 27 it will be ignored. Enter a**Power Value**of .9:

- Click
**OK**. The resulting report is shown:

- A sample size of 219 would be required to obtain a power value of 0.9. The actual power is rarely the same as the desired power due to the restriction that the sample size must be an integer. The actual power will always be greater than or equal to the desired power.
- Now we will determine what the difference would have to be to obtain a Power value of 0.9, given the original sample size of 27. Click
**Recall SigmaXL Dialog**menu or press**F3**to recall last dialog. Select the**Solve For Difference**button as shown:

- Click
**OK**. The resulting report is shown:

- A difference of 0.415 would be required to obtain a Power value of 0.9, given the sample size of 27.

Given the p-value of .012, we reject H0 and conclude that the sweetness has in fact decreased.

### Power and Sample Size One Sample t-Test Graphing the Relationships between Power, Sample Size, and Difference

In order to provide a graphical view of the relationship between Power, Sample Size, and Difference, SigmaXL provides a tool called**Power and Sample Size with Worksheets**. Similar to the Calculators,

**Power and Sample Size with Worksheets**allows you to solve for Power (1 Beta), Sample Size, or Difference (specify two, solve for the third). You must have a worksheet with Power, Sample Size, or Difference values. Other inputs such as Standard Deviation and Alpha can be included in the worksheet or manually entered.

- Open the file
**Sample Size and Difference Worksheet.xls**, select the**Sample Size & Diff**sheet tab. Click**SigmaXL > Statistical Tools > Power & Sample Size with Worksheets > 1 Sample t-Test**. If necessary, check**Use Entire Data Table**. Click**Next**. - Ensure that
**Solve For Power (1 Beta)**is selected. Select*Sample Size (N)*and*Difference*columns as shown. Enter the**Standard Deviation**value of 1. Enter .05 as the**Significance Level**value: - Click
**OK**. The output report is shown below: - To create a graph showing the relationship between Power, Sample Size and Difference, click
**SigmaXL > Statistical Tools > Power & Sample Size Chart**. Check**Use Entire Data Table**. Click**Next**. - Select
*Power (1 Beta)*, click**Y Axis (Y)**; select*Sample Size (N)*, click**X Axis (X1)**; select*Difference*, click**Group Category (X2)**. Click**Add Title**. Enter*Power & Sample Size: 1 Sample t-Test*: - Click
**OK**. The resulting Power & Sample Size Chart is displayed:

**Click here to download a Free 30-Day Trial.**

# Web Demos

Our CTO and Co-Founder, John Noguera, regularly hosts free Web Demos featuring SigmaXL and DiscoverSim**Click here to view some now!**

# Contact Us

**Ph: **1.888.SigmaXL (744.6295)

**Support: **Support@SigmaXL.com

**Sales: **Sales@SigmaXL.com

**Information: **Information@SigmaXL.com