General Information
  Home
Author Bio
Product/Purchase Info

Instructor Resources
Registration Required
  Register
Download Instructor Resources

Computer Activities
and Data Sets
  Table of Contents
Excel
Fathom
SPSS

Community
  Contact the Author
Ideas/Comments for Publisher
Testimonials
Coming soon!

Other Key Sites
  Key Curriculum Press

Key College Publishing

Data Matters with SPSS®

Activity 3.3

In this project, you are going to perform a Monte Carlo test of the difference between two proportions. The difference you saw in the data was 4.7%. To do the Monte Carlo test, you will take pairs of 1,000-observation samples. Every sample will come from a probability of 40.25%. You will calculate the difference in each pair and save those differences. The p-value is the proportion of the differences we find that is at least as far from zero as 4.7%.

Here is how to run the Monte Carlo simulations.

  1. Run a Syntax program to create 1,000 samples. Each sample will have 1,000 pairs of simulated students. Each simulated student will have a 1 (indicating “honors”) or a 0 (indicating “no honors”). The chances that a student will have a 1 will be 40.25%.
  2. Aggregate to get pairs of proportions, one pair per sample.
  3. Calculate the differences and look at the distribution of the differences.

Step 1: Run a Syntax program to create 1,000 samples. Each sample will have 1,000 pairs of simulated students. Each simulated student will have a 1 (indicating “honors”) or a 0 (indicating “no honors”). The chances that a student will have a 1 will be 40.25%.

This Syntax program is very much like the
one you used in Sections 2.2 and 2.3.

INPUT PROGRAM.
  LOOP #Sample = 1 TO 1000.
    LOOP #Case = 1 TO 1000.
      COMPUTE sample = #Sample.
      COMPUTE honor1 = RV.BINOMIAL(1,.5).
      COMPUTE honor2 = RV.BINOMIAL(1,.5).
      END CASE.
    END LOOP.
  END LOOP.
  END FILE.
END INPUT PROGRAM.
EXECUTE.

The only differences are that here you are calculating two random variables (honor1 and honor2) and your sample size is 1,000. This program may take some time to run.

Step 2: Aggregate to get pairs of proportions, one pair per sample.

In the data editor, select Data, Aggregate. Sample is the break variable. Honor1 and honor2 both go into the Aggregate Variables box. Select just honor1 and click on Function. Click on Inside and enter 1 for both Low and High. Click on Continue and repeat those steps for honor2. Although you won’t see any change in your data yet, you have now aggregated the proportions into pairs.

Select Replace working data file and click OK.

Step 3: Calculate the differences and look at the distribution of the differences.

Click on Transform, Compute. Name the target variable diff . The numeric expression is honor1_1 – honor2_1 . Look at what that adds to the data.

Get a histogram of the differences (Graphs, Histogram).

Now you can see how differences between pairs of proportions would be distributed if both proportions in each pair were drawn from a system with a constant probability of 40.25%. What can you say about the p-value? Is a difference of 4.7% or larger a reasonably likely event, if the null hypothesis is true? What do you conclude about the null hypothesis that the probability of making the honor roll was 40.25% in both years?

Save Your Work

You can save yourself some work in later projects by saving the data file and Syntax program from this project.


©2008 Key College Publishing. All rights reserved.