Chapter Contents |
Previous |
Next |

Hypothesis Tests |

In the Two-Sample Test for Proportions task, you can determine whether two probabilities are the same.

The data analyzed in this example are taken from a study measuring the accuracy of two computer programs. Each program searches the World Wide Web and returns a list of web pages that meet a particular set of specified criteria. The data set Search contains two samples in which each observation is either `yes' or `no'. A response of `yes' indicates that the program returns the desired page at the top of the list of potential pages; a value of `no' indicates that this is not the case. The data set contains the results of 535 searches using an older search program and 409 searches using a new program. The variables containing the results for the old and new programs are named oldfind and newfind, respectively.

Suppose that you want to determine whether the probability of a correct search by the new algorithm is higher than that for the old algorithm. That is, you want to determine whether you can reject the null hypothesis that the two probabilities are equal in favor of the alternative that the new probability is larger. The values for analysis are contained in the two variables oldfind and newfind.

- Select
**Tools****Sample Data**... - Select Search.
- Click
**OK**to create the sample data set in your Sasuser directory. - Select
**File****Open By SAS Name**... - Select Sasuser from the list of
**Libraries**. - Select Search from the list of members.
- Click
**OK**to bring the Search data set into the data table.

- Select
**Statistics****Hypothesis Tests****Two-Sample Test for Proportions**... - Select
**Two variables**in the box labeled**Groups are in**. - Select the variable newfind as the Group 1 variable.
- Select the variable oldfind as the Group 2 variable.
- Select the
**Level of Interest**by clicking on the down arrow and selecting**yes**to test whether the two groups have the same proportions of success. - Specify the
**Alternative**hypothesis by selecting**Prop 1 - Prop 2 > 0**.

Note that, if your data are arranged so that the values for the two
groups are contained in a single variable, you can define the
dependent and group variables by selecting **One
variable** in the box labeled **Groups are in**.

Figure 8.12 displays the Two-Sample Test for Proportions dialog.

In Figure 8.12, the null hypothesis specifies that the proportions of success for the algorithms are equal (or, equivalently, that the difference between the proportions is 0). The alternative hypothesis is that the probability of a correct search by the new algorithm is higher than that for the old algorithm.

Click **OK** in the main dialog to perform the analysis.

The "Sample Statistics" table lists the frequency of `yes' and `no' responses for each variable. The "Hypothesis Test" table displays the null and alternative hypotheses and the results of the test.

The observed proportion of `yes' responses is 0.8631 for the
newfind variable, and 0.8093 for the oldfind variable. The
*Z* statistic of 2.19 and associated *p*-value of 0.0142
indicate that the proportion of successful searches is significantly
larger for the new search algorithm.

Chapter Contents |
Previous |
Next |
Top |

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.