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 rolf at math.unb.ca
On 11/25/2006 10:21 AM, rolf at math.unb.ca 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 > rolf at math.unb.ca > > ______________________________________________ > R-help at 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.
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, rolf at math.unb.ca <rolf at math.unb.ca> 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 > rolf at math.unb.ca > > ______________________________________________ > R-help at 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. >
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, rolf at math.unb.ca 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 > rolf at math.unb.ca > > ______________________________________________ > R-help at 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, 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