Chapter 6 AppendixIntroduction to Inference with Excel, JMP, Minitab, SPSS, CrunchIt!, R, and TI-83/-84 Calculators

TA6-1

Inference for the Mean(Known)

image

Confidence Interval

Excel does not have a routine for reporting the lower and upper limits of a confidence interval for the mean. However, you can use Excel to compute the margin of error, which can then be subtracted and added to the sample mean to get the confidence interval.

  1. Click an empty cell in the spreadsheet.
  2. Formulas ➔ More Functions ➔ Statistical
  3. Scroll down the list of functions and click on “CONFIDENCE.NORM.”
  4. In the “Alpha” box, input (for example, 0.05) to obtain a (here, 95%) confidence interval.
  5. In the “Standard dev” box, input the known population standard deviation ().
  6. In the “Size” box, input the sample size and then click “OK.”

Tests of Statistical Significance

To conduct a test of the mean with known population standard deviation, Excel only provides a statistical function that will report the -value for a one-sided, greater-than alternative hypothesis, and only with data.

  1. Click an empty cell in the spreadsheet.
  2. Formulas ➔ More Functions ➔ Statistical
  3. Scroll down the list of functions and click on “ZTEST.”
  4. In the “Array” box, input the cell range of the data.
  5. In the “X” box, input the null hypothesis mean value ().
  6. In the “Sigma” box, input the known population standard deviation ().
  7. Click “OK” to find the -value, which is reported in the selected cell.

Note: If your alternative hypothesis is a less-than alternative, subtract the reported -value from 1 to obtain the appropriate -value. For a two-sided alternative, if the reported -value is less than 0.5, you should double it; otherwise, you should double (1 − reported -value).

The Excel Video Technology Manuals on Confidence Intervals: Z - with Data, Confidence Intervals: Z - Summarized Data, One Mean Test: Z - with Data and Sample Size Computation can help here with additional explanation and worked examples.

TA6-2

image

Confidence Interval

With Raw Data:

  1. Help ➔ Sample Data ➔ Calculators (in the teaching resources section) ➔ Confidence Interval for One Mean
  2. Choose “Raw Data.”
  3. Select a numeric column in your data set and click “OK.”
  4. Enter the value of sigma and press “Enter.”

With Summarized Data:

  1. Help ➔ Sample Data ➔ Calculators (in the teaching resources section) ➔ Confidence Interval for One Mean
  2. Choose “Summary Statistics.”
  3. Enter the sample average, population standard deviation, and sample size, then press “Enter.”

Note: A Z-Based Confidence Interval can also be obtained from Analyze ➔ Distribution. With the red arrow option choose “Confidence Interval” then “Other” then Use known sigma.

Tests of Statistical Significance

With Raw Data:

  1. Help ➔ Sample Data ➔ Calculators (in the teaching resources section) ➔ Hypothesis Test for One Mean
  2. Choose “Raw Data.”
  3. Select a numeric column in your data set and click “OK.”
  4. Choose the type of alternative hypothesis.
  5. Enter the value of the hypothesized mean and population standard deviation.
  6. Enter a value for alpha, and click “Enter.”

Note: You can check the box for “reveal decision” to show the conclusion of the hypothesis test.

In addition, hypothesis tests for one sample mean may be computed in a more customary way using the distribution platform:

  1. Analyze ➔ Distribution
  2. Select a numeric column and click “Y, Columns” to enter this variable in the Y role.
  3. Select the red triangle and click “Test Mean.”
  4. Enter the hypothesized value of the mean and the known population standard deviation.
  5. Click “OK.”

With Summarized Data:

  1. Help ➔ Sample Data ➔ Calculators (in the teaching resources section) ➔ Hypothesis Test for One Mean
  2. Choose “Summary Statistics” and click “OK.”
  3. Choose the type of alternative hypothesis.
  4. Enter the value of the hypothesized mean as well as the sample mean.
  5. Enter the population standard deviation.
  6. Enter the sample size.
  7. Enter a value for alpha and click “Enter.”

TA6-3

The JMP Video Technology Manuals on Confidence Intervals: Z - with Data, Confidence Intervals: Z - Summarized Data, One Mean Test: Z - with Data, One Mean Test: Z - Summarized Data and Sample Size Computation can help here with additional explanation and worked examples.

image

Both confidence intervals and hypothesis tests are done through the Stat ➔ Basic Statistics ➔ 1-Sample Z dialog.

  1. Select the correct option “One or more samples, each in a column” for raw data or “Summarized data.”
  2. For raw data, click and select the column of interest; enter the population standard deviation.
  3. For summary statistics, enter the sample size (n), sample mean (), and population standard deviation ().
  4. The defaults are 95% confidence and a “not equal” alternate (two-sided confidence interval). To change either of these, click “Options,” change the value, then click “OK.”
  5. For the confidence interval, click “OK.”
  6. For a hypothesis test, check the box and enter the value of ; then click “OK.”

Sample Size Needed for a Given Margin of Error

  1. Stat ➔ Power and Sample Size ➔ Sample Size for Estimation
  2. The default option is Mean (Normal); enter the given standard deviation and desired margin of error.
  3. Click “Options” and change the confidence level (if needed); check the box labeled “Assume population standard deviation is known.” Click “OK” to return to the main dialog and “OK” for the results.

