This provides a Maple solution to compute the bivariate normal distribution by recursions for numerical inputs. It works even for extreme cases and handles situations, where usual integration with Maple has serious problems (even after reducing to dimension 1), it seems to be reliable and fast and works in 'arbitrary' precision.

To use it call N2_as_sum(1.0, 2.0, 0.8,  200) to compute the BVN for x = 1.0, y = 2.0 and correlation rho = 0.8 with at most 200 recursion steps (it will stop earlier, if no more improvements can be seen).

I have this solution since a longer time and think it might be of general interest. And, well, some publicness is always fine and also good for possible quality assurance :-)

The solution can be translated to compilable code (with some work, not done here), as far as an error function for dimension=1 exists (so for gcc or Watcom it should go, while MS misses that; once I tested it with LCC (a Windows compiler system allowing 104 decimal places) and there it worked as well).

The routines should also work with older Maple versions (though I have not tested thatagain), since problems in that releases once have been my motivation for the solution.

Download 102_SeriesForBivariateNormal_MaplePrimes.mws
View file details


Please Wait...