Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: RE: median equality test for non normal variables

From   "Lachenbruch, Peter" <>
To   "''" <>
Subject   st: RE: RE: median equality test for non normal variables
Date   Mon, 24 May 2010 08:36:49 -0700

The usual headaches with the t test occur mainly when the distributions are badly skewed and the sample size isn't too large.  One can always do a permutation test.


Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001

-----Original Message-----
From: [] On Behalf Of Nick Cox
Sent: Monday, May 24, 2010 7:19 AM
Subject: st: RE: median equality test for non normal variables

The sign test does not assume normality. Please tell me which text this
comes from so that I know to shun it. 

In my view the best way to compare two distributions is to draw a graph,
say -qqplot-. 

Otherwise if you insist on some kind of P-value, I'd head straight for
-somersd- by Roger Newson (-findit- for locations). In a strong sense it
subsumes and goes beyond the Wilcoxon-Mann-Whitney machinery of the

Conversely, there's a lot of literature that shows that the t test is
more robust than many people think. Of course, that is a function of
what many people think. 

But arm-waving aside, consider this: 

sysuse auto, clear 
(1978 Automobile Data)
ttest price, by(foreign) 

Two-sample t test with equal variances
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf.
Domestic |      52    6072.423    429.4911    3097.104    5210.184
 Foreign |      22    6384.682    558.9942    2621.915     5222.19
combined |      74    6165.257    342.8719    2949.496    5481.914
    diff |           -312.2587    754.4488               -1816.225
    diff = mean(Domestic) - mean(Foreign)                         t =
Ho: diff = 0                                     degrees of freedom =

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff
> 0
 Pr(T < t) = 0.3401         Pr(|T| > |t|) = 0.6802          Pr(T > t) =

foreach l in "identity" "power 0.5" "log" "power -1" {
          di "link `l'" _c 
          qui glm price foreign, link(`l')
          di "{col 20}" %8.3f  _b[foreign]/_se[foreign]

link identity         0.414
link power 0.5        0.416
link log              0.418
link power -1        -0.422

The t or z statistic is pretty insensitive to the exact form of the
distribution. (The sign on the last link's result is to be expected.) 


amatoallah ouchen

I have  two related observations (i.e. two observations per subject)
and I want to see  if the median  on these two  non -normally
distributed variables differs from one another. so I used the sign
test, but I think  that this approach  is based on normality
assumptions. Is there any test that allow to test median equality for
non normal data?

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index