From 39ef91ac9daf68d83c8ebffeaf34ee4c31b67a34 Mon Sep 17 00:00:00 2001 From: "Paul A. Bristow" Date: Sun, 22 Apr 2012 11:45:33 +0000 Subject: [PATCH] Update to Owens for extra formula and reference, and to roadmap [SVN r78134] --- doc/sf_and_dist/owens_t.qbk | 25 ++++++++++++++++++++----- doc/sf_and_dist/roadmap.qbk | 2 +- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/doc/sf_and_dist/owens_t.qbk b/doc/sf_and_dist/owens_t.qbk index 50cde2545..fb54e2e33 100644 --- a/doc/sf_and_dist/owens_t.qbk +++ b/doc/sf_and_dist/owens_t.qbk @@ -51,9 +51,21 @@ multivariate normal distribution probabilities. The return type of this function is computed using the __arg_pomotion_rules: the result is of type `double` when T is an integer type, and type T otherwise. +Owen's original paper (page 1077) provides some additional corner cases. + +__spaces T(h, 0) = 0 + +__spaces T(0, a) = 1/2[pi] arctan(a) + +__spaces T(h, 1) = [frac12] G(h) \[1 - G(h)\] + +where G(h) is the univariate normal with zero mean and unit variance integral from -[infin] to h. + +Owen's expressions for infinity are not yet implemented. + [h4 Accuracy] -The Patefield-Tandy algorithm provides six methods of evalualution; +The Patefield-Tandy algorithm provides six methods of evalualution (T1 to T6); the best method is selected according to the values of ['a] and ['h]. See the original paper and the source in [@../../../../../boost/math/special_functions/owens_t.hpp owens_t.hpp] for details. @@ -72,7 +84,8 @@ but the real problems come when h gets large. [h4 Testing] -Test data was generated by T1 and T4. +Test data was generated by Patefield and Tandy algorithms T1 and T4, +and also the suggested reference routine T7. * T1 was rejected if the result was too small compared to `atan(a)` (ie cancellation), * T4 was rejected if there was no convergence, @@ -85,13 +98,15 @@ However, that there was a whole domain (large ['h], small ['a]) where it was not possible to generate any reliable test values (all the methods got rejected for one reason or another). -There are also two sets of sanity tests: spot values are computed using __Mathematica and ???? TODO. +There are also two sets of sanity tests: spot values are computed using __Mathematica and __R. + [h4 Implementation] The function was proposed and evaluated by -D. B. Owen, Tables for computing bivariate normal probabilities, -Ann. Math. Statist., 27, 1075-1090 (1956). +[@http://projecteuclid.org/DPubS?service=UI&version=1.0&verb=Display&handle=euclid.aoms/1177728074 +Donald. B. Owen, Tables for computing bivariate normal probabilities, +Ann. Math. Statist., 27, 1075-1090 (1956)]. The algorithms of Patefield, M. and Tandy, D. "Fast and accurate Calculation of Owen's T-Function", Journal of Statistical Software, 5 (5), 1 - 25 (2000) diff --git a/doc/sf_and_dist/roadmap.qbk b/doc/sf_and_dist/roadmap.qbk index 5657dbac3..03d259042 100644 --- a/doc/sf_and_dist/roadmap.qbk +++ b/doc/sf_and_dist/roadmap.qbk @@ -6,7 +6,7 @@ * Promoted math constants to be 1st class citizens, including convenient access to the most widely used built-in float, double, long double via three namespaces. -* Added the Skew Normal distribution written by Benjamin Sobotta. +* Added the Owen's T function and Skew Normal distribution written by Benjamin Sobotta. * Corrected issue [@https://svn.boost.org/trac/boost/ticket/6627 #6627 nonfinite_num_put formatting of 0.0 is incorrect] based on a patch submitted by K R Walker.