From ripley at stats.ox.ac.uk  Thu May  8 08:38:57 2014
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 08 May 2014 07:38:57 +0100
Subject: [Rd] historical significance of Pr(>Chisq) < 2.2e-16
In-Reply-To: <CAF8bMcZRA=Jo+ozuWBzWLN165GXY93ycXLSYO4ABEAvqaGs_Cw@mail.gmail.com>
References: <536A3CE8.2010909@yorku.ca>
	<CAF8bMcZRA=Jo+ozuWBzWLN165GXY93ycXLSYO4ABEAvqaGs_Cw@mail.gmail.com>
Message-ID: <536B2681.6020609@stats.ox.ac.uk>

On 07/05/2014 21:41, William Dunlap wrote:
> It may come a time before the pchisq() function had the lower.tail
> argument.  In those days you had the compute the upper tail as
> 1-pchisq(x2, df).  For any eps<2.2e-16 (.Machine$double.eps), 1-eps==1
> so 1-(1-eps)==0 so you would get, e.g.,
>    > 1-pchisq(100,2)
>    [1] 0
> and people would say 'but the p-value is not 0: it may be very small
> but not zero' so anova's printing functions would say "<2.2e-16" to
> mollify them.
>
> Now we have the lower.tail=FALSE argument
>    > pchisq(100,2,lower.tail=FALSE)
>    [1] 1.92875e-22
> and don't need the "<2.2e-16" but no one has seen fit to change things.

Because although pchisq has that argument, not all pxxx functions 
guarantee accuracy in the upper tail (and might compute 1-p internally). 
  And the print() method for class "anova" has no idea how the p values 
supplied were computed (as below, they could have been done by 
third-party code).

Only in very unusual circumstances does it matter how small a p-value 
less than, say, 1e-6 is.  For many cases (including anova) the computed 
value depends on fine details of the null hypothesis which are 
implausible, so a secondary effect is to avoid drawing attention to 
numbers which should be taken only as a very rough guide.


> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
>
> On Wed, May 7, 2014 at 7:02 AM, Michael Friendly <friendly at yorku.ca> wrote:
>> Where does the value 2.2e-16 come from in p-values for chisq tests such as
>> those
>> reported below?
>>
>>> Anova(cm.mod2)
>> Analysis of Deviance Table (Type II tests)
>>
>> Response: Freq
>> LR Chisq Df Pr(>Chisq)
>> B 11026.2 1 < 2.2e-16 ***
>> W 7037.5 1 < 2.2e-16 ***
>> Age 886.6 8 < 2.2e-16 ***
>> B:W 3025.2 1 < 2.2e-16 ***
>> B:Age 1130.4 8 < 2.2e-16 ***
>> W:Age 332.9 8 < 2.2e-16 ***
>> ---
>> Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
>>>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] historical significance of Pr(>Chisq) < 2.2e-16
Prof Brian Ripley