[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #5583] NPAR TESTS
From: |
John Darrington |
Subject: |
[patch #5583] NPAR TESTS |
Date: |
Sun, 10 Dec 2006 02:59:07 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060607 Debian/1.7.12-1.2 |
Follow-up Comment #6, patch #5583 (project pspp):
OK. I think Jason's right. The comparisons in Algorithms are simply
an optimisation to ensure that the cumulative distribution is
calculated from the end nearest to the target value. That's a
seperate issue from what's mentioned in the user documentation about
the direction of the test (which Algorithms doesn't mention at all).
I've attached a new patch against the latest head. This one then
gets all the 1-tailed exact tests correct (agrees with SPSS results).
Now I'm totally confused about the 2-tailed exact test which are
reported when p == 0.5
This code
DATA LIST LIST NOTABLE /x * w *.
BEGIN DATA.
1 10
2 10
END DATA.
WEIGHT BY w.
NPAR TESTS
/BINOMIAL(0.5) = x
.
When run by SPSS produces this:
9.1 NPAR TESTS. Binomial Test
+-+------#--------+--+--------------+----------+---------------------+
| | #Category| N|Observed Prop.|Test Prop.|Exact Sig. (2-tailed)|
+-+------#--------+--+--------------+----------+---------------------+
|x|Group1# 1.00|10| .500| .500| 1.000|
| |Group2# 2.00|10| .500| | |
| |Total # |20| 1.00| | |
+-+------#--------+--+--------------+----------+---------------------+
which seems rediculous to me. If my null hypothesis is that the
distribution of sexes amoungst the population is 0.5/0.5, and I
randomly select 20 people, and it turns out that 10 are male and 10
are female, SPSS is telling me that the probability of getting these
results, when my null hypothesis is false, is 1.0 !!!!
As it happens, my results using the formulae from Algorithms is 1.176
which is meaningless. All the other 2-tailed tests agree with SPSS's
results, so my guess is, that SPSS simply clamps the p-value to 1.000
if it exceeds that.
Bizarre!
(file #11497)
_______________________________________________________
Additional Item Attachment:
File name: npar2.patch Size:88 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?5583>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [patch #5583] NPAR TESTS, Jason H Stover, 2006/12/07
- Re: [patch #5583] NPAR TESTS, John Darrington, 2006/12/08
- [patch #5583] NPAR TESTS,
John Darrington <=
- [patch #5583] NPAR TESTS, John Darrington, 2006/12/10
- [patch #5583] NPAR TESTS, John Darrington, 2006/12/11
- [patch #5583] NPAR TESTS, Jason H Stover, 2006/12/15
- [patch #5583] NPAR TESTS, Jason H Stover, 2006/12/15
- [patch #5583] NPAR TESTS, John Darrington, 2006/12/15
- [patch #5583] NPAR TESTS, Jason H Stover, 2006/12/16
- [patch #5583] NPAR TESTS, Ben Pfaff, 2006/12/16
- [patch #5583] NPAR TESTS, John Darrington, 2006/12/19
- [patch #5583] NPAR TESTS, Jason H Stover, 2006/12/19
- [patch #5583] NPAR TESTS, Ben Pfaff, 2006/12/19