Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

A Problem seemingly with NIntegrate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122231] A Problem seemingly with NIntegrate
  • From: choco munch <choceam at gmail.com>
  • Date: Fri, 21 Oct 2011 06:26:05 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hi,

Here is my problem. I have two PDFs (Probability Density Functions).
One is a sum of 2 IID Nakagami-m and the other is a zero mean
Guassian. I am constructing a new RV which is the product of these
two, so I have in effect:
                              Z =  (X1 + X2)*N = X12*N
X1, X2 are distributed IID Nakagami and N is a zero mean Normal RV.

Now I know how to compute the PDF of Z by using PDF_Z[z_] :=
NIntegrate[1/x PDF_X12[x]* PDF_N[z/x], {x, 0, Infinity}]

Unforutantely, when i do this

NIntegrate[PDF_Z[z], {z, -Infinty, Infinty}] I do not get 1.

there is something going on with NIntegrate here, but I don't know
what. Here is the code:

==========================================================================
(*K[m] is just a constant *)
K[m_] := (4 Sqrt[Pi] Gamma[2 m] m^(2 m))/(Gamma[m]^2 Gamma[2 m + 1/2]
2^(4 m - 1) \[CapitalOmega]^(2 m));

(*f1 is the sum of two Nakagami's*)
f1[r_] := K[m] r^(4 m - 1) Hypergeometric1F1[2 m, 2 m + 1/2, (m r^2)/
(2 \[CapitalOmega])] Exp[-m r^2/\[CapitalOmega]]

(*f2 is the standard normal *)
f2[r_] := 1/(Sqrt[2 Pi] \[Sigma]) Exp[-r^2/(2 \[Sigma]^2)];

(*f3 is the product of X1+X2 and N*)
f3[z_] := NIntegrate[1/x f1[x] f2[z/x], {x, 0, Infinity}]

(*here is the problem*)

NIntegrate[f3[x], {x, -10, 10}]

(*this will not give 1, why? I have checked both f1 and f2, they are
valid PDFs*)



  • Prev by Date: Re: Fitting step function
  • Next by Date: can not understand the symbol or the equation for an integration result
  • Previous by thread: Re: Split Plot Graph in Mathematica
  • Next by thread: Re: A Problem seemingly with NIntegrate