Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.5K Views
|
6 Replies
|
1 Total Like
View groups...
Share
Share this post:

Obtain incomplete moments of bivariate normal as func of CDF?

Posted 6 years ago

Hi

I am a Mathematica/Wolfram novice so apologies for the elementary nature of this question.

I am looking to use Mathematica to see if a few integrals related to bivariate distributions have closed forms.

In particular I am interested in the incomplete moments:

Integrate[
 x^m y^n Exp[  -(x^2 + y^2 - 
        2 \[Rho] x y)/(2 (1 - \[Rho]^2))]/(2 \[Pi] Sqrt[
      1 - \[Rho]^2]), {x, a, Infinity}, {y, b, Infinity}]

I suspect they can be written in terms of the standard CDF- L(a,b,rho) in the Abramowitz /Stegun formalism (eqn 26.3.3).

However, as a test case, trying to get Mathematica to evaluate the above with m=n=0 leads it into a loop from which it never seems to emerge.

How could I define the default m=m=0 case and see if it can express the m>0 n>0 case in terms of it?

Many thanks. Tom

POSTED BY: Tom Weston
6 Replies
Posted 6 years ago
POSTED BY: Tom Weston
Posted 6 years ago

Using Assumptions helps. For example:

Integrate[x y PDF[BinormalDistribution[{0, 0}, {1, 1}, \[Rho]], {x, y}], {x, 0, \[Infinity]}, {y, 0, \[Infinity]},
 Assumptions -> 0 < \[Rho] < 1]

gets you

$$\frac{\rho \left(\sqrt{\frac{1}{\rho ^2}-1}-\cos ^{-1}(\rho )+\pi \right)}{2 \pi }$$

POSTED BY: Jim Baldwin
POSTED BY: Mariusz Iwaniuk
Posted 6 years ago

Hi Mariusz

Thanks for the reply.

I don’t necessarily need finite. The m=n=0 form is a well known function (see for instance the abramowitz chapter). My hunch is that the m> 0, n>0 form can be expressed in terms of it, (in manner similar to the Isserlis/Wick theory but I suspect In a simpler way). Do you know if Mathematica can be used to search for a simplification of the more complex In terms of the simpler?

Thanks again Tom

POSTED BY: Tom Weston

If a=b=0,m>0,n>0 and \[Rho] < 1 then:

 g[m_, n_, \[Rho]_] := 
  1/\[Pi] 2^(1/2 (-6 + m + n)) (1 - \[Rho]^2)^(
   1/2 (1 + m + 
      n)) (2 Gamma[(1 + m)/2] Gamma[(1 + n)/2] Hypergeometric2F1[(
       1 + m)/2, (1 + n)/2, 1/2, \[Rho]^2] - (
     m n Gamma[m/2] Gamma[n/
       2] (-(-1 + \[Rho]^2) Hypergeometric2F1[(2 + m)/2, (2 + n)/
          2, -(1/2), \[Rho]^2] + (-1 + (4 + m + 
              n) \[Rho]^2) Hypergeometric2F1[(2 + m)/2, (2 + n)/2, 1/
          2, \[Rho]^2]))/((1 + m) (1 + n) \[Rho]))
g[2, 3, 1/2] // N
(* 1.34643*)
f[0, 0, 1/2, 2, 3]
(* 1.34643*)

Regards M.I.

PS. I have another integral:

Integrate[(
  E^((-x^2 - y^2 + 2 x y \[Rho])/(2 (1 - \[Rho]^2))) x^m y^n)/(
  2 \[Pi] Sqrt[1 - \[Rho]^2]), {x, -Infinity, 
   Infinity}, {y, -Infinity, Infinity}] == 
 1/\[Pi] 2^(1/2 (-4 + m + n)) (1 - \[Rho]^2)^(
  1/2 (1 + m + n)) ((
    n Gamma[1 + m/2] Gamma[n/
      2] (-(-1 + \[Rho]^2) Hypergeometric2F1[(2 + m)/2, (2 + n)/
         2, -(1/2), \[Rho]^2] + (-1 + (4 + m + 
             n) \[Rho]^2) Hypergeometric2F1[(2 + m)/2, (2 + n)/2, 1/
         2, \[Rho]^2]) (-1 + Cos[m \[Pi]] + I Sin[m \[Pi]]))/((1 + 
       m) (1 + n) \[Rho]) + 
    1/((1 + m) (1 + n) \[Rho]) (-1)^(1 + n)
      n Gamma[1 + m/2] Gamma[n/
      2] (-(-1 + \[Rho]^2) Hypergeometric2F1[(2 + m)/2, (2 + n)/
         2, -(1/2), \[Rho]^2] + (-1 + (4 + m + 
             n) \[Rho]^2) Hypergeometric2F1[(2 + m)/2, (2 + n)/2, 1/
         2, \[Rho]^2]) (-1 + Cos[m \[Pi]] + I Sin[m \[Pi]]) + 
    Gamma[(1 + m)/2] Gamma[(1 + n)/2] Hypergeometric2F1[(1 + m)/2, (
      1 + n)/2, 1/
      2, \[Rho]^2] (1 + Cos[m \[Pi]] + I Sin[m \[Pi]]) + (-1)^
     n Gamma[(1 + m)/2] Gamma[(1 + n)/2] Hypergeometric2F1[(1 + m)/
      2, (1 + n)/2, 1/
      2, \[Rho]^2] (1 + Cos[m \[Pi]] + I Sin[m \[Pi]]))

