Data Matters with SPSS®
Activity 4.1
Section 4.1 includes this table from Data Matters. It makes claims about the p-value of some specific z-values.
Table 4.1.2 (from Data Matters)
P-Values for Some Specific Z-Values
|
z-values
|
p-value
|
|
0
|
100%
|
|
.5 or .5
|
62%
|
|
1 or 1
|
32%
|
|
1.5 or 1.5
|
13%
|
|
1.96 or 1.96
|
5%
|
|
2 or 2
|
4.55%
|
|
2.5 or 2.5
|
1%
|
|
3 or 3
|
0.30%
|
|
3.5 or 3.5
|
0.10%
|
|
4 or 4
|
0.01%
|
|
4.5 or 4.5
|
0.001%
|
Dont take my word for it. In this project, you will check the table for yourself. Here are the steps.
- Pick a population proportion and sample size. (In these instructions, I will show you how to do this with a population proportion of 50% and a sample size of 2,500. You can adjust the instructions to work for the population proportion and sample size you want.)
- Using your software, create 100 samples from that population and save the proportions.
- Transform the proportions into z-values.
- Sort the resulting z-values from lowest to highest and check the entries in Table 4.1.2 against what happened in your simulation.
Step 1: Pick a population proportion and sample size.
In these instructions, I am working with a population proportion of 50% and a sample size of 2,500. Wherever these instructions say 2,500, put in your sample size. (Remember to leave commas out of numbers in Syntax.) Wherever the instructions say .5, put in your population proportion.
Step 2: Using your software, create 100 samples from that population and save the proportions.
To get the proportions, we can use almost the same Syntax program we used in the project in Section 3.3. (The three changes are in bold.)
INPUT PROGRAM.
LOOP #Sample = 1 TO 100.
LOOP #Case = 1 to 2500.
COMPUTE sample = #Sample.
COMPUTE draw = RV.BINOMIAL(1,.5).
END CASE.
END LOOP.
END LOOP.
END FILE.
END INPUT PROGRAM.
EXECUTE.
|
This program is for a population proportion of .5. Put your population proportion in the parentheses of RV.BINOMIAL. For example, if you are using a population proportion of .73, then you would enter RV.BINOMIAL(1,.73) .
The number of observations appears in the LOOP #Case . . . line. Edit the 2500 to your sample size.
In the data editor, click on Data, then select Aggregate. Sample is the break variable. Draw goes into the Aggregate Variables box. Select Draw and click on Function. Click on Inside and enter 1 for both Low and High. Click on Continue, Replace working data file, OK.
Step 3: Transform the proportions into z-values.
Now we need the standard error of proportions. The standard error depends on the sample size and the population proportion of the null hypothesis. These instructions are for 2,500 observations from a population with a proportion at .5.
Select Transform, Compute. Name your target variable z and enter this for the numeric expression: (draw_1-.5)/.01 . That is the formula for a z-value: (the sample proportion the population proportion)/ the standard error. You put in the population proportion and standard error you are working with.
Step 4: Sort the resulting z-values from lowest to highest and check the entries in Table 4.1.2 against what happened in your simulation.
Click on Data and select Sort Cases. Double-click on z, then click OK.
How do the claims in Table 4.1.2 look? Believable?
For greater precision, increase the number of samples.
On the other hand, try a sample size of 4. How do the p-values look now?
| ©2008 Key College Publishing. All rights reserved. |
|