Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9091169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:32:46+00:00 2026-06-16T22:32:46+00:00

Does anyone know of a reliable, accurate library to compute the multivariate normal (MVN)

  • 0

Does anyone know of a reliable, accurate library to compute the multivariate normal (MVN) CDF in Java? I’m looking for something like MATLAB’s mvncdf function. I need to be able to do it for dimensions of up to 10 or more. Most statistics/math libraries don’t have this functionality. Being able to compute the log probability is a plus.

From this post, there doesn’t seem to be a free implementation mentioned for some other languages. While a straight-java implementation would rock, I would accept implementations in other languages that don’t require licenses (not MATLAB or IMSL, for example) and can be called easily from Java with minimal overhead.

(This question is a derivative of a post on StackExchange math where I am trying to compute a probability of an ordering of normal random variables…if you’re interested in trying to solve the problem directly using other mathematical methods, please do check it out.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:32:47+00:00Added an answer on June 16, 2026 at 10:32 pm

    After doing some additional research, it seems that the following is the most reasonable way to go.

    The multivariate normal CDF is not trivial to compute (especially for large dimensions) and there have been several academic papers written on the subject. Professor Alan Genz has a bunch of Fortran-77 subroutines that compute various multivariate 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 that code, it’s not exactly a cakewalk to re-implement in another language, and that’s probably why it hasn’t been done unless someone has paid for it. A lot of mathematical/numerical programming is done in Fortran at the research level, so that’s where most of the best code is.

    As such, for optimal results, it would probably be best to call the (native-compiled) Fortran subroutine directly using JNI or JNA. JNA seems to be the easiest to implement, following instructions such as these: http://www.javaforge.com/wiki/66061. Using that, and some other references, I’ve implemented the Java-JNA-Fortran link to be able to call the MVNEXP (expected value) and MVNDST (cdf) subroutines. You can check out the code here:

    • Java: https://github.com/mizzao/libmao/tree/master/src/main/java/net/andrewmao/probability
    • Fortran (modified) and Makefile: https://github.com/mizzao/libmao/tree/master/src/main/fortran

    Also to point out: there does exist native Java code for some bivariate distributions and other things you won’t find in commons math; it’s adapted from the source above: http://www.iro.umontreal.ca/~simardr/ssj/indexe.html . This is a very good math library that I hadn’t found until now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know a cross-browser, reliable solution for catching presses of the tab-key in
Does anyone know of a reliable approach for scrolling a WPF DataGrid (.NET 4)
Does anyone know of any reliable (and, hopefully, extensive) books/websites that discuss GDI+ performance
Does anyone know of a reliable way to store data to use across pages
Does anyone know a reliable way to check whether the referrer of a HTTP
Does anyone know of a reliable way to validate International Bank Account Number (IBAN)
Does anyone know of a reliable way to cancel the ItemCheck event on a
Does anyone know a reliable way to distinguish between FALSE and NULL with PHPUnit?
1) does anyone know something about the adoption rate of WSDL 2.0? I always
Does anyone know if there is a way to generate different code in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.