$$\int _{-\infty }^{\infty }\int _{-\infty }^{\infty }\frac{e^{\frac{-x^2-y^2+2 x y \rho }{2 \left(1-\rho ^2\right)}} x^m y^n}{2 \pi \sqrt{1-\rho ^2}}dydx=\frac{2^{\frac{1}{2} (-4+m+n)} \left(1-\rho ^2\right)^{\frac{1}{2} (1+m+n)} \left(\frac{n \Gamma \left(1+\frac{m}{2}\right) \Gamma \left(\frac{n}{2}\right) \left(-\left(-1+\rho ^2\right) \, _2F_1\left(\frac{2+m}{2},\frac{2+n}{2};-\frac{1}{2};\rho ^2\right)+\left(-1+(4+m+n) \rho ^2\right) \, _2F_1\left(\frac{2+m}{2},\frac{2+n}{2};\frac{1}{2};\rho ^2\right)\right) (-1+\cos (m \pi )+i \sin (m \pi ))}{(1+m) (1+n) \rho }+\frac{(-1)^{1+n} n \Gamma \left(1+\frac{m}{2}\right) \Gamma \left(\frac{n}{2}\right) \left(-\left(-1+\rho ^2\right) \, _2F_1\left(\frac{2+m}{2},\frac{2+n}{2};-\frac{1}{2};\rho ^2\right)+\left(-1+(4+m+n) \rho ^2\right) \, _2F_1\left(\frac{2+m}{2},\frac{2+n}{2};\frac{1}{2};\rho ^2\right)\right) (-1+\cos (m \pi )+i \sin (m \pi ))}{(1+m) (1+n) \rho }+\Gamma \left(\frac{1+m}{2}\right) \Gamma \left(\frac{1+n}{2}\right) \, _2F_1\left(\frac{1+m}{2},\frac{1+n}{2};\frac{1}{2};\rho ^2\right) (1+\cos (m \pi )+i \sin (m \pi ))+(-1)^n \Gamma \left(\frac{1+m}{2}\right) \Gamma \left(\frac{1+n}{2}\right) \, _2F_1\left(\frac{1+m}{2},\frac{1+n}{2};\frac{1}{2};\rho ^2\right) (1+\cos (m \pi )+i \sin (m \pi ))\right)}{\pi }$$

POSTED BY: Mariusz Iwaniuk
Posted 6 years ago

Your second example can be simplified (somewhat) that removes the explicit use of imaginary numbers:

f = Expectation[x^n y^m, {x, y} \[Distributed] BinormalDistribution[{0, 0}, {1, 1}, \[Rho]],
  Assumptions -> {n > 0, m > 0, n \[Element] Integers, m \[Element] Integers}] // FullSimplify

$$\frac{2^{\frac{1}{2} (m+n-4)} \left(1-\rho ^2\right)^{\frac{1}{2} (m+n+1)} \left(\left((-1)^m+1\right) \left((-1)^n+1\right) \Gamma \left(\frac{m+1}{2}\right) \Gamma \left(\frac{n+1}{2}\right) \, _2F_1\left(\frac{m+1}{2},\frac{n+1}{2};\frac{1}{2};\rho ^2\right)-\frac{\left((-1)^m-1\right) m \left((-1)^n-1\right) \Gamma \left(\frac{m}{2}\right) \Gamma \left(\frac{n}{2}+1\right) \left((m+2) \left(\rho ^2-1\right) \left(\rho ^2 (m+n+4)-1\right) \, _2F_1\left(\frac{m+4}{2},\frac{n+2}{2};-\frac{1}{2};\rho ^2\right)+\left((m+2) \rho ^2 (m+2 n+7)-m+(n+1) (n+3) \rho ^4-2\right) \, _2F_1\left(\frac{m+2}{2},\frac{n+2}{2};-\frac{1}{2};\rho ^2\right)\right)}{(m+1) (m+3) (n+1) (n+3) \rho ^3}\right)}{\pi }$$

Now for specific small values of $n$ and $m$ great simplifications can be obtained by using FunctionExpand and FullSimplify:

TableForm[Flatten[Table[{n, m, f // FunctionExpand // FullSimplify}, {n, 1, 4}, {m, n, 4}], 1], 
   TableHeadings -> {None, {"\nn", "\nm", "Integral(x^n y^m * PDF,{x,0,Infinity},{y,0,Infinity}, 
   \nAssumptions -> 0 < \[Rho] < 1)"}}]

Simplified integrals

POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard