# Finding an expression for the standard deviation.

1. Jan 4, 2010

The problem is to find a closed form for the expectation (mu) and standard deviation (sigma) of the probability density function underneath (Maple notation):

f(t) = a*exp(a*t)*BesselK(0, 2*sqrt(exp(a*t)))/BesselK(1, 2)

I was able to find an expression for mu::

mu = Int(t*a*exp(a*t)*BesselK(0, 2*sqrt(exp(a*t)))/BesselK(1, 2), t = 0 .. infinity)

Substitution with x = exp(a*t) leads to:

mu = Int((1/(x*a))*ln(x)*x*BesselK(0, 2*sqrt(x))/BesselK(1, 2),x=1..infinity)

-ln(x)*sqrt(x)*BesselK(1, 2*sqrt(x))/(a*BesselK(1, 2))-Int((-sqrt(x)*BesselK(1,
2*sqrt(x))/(a*BesselK(1, 2)))*(1/x),x)

-(ln(x)*sqrt(x)*BesselK(1, 2*sqrt(x))+BesselK(0, 2*sqrt(x)))/(a*BesselK(1, 2))

Finally the following closed form can be obtained:

mu = BesselK(0, 2)/(a*BesselK(1, 2))

I was not able to find a closed form for sigma. I suspect, however, that the solution must be proportional to: BesselK(0, 2)/(a*BesselK(1, 2)).

Who can help me?

2. Jan 4, 2010

### mathman

Did you try to get the second moment?
mu2 = Int(t2*a*exp(a*t)*BesselK(0, 2*sqrt(exp(a*t)))/BesselK(1, 2), t = 0 .. infinity)

3. Jan 5, 2010

Yes, I did, but I was not able to find a solution.

4. Jan 5, 2010

### winterfors

There is something wrong with your PDF f(x), since
int(f(x), t = 0 .. infinity)
does not equal one for any value of the variable a (thus f(x) is not a PDF).

5. Jan 6, 2010

I am sorry to tell you, but according to Maple 12

Int(a*exp(a*t)*BesselK(0, 2*sqrt(exp(a*t)))/BesselK(1, 2),t=0..infinity) = 1.

Note, that f(t) is only defined for 0 < t.

6. Jan 6, 2010

f(t) = a*exp(a*t)*BesselK(0, 2*sqrt(exp(a*t)))/BesselK(1, 2) is defined for 0 < t and for 0 < a.

7. Jan 7, 2010

### winterfors

You are right, f(t) does indeed integrate to 1 for a>0 (on 0<t<inf). I was using an older version of Maple that does not think the integral of the PDF converges.

Your calculation of the mean is correct (I have verified now using Mathematica). I have not been able to find an analytical solution for the variance, but you can easily calculate it numerically, e.g. in Maple by

evalf(
Int(x*x*exp(x)*BesselK(0, 2*exp(x/2)),x=0..infinity)/BesselK(1, 2)/a^2
-(Int(x*exp(x)*BesselK(0, 2*exp(x/2)),x=0..infinity)/BesselK(1, 2)/a)^2
);

ans = 0.3715365403*1/(a^2)

Don't know if that is of any help... (in above, I have moved the variable "a" out of the integrals using variable substitution)

-Emanuel

8. Jan 7, 2010