The Minitab Video Technology Manuals on Confidence Intervals: Z - with Data, Confidence Intervals: Z - Summarized Data, One Mean Test: Z - with Data, One Mean Test: Z - Summarized Data and Sample Size Computation can help here with additional explanation and worked examples.

image

SPSS does not compute confidence intervals, hypothesis tests, or power for one mean when sigma is known.

Note: See the SPSS technology manual for this chapter for instructions on using SPSS as a calculator to perform the tests and procedures above.

image

Both confidence intervals and hypothesis tests are done through the Statistics ➔ Z ➔ 1-Sample dialog.

  1. For raw data in a column, click the “Columns” tab; otherwise, click “Summarized.”
  2. For raw data, select the column of interest and enter the known standard deviation.
  3. For summarized data, enter the sample size (n), observed sample mean, and known standard deviation.
  4. Select the “Confidence Interval” tab and enter the desired confidence level, or
  5. Select the “Hypothesis Test” tab. Enter the hypothesized mean value and type of alternate hypothesis.
  6. Click “Calculate.”

The CrunchIt! Help Videos on Confidence Intervals Using Z, One Mean Test Using Z, and Sample Size Computation for One Mean Inference Using Z can help here with examples.

TA6-4

image

R does not have automatic routines to compute confidence intervals, hypothesis tests, or power for one mean when sigma is known. You can use pnorm(z) to find for the -value of a test or the power of a test as described in the text.

The R Video Technology Manuals on Confidence Intervals for a Population Mean Based on Z, Significance Test for a Population Mean Based on Z, and Sample Size Computation for Inference on a Population Mean can help here with additional explanation and worked examples.

image

Confidence Interval

  1. Press image image to select “TEST.”
  2. Select 7:Zinterval.
  3. Select “Data” (you have entered the actual sample data in a list) or “Stats.”
  4. For raw data, enter L1 (or whichever list has your data) as the data location, the population standard deviation, and the confidence level.
  5. For summarized data (you have Stats), enter the population standard deviation, the sample mean, the sample size, and the confidence level.
  6. Select “Calculate.”

Tests of Statistical Significance

  1. Press image image to select “TEST.”
  2. Select 1:Z-test
  3. Select “Data” (you have entered the actual sample data in a list) or “Stats.”
  4. Enter the value of the mean under the null hypothesis and the value of the population standard deviation.
  5. For raw data, enter L1 (or whichever list has your data) as the data location.
  6. For summarized data (you have Stats), enter the sample mean, and sample size.
  7. Select the desired type of alternative hypothesis.
  8. Select “Calculate.”

The TI-83/-84 Video Technology Manuals on Confidence Intervals: Z - with Data, Confidence Intervals: Z - Summarized Data, One Mean Test: Z - with Data, One Mean Test: Z - Summarized Data and Sample Size Computation can help here with additional explanation and worked examples.

Power

image

Automated power calculations are not available in standard Excel or the enhanced add-on version of Excel. However, you can compute power in Excel by following the general steps for computing power described in this chapter and then use Excel’s NORMDIST function.

image

  1. DOE ➔ Sample Size and Power ➔ One Sample Mean (if you do not have a DOE menu, enter the JMP preferences, select Menu, and check the box for “Design of Experiments”).
  2. Enter a value for alpha and the population standard deviation.
  3. Supply two values in the table and press “Continue” to calculate the third.
  4. Press “Animation Script” to view an interactive visualization of power.

TA6-5

image

  1. Stat ➔ Power and Sample Size ➔ 1-Sample Z
  2. You can specify values for any two of the following three dialog boxes: “Sample sizes,” “Differences,” or “Power values.” Minitab will then compute the item not specified.

Note: Minitab assumes a two-sided alternative and 5% significance level. If you wish to have a one-sided alternative or change an level, click “Options,” change the value, and click “OK” to return to the main dialog. Additionally, Minitab will produce a “Power Curve,” which is simply a graph of the different power values against a range of difference values.

image

SPSS does not compute confidence intervals, hypothesis tests, or power for one mean when sigma is known.

Note: See the SPSS technology manual for this chapter for instructions on using SPSS as a calculator to perform the tests and procedures above.

image

To Determine Power for a Given Sample:

  1. Statistics ➔ Power Analysis ➔ Calculate Power
  2. Enter the values for alpha (as a decimal), the size of the effect you want to detect, the population standard deviation, and the sample size.
  3. Select the type of alternative hypothesis.
  4. Click “Calculate.”

To Determine Sample Size for a Desired Power:

  1. Statistics ➔ Power Analysis ➔ Calculate Sample Size
  2. Enter the values for alpha (as a decimal), the size of the effect, the population standard deviation, and the desired power.
  3. Select the type of alternative hypothesis.
  4. Click “Calculate.”

image

R does not have built-in functions for this situation, but one can type R commands using it as a calculator to obtain various things like test statistic and interval limits. You can use pnorm(z) to find for the -value of a test or the power of a test as described in the text.

image

Automated power calculations are not available; however, power can be calculated by using normalCDF as described in the Chapter 1 Appendix. For more detailed instructions, see the technology manual for this chapter.