One-Sample t-Test

 < Day Day Up > 



The One-Sample t-Test task enables you to test whether the mean of a variable is less than, greater than, or equal to a specific value. The observed mean of the variable is compared to this value.

The data set analyzed in the following example, Bthdth92, is taken from the 1995 Statistical Abstract of the United States, and it contains measures of the birth rate and infant mortality rate for 1992 in the United States. Information is provided for the 50 states and the District of Columbia, grouped by region.

Suppose you want to determine whether the average infant mortality rate in the United States is equal to a specific value. Note that the one-sample t-test is appropriate in this situation because the standard deviation of the population from which the data arise is unknown. When you know the standard deviation of the population, use the One-Sample Z-Test for a Mean task (see the section "Discussion of Other Tests" on page 231 for more information).

Open the Bthdth92 Data Set

The data are provided in the Analyst Sample Library. To access this Analyst sample data set, follow these steps:

  1. Select Tools Sample Data...

  2. Select Bthdth92.

  3. Click OK to create the sample data set in your Sasuser directory.

  4. Select File Open By SAS Name...

  5. Select Sasuser from the list of Libraries.

  6. Select Bthdth92 from the list of members.

  7. Click OK to bring the Bthdth92 data set into the data table.

Request a One-Sample t-Test

To test whether the average infant mortality rate is equal to 8, follow these steps:

  1. Select Statistics Hypothesis Tests One-Sample t-Test for a Mean...

  2. Select death as the variable to be analyzed.

  3. Enter 8 in the box labeled Null: Mean = and press Enter.

Your alternative hypothesis can be that the mean is less than, greater than, or not equal to a specified value. In this example, the alternative hypothesis is that the mean of the variable death is not equal to 8.

In Figure 8.2, the one-sample t-test dialog defines the null and alternative hypotheses and specifies death as the variable to be tested.

click to expand
Figure 8.2: One-Sample t-Test Dialog

The default one-sample t-test task includes sample statistics for the variable death and the hypothesis test results.

Compute a Confidence Interval for the Mean

To produce a confidence interval for the mean in addition to the hypothesis test, follow these steps:

  1. Click on the Tests button in the main dialog.

  2. Select Interval to request a two-sided confidence interval for the mean.

You can choose either a one-sided or a two-sided confidence interval for the mean. The selections Lower bound and Upper bound specify one-sided confidence bounds.

The default confidence level is 95%. You can click on the down arrow to select another confidence level, or you can enter a confidence level in the box.

  1. Click OK to return to the main dialog.

Figure 8.3 displays the selection of a 95% two-sided confidence interval for the mean. Note that you can also request a retrospective power analysis of the test in the Power Analysis tab.

click to expand
Figure 8.3: One-Sample t-Test— Tests Dialog

Request a t Distribution Plot

To request a t distribution plot in addition to the hypothesis test, follow these steps:

  1. Click on the Plots button in the main dialog.

  2. Select t distribution plot.

  3. Click OK to return to the main dialog.

Figure 8.4 displays the Plots dialog with t distribution plot selected.

click to expand
Figure 8.4: One-Sample t-Test— Plots Dialog

Click OK in the main dialog to perform the analysis.

Review the Results

The results of the hypothesis test are displayed in Figure 8.5. The output includes the "Sample Statistics" table for the variable death, the hypothesis test results, and the 95% confidence interval for the mean.

click to expand
Figure 8.5: One-Sample t-Test— Output

The mean of the variable death is 8.61, which is greater than the specified test value of 8.

The t statistic of 2.102 and the associated p-value (0.0406) provide evidence at the α = 0.05 level that the average infant mortality rate is not equal to 8. The confidence interval indicates that you can be 95% confident that the true mean of the variable lies within the interval [8.03, 9.20].

The requested t distribution plot is displayed in Figure 8.6. The plot depicts the calculated t statistic superimposed on a t distribution density function with 50 degrees of freedom.

click to expand
Figure 8.6: One-Sample t-Test— t Distribution Plot

Because this analysis requests a two-tailed test, two critical regions are shaded, one in each of the left and right tails. The alpha level for the test is 0.05; thus, each region represents 2.5% of the area under the curve. In a one-tailed test at the α = 0.05 level, the critical region appears in one tail only, and it represents 5% of the area under the curve.

Here, the t statistic falls in the shaded region. Thus, the null hypothesis is rejected.



 < Day Day Up > 



SAS Institute - The Analyst Application
The Analyst Application, Second Edition
ISBN: 158025991X
EAN: 2147483647
Year: 2003
Pages: 116

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net