Data Matters with Fathom! Dynamic Statistics software
Activity 4.1
Section 4.1 includes the following 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 computer project, you will check the table for yourself. Here are the steps.
- Pick a population proportion and sample size. (These instructions 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 the instructions say 2,500, put in your sample size. 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.
Drag a case table onto the workspace. Add an attribute, Draw. Right-click on Draw to edit its formula. Enter the formula randomBinomial(1,.5) . (If youre using .73 for your population proportion, the formula would be randomBinomial(1,.73) .) Click OK. Right-click on Draw and add 1,000 cases. Repeat that step and add another 1,000. (Fathom will only allow you to add 1,000 at a time.) Repeat once more and add another 500.
Click on the Collection and press Ctrl-I to get the Collection Inspector. On the Measures page, click on <new> to add a new measure, named Proportion. Right-click on Proportion to edit its formula to proportion(draw=1) .
Select Analyze, Collect Measures. Drag a case table onto the workspace so you can see what goes into the Measures Collection.
Click on the Measures Collection and press Ctrl-I to get the Collection Inspector. Set the number of samples to 100. (If you would like, you can set up a histogram to watch the sample grow. On the other hand, you might want to turn off Animation to speed things up.)
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.
In the Measures Collections case table, add an attribute named z. Right-click on z to edit its formula to (proportion.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.
Right-click on z and select Sort Ascending.
How do the claims in Table 4.1.2 look? Believable?
For greater precision, increase the number of samples. (I would turn off Animation for this.)
On the other hand, try a sample size of 4. How do the p-values look now?
| ©2008 Key College Publishing. All rights reserved. |
|