s-news
[Top] [All Lists]

ks.gof or not?

To: <s-news@lists.biostat.wustl.edu>
Subject: ks.gof or not?
From: <Andre.Mery@aventis.com>
Date: Tue, 23 Nov 2004 11:28:07 +0100
Thread-index: AcTRRx9PT0kwvvXrQeCiCuxjdEga/A==
Thread-topic: ks.gof or not?
Hi,
 
I have a problem with the ks.gof function. Basically I have 2 distributions like that:
 
First:
Class              0    1     2    3     4     5     6 
Observed counts    0    1    12    4    17    25    41
 
Second:
Class                0        1      2       3       4       5       6
Expected counts    1.5625  9.3750 23.4375 31.2500 23.4375  9.3750  1.5625
 

Using ks.gof for testing the difference between these 2 distributions leads to:
 
> ks.gof(Observed, Expected)
Two-Sample Kolmogorov-Smirnov Test
data:  Observed and Expected
ks = 0.2857, p-value = 0.9627
alternative hypothesis:
  cdf of Observed does not equal the
              cdf of Observed for at least one sample point.
 
H0 is that the distributions are identical, true ? Then as p=0.96, I cannot reject H0. But the observed distribution is clearly J-shaped and the expected distribution is from a binomial law with p=0.5, n=100, and is completely symmetrical. Plotting the 2 shows a clear difference.
 
What did I miss in the way to use ks.gof ? Is it inappropriate in that case or do I use it wrongly ?
 
Thanks.
 

André Méry
Aventis Pharma

20, avenue Raymond Aron - 92160 Antony

[Courrier / Mail : Tri B2/13]

[Tél. / Tel. : 01 55 71 68 69]

 

André Méry
Aventis Pharma
20, avenue Raymond Aron - 92160 Antony
[Courrier / Mail : Tri B2/13]
[Tél. / Tel. : 01 55 71 68 69]

 
<Prev in Thread] Current Thread [Next in Thread>
  • ks.gof or not?, Andre.Mery <=