0
$\begingroup$

I want to perform the following integration wrt $x$: $$\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi\sigma^2}}e^{\frac{-(y-hx)^2}{2\sigma^2}}\left(1+\frac{x^2}{b}\right)^{-(\frac{b+1}{2})}dx$$

Here first part is a gaussian random variable (treating $y,h,\sigma$ as constants and the second part is student-t distribution with parameter $b$. Does this have any closed form or represents any other kind of distribution. I am unable to figure out.

$\endgroup$
7
  • 2
    $\begingroup$ This is a convolution and thus represents the distribution of the sum of two independetn random variables. This problem is studied in this article: doi.org/10.2991/978-94-6239-061-4_6. I could not check the text because it is behind a paywall, but you can try to contact the authors for a copy. $\endgroup$
    – cdalitz
    Commented Dec 22, 2021 at 10:02
  • 1
    $\begingroup$ It is not a member of any well-known family of distributions and likely has no nice analytical formula. What statistical problem is this integral intended to solve? Often, information about that context helps point the way towards appropriate analyses. For instance, maybe you only need to know a particular moment of this distribution, or maybe you only need to know its tail behavior. Those problems are both readily solvable. Help us out by providing that additional information. $\endgroup$
    – whuber
    Commented Dec 22, 2021 at 14:51
  • $\begingroup$ @cdalitz Thank you. This is of great help. The book talks about product of student's t with normal distribution of zero mean, however I have non zero mean. So I feel I am still stuck. $\endgroup$
    – Pikaboo
    Commented Dec 25, 2021 at 12:52
  • $\begingroup$ @whuber Thank you giving it attention. The problem involves computation of messages for sum-product algorithm over factor graph based on linear model $y=Hx+n$. $\endgroup$
    – Pikaboo
    Commented Dec 25, 2021 at 12:58
  • 1
    $\begingroup$ @Aashna you cannot decompose the intergral this way, because the third integral diverges either for $x\to\infty$ or for $x\to -\infty$, depending on the sign of $y$. $\endgroup$
    – cdalitz
    Commented Dec 25, 2021 at 13:53

1 Answer 1

1
$\begingroup$

As being said above this integral does not a closed form solution yet it can be simplified considerably to a form which, for big values of $b$ can be approximated by a closed form. The idea is simple; we express the t-Student as a continuous mixture of zero-mean normal distributions with the inverse variance conforming to a Gamma distribution, change the order of integration, carry out the integral over $x$ as a Gaussian integral and then simplify the remaining integral as much as possible. Here you go:

\begin{eqnarray} {\mathfrak f}_b^{(y,h,\sigma)} := \int\limits_{-\infty}^\infty \frac{1}{\sqrt{2 \pi } \sqrt{\sigma ^2}} e^{-\frac{(y-h x)^2}{2 \sigma ^2}} \left(\frac{x^2}{b}+1\right)^{\frac{1}{2} (-b-1)} dx= \\ \frac{\exp(-\frac{y^2}{2 \sigma ^2})}{\sqrt{\sigma ^2} (n-1)! } \int\limits_0^\infty \frac{\xi ^{n-1} \exp \left(\frac{h^2 y^2}{2 \sigma ^4 \left(\frac{2 \xi }{b}+\frac{h^2}{\sigma ^2}\right)}-\xi \right)}{\sqrt{\frac{2 \xi }{b}+\frac{h^2}{\sigma ^2}}} d\xi =\\ \frac{2}{h} \exp\left( +\frac{b h^2-y^2}{2 \sigma^2}\right) \int\limits_0^1 \frac{\left(\frac{1-\eta ^2}{2\eta ^2}\right)^{n-1} \left(\frac{b h^2}{\sigma ^2}\right)^n }{(n-1)!} \exp \left( \frac{\eta ^4 y^2-b h^2}{2 \eta ^2 \sigma ^2} \right) \frac{d\eta}{\eta^2} \tag{1} \end{eqnarray}

where $n:=(b+1)/2$.

The Mathematica code snippet below verifies all the steps in the calculation:

{h, y, \[Sigma]} = RandomReal[{1, 2}, 3, WorkingPrecision -> 50];
n = RandomInteger[{1, 10}];
b = 2 n - 1;
CC = h  y/(Sqrt[2]  \[Sigma]^2);

1/Sqrt[2  Pi  \[Sigma]^2]  NIntegrate[ 
  Exp[-(y - h  x)^2/(2  \[Sigma]^2)] (1 + x^2/b)^(-(b + 1)/
      2), {x, -Infinity, Infinity}]
Exp[-y^2/(2  \[Sigma]^2)]/
  Sqrt[2  Pi  \[Sigma]^2]  NIntegrate[\[Xi]^(n - 1)/(n - 
       1)!  Exp[-\[Xi]] (
   E^((h^2  y^2/(2 \[Sigma]^4))/((2 \[Xi])/b + h^2/\[Sigma]^2)) Sqrt[
    2 \[Pi]])/Sqrt[(2 \[Xi])/b + h^2/\[Sigma]^2], {\[Xi], 0, Infinity}]
(b  E^(-(y^2/(2 \[Sigma]^2)))  h)/ (\[Sigma]^2) (-1)^(
  n - 1)/(n - 1)! D[ 
   Exp[\[Theta]  ((b  h^2)/(2 \[Sigma]^2))] NIntegrate[E^((
     y^2 \[Eta]^4 - b h^2 \[Theta])/(
     2 \[Eta]^2 \[Sigma]^2))/\[Eta]^2 , {\[Eta], 0, 1}], {\[Theta], 
    n - 1}] /. \[Theta] :> 1
( 2^1  E^((b h^2 - y^2)/(2 \[Sigma]^2))  ((b h^2)/(2 \[Sigma]^2))^n)/(
 h (-1 + n)!)
   NIntegrate[((-\[Eta]^2 + 1)/\[Eta]^2)^(n - 1) E^((
   y^2 \[Eta]^4 - b  h^2)/(2 \[Eta]^2 \[Sigma]^2))/\[Eta]^2 , {\[Eta],
    0, 1}]
Update:

It is interesting to analyze the large $n$ limit of our result above. Below we plot the integrand of the last equation in $(1)$ as a function of the integration variable $\eta$.

The integrand of the last equation for different values of <span class=$n=2,\cdots,20$ from violet to red respectively." />

As we can see this integrand turns into a narrow bell shaped curve located at some $\eta_* \in (0,1)$ and as such we can use the stationary point approximation in this regime.

Update 1:

Here we provide a large-$n$ approximation of the result $(1)$. We define auxiliary functions as:

\begin{eqnarray} P^{(h,\sigma)}_1(y)&=&\frac{ h \sigma ^2 \sqrt{\frac{\left(h^2+\sigma ^2\right)^3}{h^2 \sigma ^4}} \left(h^4+h^2 y^2-\sigma ^4\right)}{2 \left(h^2+\sigma ^2\right)^{7/2}} \\ P^{(h,\sigma)}_2(y)&=&\frac{\left(5 h^8+h^6 \left(13 \sigma ^2+2 y^2\right)+h^4 \left(15 \sigma ^4+y^4+\sigma ^2 y^2\right)+h^2 \left(11 \sigma ^6-\sigma ^4 y^2\right)+4 \sigma ^8\right)}{8 \left(h^2+\sigma ^2\right)^4} \\ \vdots \end{eqnarray}

And now we are ready to give the result. Here you go:

\begin{eqnarray} &&{\mathfrak f}_{2n-1}^{(y,h,\sigma)} = \frac{ \exp\left(+\frac{h^2 (2 n-1)-y^2}{2 \sigma^2}\right) 2^{1} \left(\frac{h^2 (2 n-1)}{2\sigma ^2}\right)^n} { h (n-1)!} \cdot \\ && % \int\limits_0^1 \frac{ \exp \left( \frac{h^2}{2 \eta ^2 \sigma ^2}+\frac{\eta ^2 y^2}{2 \sigma ^2}\right) \cdot % % % } {\left(1-\eta ^2\right)} \cdot \exp\left[ n \left( \log\left(\frac{1-\eta ^2}{\eta ^2}\right) -\frac{h^2}{\eta ^2 \sigma ^2}\right) \right] d\eta \\ &&\simeq \frac{ \text{sgn}(h) \cdot e^{-\frac{y^2}{2 \left(h^2+\sigma ^2\right)}} }{ \sqrt{h^2+\sigma ^2} } \cdot % \underline{ \frac{\sqrt{2 \pi } \left(n-\frac{1}{2}\right)^n e^{-n+\frac{1}{2}}}{\sqrt{n} (n-1)! } } % \cdot \\ && \underline{\underline{ \int\limits_{-\frac{2 h \sqrt{\frac{n \left(h^2+\sigma ^2\right)^3}{h^2 \sigma ^4}}}{\sqrt{h^2+\sigma ^2}}}^{2 \left(1-\frac{h}{\sqrt{h^2+\sigma ^2}}\right) \sqrt{\frac{n \left(h^2+\sigma ^2\right)^3}{h^2 \sigma ^4}}} % \frac{e^{-\frac{\eta ^2}{2}}}{ \sqrt{2 \pi }} \cdot % \left(1+P^{(h,\sigma)}_1(y)\cdot \frac{\eta}{\sqrt{n}}+ % P^{(h,\sigma)}_2(y) \cdot \frac{\eta ^2}{n} +O(\frac{\eta^3}{n^{3/2}}) \right) % d\eta }} \end{eqnarray}

In the second line we expanded (to the second order) both the first term in the integrand and the term in the parentheses in the exponential about the stationary point $\eta_* := h/\sqrt{h^2+\sigma^2}$ and then we simplified the result. Note that in the limit $n \rightarrow \infty$ both the underlined and the doubly underlined terms go to unity and as such we the result is $\lim_{n\rightarrow \infty} {\mathfrak f}_{2n-1}^{(y,h,\sigma)} = \frac{ \text{sgn}(h) \cdot e^{-\frac{y^2}{2 \left(h^2+\sigma ^2\right)}} }{ \sqrt{h^2+\sigma ^2} }$ as expected.

Again, the code snippet below verifies all the steps numerically:

{h, y, \[Sigma]} = RandomReal[{1, 2}, 3, WorkingPrecision -> 50];
n = RandomInteger[{10, 15}];
b = 2 n - 1;
CC = h y/(Sqrt[2] \[Sigma]^2);


( 2^1 E^(((2 n - 1) h^2 - y^2)/(
  2 \[Sigma]^2)) (((2 n - 1) h^2)/(2 \[Sigma]^2))^n)/(h (-1 + n)!)
   NIntegrate[((-\[Eta]^2 + 1)/\[Eta]^2)^n E^((
   y^2 \[Eta]^4 - (2 n - 1) h^2)/(2 \[Eta]^2 \[Sigma]^2))/(
   1 - \[Eta]^2) , {\[Eta], 0, 1}]
( 2^1 E^(((2 n - 1) h^2 - y^2)/(
  2 \[Sigma]^2)) (((2 n - 1) h^2)/(2 \[Sigma]^2))^n)/(h (-1 + n)!)
   NIntegrate[E^(
  h^2/(2 \[Eta]^2 \[Sigma]^2) + (y^2 \[Eta]^2)/(2 \[Sigma]^2) + 
   n (-(h^2/(\[Eta]^2 \[Sigma]^2)) + Log[(1 - \[Eta]^2)/\[Eta]^2]))/(
  1 - \[Eta]^2) , {\[Eta], 0, 1}]
(*Stationary phase approximation.*)
( 2^1 E^(((2 n - 1) h^2 - y^2)/(
  2 \[Sigma]^2)) (((2 n - 1) h^2)/(2 \[Sigma]^2))^n)/(h (-1 + n)!)  (
 E^((h^4 + \[Sigma]^4 + h^2 (y^2 + 2 \[Sigma]^2))/(
  2 \[Sigma]^2 (h^2 + \[Sigma]^2))) (h^2 + \[Sigma]^2))/\[Sigma]^2 \
NIntegrate[(1 + (7/2 + y^2  (h^2/\[Sigma]^4 - 1/(2 \[Sigma]^2)) + (
        5 h^4)/(2 \[Sigma]^4) + (4 h^2)/\[Sigma]^2 + (2 \[Sigma]^2)/
        h^2 + (h^2 y^4)/(2 \[Sigma]^4 (h^2 + \[Sigma]^2)))  (\[Eta] - 
        h/Sqrt[h^2 + \[Sigma]^2])^2 + (\[Eta] - h/Sqrt[
        h^2 + \[Sigma]^2])  ((
        h y^2)/(\[Sigma]^2 Sqrt[
         h^2 + \[Sigma]^2]) + ((h^2 - \[Sigma]^2) Sqrt[
         h^2 + \[Sigma]^2])/(h \[Sigma]^2))) E^(
   n ((-h^2 - \[Sigma]^2)/\[Sigma]^2 - (
      2 (h^2 + \[Sigma]^2)^3 (\[Eta] - h/Sqrt[h^2 + \[Sigma]^2])^2)/(
      h^2 \[Sigma]^4) + Log[\[Sigma]^2/h^2])) , {\[Eta], 0, 1}]
(Sign[h] E^(-y^2/(2 (h^2 + \[Sigma]^2))))/(h^2 + \[Sigma]^2)^(1/2) (
 Sqrt[2 \[Pi]]  (E^(-n + 1/2))  (( -(1/2) + n)^n) )/( (-1 + n)! Sqrt[
  n]) NIntegrate[(1 + (\[Eta])^2 (
      5 h^8 + 4 \[Sigma]^8 + h^6 (2 y^2 + 13 \[Sigma]^2) + 
       h^4 (y^4 + y^2 \[Sigma]^2 + 15 \[Sigma]^4) + 
       h^2 (-y^2 \[Sigma]^4 + 11 \[Sigma]^6))/(
      8  n (h^2 + \[Sigma]^2)^4) + (\[Eta]) (
      h \[Sigma]^2 Sqrt[(h^2 + \[Sigma]^2)^3/(
       h^2 \[Sigma]^4)] (h^4 + h^2 y^2 - \[Sigma]^4))/(
      Sqrt[4 n] (h^2 + \[Sigma]^2)^(7/2)) ) E^(-1/2 (\[Eta])^2)/Sqrt[
   2 \[Pi]] , {\[Eta], -(h/Sqrt[h^2 + \[Sigma]^2]) Sqrt[(
    4  n ((h^2 + \[Sigma]^2)^3) )/(
    h^2 \[Sigma]^4)], (-(h/Sqrt[h^2 + \[Sigma]^2]) + 1) Sqrt[(
    4  n ((h^2 + \[Sigma]^2)^3) )/(h^2 \[Sigma]^4)]}]

Numerical verification of the large-<span class=$n$ approximation." />

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.