Skip to content Skip to sidebar Skip to footer

Multiple Integral Using Scipy.integrate.nquad - Errors On Lambda Function

I attempt the following multiple integral in the code below for a higher-than-bivariate version (n=2) of a copula density function, c(u1,u2). In other words, n>2 dimensions. im

Solution 1:

Posting some comments as an answer since the comments section is getting overloaded.

(1) I think by (0, 1)**2 you mean to say the product (0, 1) x (0, 1), i.e., the unit square. I don't think Python is going to understand that. If you need to tell nquad that the domain of integration is the unit square, I think you need to say that some other way.

(2) Please post the formula for the function you are actually working with, namely c(u). Bear in mind that when you omit details or defer them to links, it only makes it harder for others to understand and therefore less likely that you can get effective help.

(3) The domain of integration for entropy calculation is the so-called support of the probability function, that is, the set on which the probability is greater than zero. What is the support of c(u)? That defines the domain of integration. It is customary in textbooks or other expositions to say the domain is R or (-inf, +inf) or otherwise leave it ambiguous, but for an actual calculation you need to cut it down to the support.

I'm sorry I can't be more helpful, it's an interesting question.

Post a Comment for "Multiple Integral Using Scipy.integrate.nquad - Errors On Lambda Function"