Re: [R] OT: P(Z <= -1.46).

2006-11-29 Thread Prof Brian Ripley
In the days when tables were calculated laboriously, it was common 
practice to introduce several deliberate rounding errors in every table. 
These were used to catch infringements of copyright (and recover 
reproduction fees).

Because tables came (and probably still do come) from a very few sources, 
published tables in textbooks will be far from independent data points.
I found several pointing back to Lindgren.

I checked my and my Dept's tables.  Most are for positive x: the 
Biometrika tables have 0.9278550, Fisher and Yates do not have pnorm (only 
qnorm), Hald has 0.92785, and Lindley & Scott have 0.9279.  All the tables 
in Lindgren (1960) are credited apart from this one, and I surmise that 
may be a deliberate error in that table (but it may of course also be a 
computational inaccuracy: if it were a rounding of Hald I would expect it 
to be credited as such).


On Sat, 25 Nov 2006, [EMAIL PROTECTED] wrote:

> In checking over the solutions to some homework that I had assigned I
> observed the fact that in R (version 2.4.0) pnorm(-1.46) gives
> 0.07214504.  The tables in the text book that I am using for the
> course give the probability as 0.0722.
>
> Fascinated, I scanned through 5 or 6 other text books (amongst the
> dozens of freebies from publishers that lurk on my shelf) and found
> that some agree with R (giving P(Z <= -1.46) = 0.0721) and some agree
> with the first text book, giving 0.0722.
>
> It is clearly of little-to-no practical import, but I'm curious as to
> how such a discrepancy would arise in this era.  Has anyone any
> idea?  Is there any possibility that the algorithm(s) used to
> calculate this probability is/are not accurate to 4 decimal places?
>
> Could two algorithms ``reasonably'' disagree in the 4th decimal
> place?
>   cheers,
>
>   Rolf Turner
>   [EMAIL PROTECTED]
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] OT: P(Z <= -1.46).

2006-11-25 Thread Peter Dalgaard
Duncan Murdoch <[EMAIL PROTECTED]> writes:

> My copy of the CRC standard mathematical tables give 0.0721, without 
> citation.
> 
> > Could two algorithms ``reasonably'' disagree in the 4th decimal
> > place?
> 
> One possible source for this error (if it is an error), would be someone 
> rounding to 5 places giving 0.07215, then rounding again to 4 places. 
> Is that reasonable?

Wouldn't be surprised. I'm using an introductory textbook that has
qnorm(.95) as alternatingly 1.64 and 1.65 in its tables, where the
latter fairly clearly comes from rounding of 1.645 instead of
1.644854.

-- 
   O__   Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] OT: P(Z <= -1.46).

2006-11-25 Thread Gabor Grothendieck
Based on integration it appears that .0721 is correct.

> integrate(function(x) exp(-x^2/2)/(2*pi)^.5, -Inf, -1.46)
0.07214504 with absolute error < 1.2e-07



On 11/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> In checking over the solutions to some homework that I had assigned I
> observed the fact that in R (version 2.4.0) pnorm(-1.46) gives
> 0.07214504.  The tables in the text book that I am using for the
> course give the probability as 0.0722.
>
> Fascinated, I scanned through 5 or 6 other text books (amongst the
> dozens of freebies from publishers that lurk on my shelf) and found
> that some agree with R (giving P(Z <= -1.46) = 0.0721) and some agree
> with the first text book, giving 0.0722.
>
> It is clearly of little-to-no practical import, but I'm curious as to
> how such a discrepancy would arise in this era.  Has anyone any
> idea?  Is there any possibility that the algorithm(s) used to
> calculate this probability is/are not accurate to 4 decimal places?
>
> Could two algorithms ``reasonably'' disagree in the 4th decimal
> place?
>cheers,
>
>Rolf Turner
>[EMAIL PROTECTED]
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] OT: P(Z <= -1.46).

2006-11-25 Thread Duncan Murdoch
On 11/25/2006 10:21 AM, [EMAIL PROTECTED] wrote:
> In checking over the solutions to some homework that I had assigned I
> observed the fact that in R (version 2.4.0) pnorm(-1.46) gives
> 0.07214504.  The tables in the text book that I am using for the
> course give the probability as 0.0722.
> 
> Fascinated, I scanned through 5 or 6 other text books (amongst the
> dozens of freebies from publishers that lurk on my shelf) and found
> that some agree with R (giving P(Z <= -1.46) = 0.0721) and some agree
> with the first text book, giving 0.0722.
> 
> It is clearly of little-to-no practical import, but I'm curious as to
> how such a discrepancy would arise in this era.  Has anyone any
> idea?  Is there any possibility that the algorithm(s) used to
> calculate this probability is/are not accurate to 4 decimal places?

A text I've used gives the 0.0722 value, citing the 1962 edition of 
Lindgren's Statistical Theory.  So it's not completely certain that this 
is "in this era".  You can see parts of the 1993 version of Lindgren on 
books.google.com, and it repeats the 0.0722 value, but without citation 
(at least in the parts that are online).


My copy of the CRC standard mathematical tables give 0.0721, without 
citation.

> Could two algorithms ``reasonably'' disagree in the 4th decimal
> place?

One possible source for this error (if it is an error), would be someone 
rounding to 5 places giving 0.07215, then rounding again to 4 places. 
Is that reasonable?

Duncan Murdoch


>   cheers,
> 
>   Rolf Turner
>   [EMAIL PROTECTED]
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.