After a series of additional studies, it seems that the most reasonable way is the following:
Multidimensional normal CDF is not trivial to calculate (especially for large dimensions), and several scientific papers have been written on this subject. Professor Alan Gentz ββhas a bunch of Fortran-77 routines that compute various multidimensional densities and CDFs available on his page here: http://www.math.wsu.edu/faculty/genz/software/software.html
As you can see from some of this code, this is not quite the same as recovery in another language, and probably why this was not done if someone did not pay for it. A lot of mathematical / numerical programming is done at Fortran at the research level, so where is most of the best code.
Thus, for optimal results, it would be best to immediately call the Fortran routine directly using JNI or JNA. JNA seems to be easiest to implement by following these instructions: http://www.javaforge.com/wiki/66061 . Using this and some other links, I used the Java-JNA-Fortran link to call the MVNEXP (expected value) and MVNDST (cdf) routines. You can check the code here:
You should also point out: there is native Java code for some two-dimensional distributions and other things that you will not find in ordinary mathematics; It was adapted from the source: http://www.iro.umontreal.ca/~simardr/ssj/indexe.html . This is a very good math library that I have not found so far.
Andrew Mao
source share