# Characteristic function of a continuous random variable

Gold Member

## Homework Statement

I must calculate the characteristic function as well as the first moments and cumulants of the continuous random variable $f_X (x)=\frac{1}{\pi } \frac{c}{x^2+c^2}$ which is basically a kind of Lorentzian.

## Homework Equations

The characteristic function is simply a Fourier transform, namely $\phi _X (k)= \int _{-\infty } ^{\infty } \frac{e^{ikx}}{x^2+c^2}dx$.

## The Attempt at a Solution

My problem resides in evaluation the integral. If there wasn't that exponentional in the numerator, I'd get an arctangent but unfortunately I have a complex exponentional there.
Is $\phi _X (k)=\frac{ce^{ik}}{\pi} \int _{-\infty}^{\infty} \frac{e^x}{x^2+c^2}dx$ valid and a good start?

Edit: Hmm no ! Very bad. This would make the integral not convergent... How is that possible? The range of x is -infinity to infinity!

Last edited:

Related Calculus and Beyond Homework Help News on Phys.org
Ray Vickson
Homework Helper
Dearly Missed

## Homework Statement

I must calculate the characteristic function as well as the first moments and cumulants of the continuous random variable $f_X (x)=\frac{1}{\pi } \frac{c}{x^2+c^2}$ which is basically a kind of Lorentzian.

## Homework Equations

The characteristic function is simply a Fourier transform, namely $\phi _X (k)= \int _{-\infty } ^{\infty } \frac{e^{ikx}}{x^2+c^2}dx$.

## The Attempt at a Solution

My problem resides in evaluation the integral. If there wasn't that exponentional in the numerator, I'd get an arctangent but unfortunately I have a complex exponentional there.
Is $\phi _X (k)=\frac{ce^{ik}}{\pi} \int _{-\infty}^{\infty} \frac{e^x}{x^2+c^2}dx$ valid and a good start?

Edit: Hmm no ! Very bad. This would make the integral not convergent... How is that possible? The range of x is -infinity to infinity!
No, it is not valid: exp(ikx) is not equal to exp(ik)*exp(x).

Below, assume c > 0.

Rewrite the integral as
$$J = \int_{\Gamma} \frac{e^{i k z}}{c^2 + z^2} \, dz,$$
where $\Gamma$ is the real axis. You will need to extend this out to the complex z-plane and perform a contour integration. You need to consider two cases: (1) k > 0; and (2) k < 0. In case (1) the exponent in the complex z-plane is ik(x+iy) = ikx - ky, where y is the imaginary part of z. Since we have exponential damping for y > 0, we may complete the contour by adding the semi-circle C from (+∞ + i0 to -∞ + i0--- the limit as R→ ∞ of the semicircle R exp(iθ), for θ going from 0 to π). Now you have a closed contour, and it encloses the pole z = ic of 1/(z^2 + c^2). Letting $\gamma = \Gamma \cup C$ te the closed contour in the upper z=plane, the Cauchy residut theorem gives
$$J = \oint_{\gamma} \frac{e^{ikz}}{c^2 + z^2} dz = 2\pi i \text{Res} \left. \left( \frac{e^{ikz}}{z^2 + c^2} \right) \right|_{z = ic} = 2 \pi i \frac{e^{ik ic}}{2ic} = \pi \frac{e^{-kc}}{c}.$$
You can do something similar for k < 0.

Note: all this has nothing at all to do with probability; it is just standard advanced integration methodology, using contour integration. For more on this, see
http://en.wikipedia.org/wiki/Residue_theorem or
http://math.fullerton.edu/mathews/c2003/ResidueCalcMod.html [Broken] .

RGV

Last edited by a moderator:
Gold Member
No, it is not valid: exp(ikx) is not equal to exp(ik)*exp(x).
Shame on me. It's not the first time I make this error; the last time I made it I think it was on this forum a few years ago!
Below, assume c > 0.

Rewrite the integral as
$$J = \int_{\Gamma} \frac{e^{i k z}}{c^2 + z^2} \, dz,$$
where $\Gamma$ is the real axis. You will need to extend this out to the complex z-plane and perform a contour integration. You need to consider two cases: (1) k > 0; and (2) k < 0. In case (1) the exponent in the complex z-plane is ik(x+iy) = ikx - ky^2, where y is the imaginary part of z. Since we have exponential damping for y > 0, we may complete the contour by adding the semi-circle C from (+∞ + i0 to -∞ + i0--- the limit as R→ ∞ of the semicircle R exp(iθ), for θ going from 0 to π). Now you have a closed contour, and it encloses the pole z = ic of 1/(z^2 + c^2). Letting $\gamma = \Gamma \cup C$ te the closed contour in the upper z=plane, the Cauchy residut theorem gives
$$J = \oint_{\gamma} \frac{e^{ikz}}{c^2 + z^2} dz = 2\pi i \text{Res} \left. \left( \frac{e^{ikz}}{z^2 + c^2} \right) \right|_{z = ic} = 2 \pi i \frac{e^{ik ic}}{2ic} = \pi \frac{e^{-kc}}{c}.$$
You can do something similar for k < 0.

Note: all this has nothing at all to do with probability; it is just standard advanced integration methodology, using contour integration. For more on this, see
http://en.wikipedia.org/wiki/Residue_theorem or
http://math.fullerton.edu/mathews/c2003/ResidueCalcMod.html [Broken] .

RGV
Ok I'm going to close my eyes for a few, and will use your post if I'm stuck somewhere. I didn't realize I could use complex integration. I have supposedly studied this so I should be fine. Thanks a bunch. I'll post here if I get stuck.

Last edited by a moderator:
Gold Member
I think I can get rid of the cases of the positiveness of k.
Feel free to correct me if I'm wrong: $I=\oint _{\gamma} \frac{e^{ikz}}{z^2+c^2}dz$ where gamma is a curve enclosing the 2 singularities (at $z=\pm ic$).
Thus $I=2\pi i \left [ \text{Res} (f, -ic)+ \text{Res} (f, ic) \right ]=2\pi i \left [ \lim _{z \to -ic} (z+ic) \frac{e^{ik}}{z^2+c^2} +\lim _{z \to ic} (z-ic) \frac{e^{ik}}{z^2+c^2} \right ]$$=2\pi i \left ( \lim _{z \to -ic } \frac{e^{ikz}}{z-ic} + \lim _{z\to ic} \frac{e^{ikz}}{z+ic} \right )$$$=\frac{\pi}{c} (e^{-kc}-e^{kc})$$.
Therefore $\phi _X (k)=e^{-kc}-e^{kc}$. Do you think this is correct?
Edit: I don't think I'm right. There's no "i" in the characteristic function, implying that the first moment will be complex which is impossible... hmm sigh.

Last edited:
Dick
Homework Helper
I think I can get rid of the cases of the positiveness of k.
Feel free to correct me if I'm wrong: $I=\oint _{\gamma} \frac{e^{ikz}}{z^2+c^2}dz$ where gamma is a curve enclosing the 2 singularities (at $z=\pm ic$).
Thus $I=2\pi i \left [ \text{Res} (f, -ic)+ \text{Res} (f, ic) \right ]=2\pi i \left [ \lim _{z \to -ic} (z+ic) \frac{e^{ik}}{z^2+c^2} +\lim _{z \to ic} (z-ic) \frac{e^{ik}}{z^2+c^2} \right ]$$=2\pi i \left ( \lim _{z \to -ic } \frac{e^{ikz}}{z-ic} + \lim _{z\to ic} \frac{e^{ikz}}{z+ic} \right )$$$=\frac{\pi}{c} (e^{-kc}-e^{kc})$$.
Therefore $\phi _X (k)=e^{-kc}-e^{kc}$. Do you think this is correct?
No. You want to integrate along the real axis and then close the contour with a big half circle. And then you want argue that you can ignore the circle part as R->infinity. The choice of whether to close in the upper half plane or the lower is going to depend on the sign of k. Is that ringing a bell?

Gold Member
No. You want to integrate along the real axis and then close the contour with a big half circle. And then you want argue that you can ignore the circle part as R->infinity. The choice of whether to close in the upper half plane or the lower is going to depend on the sign of k. Is that ringing a bell?
Hmm not really. I don't really understand why the sign of k would matter when z could also be real and either negative or positive.
Anyway for k<0, ikz is ik(x+iy)=ikx-ky^2. Here I have a "problem" in the sense that for both y tending to -negative and positive infinity, the real part of the exponential tends to infinity. So that I don't have any exponential damping but the exponental remains "small" for small values of y.
Does this tells me to choose a "small" half circle ranging from say z=-2c to z=2c and in the "negative i" part of the complex plane as to englobe the pole at z=-ic? If I call \gamma _2 the curve of this half circle, then $\oint _{\gamma _2 } \frac{e^{ikz}}{z^2+c^2} dz=2\pi i \text{Res}(\frac{e^{ikz}}{z^2+c^2},-ic)$. Which I already calculated, so I'm sure I'm wrong again, but don't know where.

Dick
Homework Helper
You are blocking on this. ik(x+iy)=ikx-ky. Not ky^2. If k<0 then one half plane is definitely better than the other. Which one is exponentially damped? y>0 or y<0??

Gold Member
You are blocking on this. ik(x+iy)=ikx-ky. Not ky^2. If k<0 then one half plane is definitely better than the other. Which one is exponentially damped? y>0 or y<0??
y<0 without any doubt. This doesn't change my draft of the semi-circle, still in the lower part (under the real axis in the complex plane) of the complex plane. It still encloses the pole z=-ic.

Dick
Homework Helper
y<0 without any doubt. This doesn't change my draft of the semi-circle, still in the lower part (under the real axis in the complex plane) of the complex plane. It still encloses the pole z=-ic.
Ok, then. So depending on the sign of k you enclose one pole or the other. Don't forget that if you close in the upper half plane your contour is counterclockwise and if you close in the lower half plane it's clockwise. That makes a difference too.

Ray Vickson
Homework Helper
Dearly Missed
Hmm not really. I don't really understand why the sign of k would matter when z could also be real and either negative or positive.
Anyway for k<0, ikz is ik(x+iy)=ikx-ky^2. Here I have a "problem" in the sense that for both y tending to -negative and positive infinity, the real part of the exponential tends to infinity. So that I don't have any exponential damping but the exponental remains "small" for small values of y.
Does this tells me to choose a "small" half circle ranging from say z=-2c to z=2c and in the "negative i" part of the complex plane as to englobe the pole at z=-ic? If I call \gamma _2 the curve of this half circle, then $\oint _{\gamma _2 } \frac{e^{ikz}}{z^2+c^2} dz=2\pi i \text{Res}(\frac{e^{ikz}}{z^2+c^2},-ic)$. Which I already calculated, so I'm sure I'm wrong again, but don't know where.
My original post had a typo: I should have written ik(x+iy) = ikx - ky (not -ky^2). I have edited out that error.

The point is that when k > 0 you get damping by having y > 0, but when k < 0 you need y < 0 instead.

RGV

Gold Member
Ok, then. So depending on the sign of k you enclose one pole or the other. Don't forget that if you close in the upper half plane your contour is counterclockwise and if you close in the lower half plane it's clockwise. That makes a difference too.
Oh I see. Does this mean that $\phi _X (k)=e^{-kc}+e^{kc}$ instead of my previous $\phi _X (k)=e^{-kc}-e^{kc}$? (P.S.:Latex isn't working so that's why I jump to the further conclusion here)
But that would still make no sense to me... :(

My original post had a typo: I should have written ik(x+iy) = ikx - ky (not -ky^2). I have edited out that error.

The point is that when k > 0 you get damping by having y > 0, but when k < 0 you need y < 0 instead.

RGV
Yeah I noticed thanks to Dick :) I missed the typo.

Dick
Homework Helper
Oh I see. Does this mean that $\phi _X (k)=e^{-kc}+e^{kc}$ instead of my previous $\phi _X (k)=e^{-kc}-e^{kc}$? (P.S.:Latex isn't working so that's why I jump to the further conclusion here)
But that would still make no sense to me... :(
Read the stuff you quoted from me again. You don't have any contour including both poles. Which pole is enclosed depends on the sign of k. So you don't have both e^(kc) and e^(-kc) in the solution. Split it into the cases k>0 and k<0 and given an answer for each case. Then think about how you might write them as a single formula. The absolute value function might be useful.

Gold Member
Read the stuff you quoted from me again. You don't have any contour including both poles. Which pole is enclosed depends on the sign of k. So you don't have both e^(kc) and e^(-kc) in the solution. Split it into the cases k>0 and k<0 and given an answer for each case. Then think about how you might write them as a single formula. The absolute value function might be useful.
Ok thanks. I think I start to understand some things now. This would make:
for k<0, $I=\oint _{\gamma} \frac{e^{ikz}}{z^2+c^2}dz=-\frac{\pi}{c}e^{kc}$
for k>0, $I=-\frac{\pi}{c}e^{-kc}$.
This would mean that for $k<0$, $\phi _X (k)=-e^{kc}$ and for $k>0$, $\phi _X (k)=-e^{-kc}$.
Or in more compact form, $\phi _X(k)=-e^{|k|c}$.
I know I made a sign error everywhere, since I'm sure I should get a fonction like a mountain and not like a hole.
Details: for k>0, $I=2\pi i \text {Res} (f,ic)=-2\pi i \cdot \lim _{z \to ic} (z-ic) \frac{e^{ikz}}{z^2+c^2}=-\frac{\pi}{c}e^{-kc}$. The mignus sign in front of "2" comes from the counter clock-wise curve with semi circle shape. So I guess I got it wrong and should put a mignus sign when the curve's direction is clock-wise?
Anyway I can't be right on the final form anyway since I'm sure I should have a factor "i" in the numerator; because otherwise the first moment will be complex which is impossible. hmm...
Thank you guys for being so patient with me.

Dick
Homework Helper
Ok thanks. I think I start to understand some things now. This would make:
for k<0, $I=\oint _{\gamma} \frac{e^{ikz}}{z^2+c^2}dz=-\frac{\pi}{c}e^{kc}$
for k>0, $I=-\frac{\pi}{c}e^{-kc}$.
This would mean that for $k<0$, $\phi _X (k)=-e^{kc}$ and for $k>0$, $\phi _X (k)=-e^{-kc}$.
Or in more compact form, $\phi _X(k)=-e^{|k|c}$.
I know I made a sign error everywhere, since I'm sure I should get a fonction like a mountain and not like a hole.
Details: for k>0, $I=2\pi i \text {Res} (f,ic)=-2\pi i \cdot \lim _{z \to ic} (z-ic) \frac{e^{ikz}}{z^2+c^2}=-\frac{\pi}{c}e^{-kc}$. The mignus sign in front of "2" comes from the counter clock-wise curve with semi circle shape. So I guess I got it wrong and should put a mignus sign when the curve's direction is clock-wise?
Anyway I can't be right on the final form anyway since I'm sure I should have a factor "i" in the numerator; because otherwise the first moment will be complex which is impossible. hmm...
Thank you guys for being so patient with me.
You are making a lot of progress. Yes, clockwise contours get the extra negative sign, so the overall minus shouldn't be there. And check your absolute value assignment as well. I've think you've got that backwards too. And finally, I wouldn't worry much about the first moment. Your distribution doesn't really have one. The integral is pretty badly behaved. I hope Ray Vickson can fill in the details here, this isn't really my field.

Gold Member
You are making a lot of progress. Yes, clockwise contours get the extra negative sign, so the overall minus shouldn't be there. And check your absolute value assignment as well. I've think you've got that backwards too. And finally, I wouldn't worry much about the first moment. Your distribution doesn't really have one. The integral is pretty badly behaved. I hope Ray Vickson can fill in the details here, this isn't really my field.
Ok thanks for the encouragements! Yes I made a typo for the sign in the exponential, so that $\phi _X(k)=e^{-|k|c}$.
I have 2 definitions to calculate the first moment. One involves computing $\langle x \rangle = \int _{-\infty} ^{\infty} x\frac{1}{\pi } \frac{c}{x^2+c^2} dx$ which would be a pain like you say and the other way seems much easier: $\langle x \rangle = \frac{1}{i} \frac{d\phi (k)}{dk} \big | _{k=0}=\frac{-c}{i} if k>0$ and $\frac{c}{i}$ if $k<0$.
However the first moment should be a real number...

Now I'm looking at wikipedia (http://en.wikipedia.org/wiki/Cauchy_distribution).
It seems like my characteristic function would have been complex if $x_0$ was different from 0. Namely if I was given that $f_X (x)=\frac{1}{\pi } \frac{c}{(x-x_0)^2+c^2}$ I would have gotten $\phi (k)=e^{ikx_0-c|k|}$.
Nevermind, this would still not get rid of the problem.
Does this mean that there's no mean?!

OH WOW! On that wikipedia's page it's written that there's no mean nor any higher moment!!!

Dick
Homework Helper
Ok thanks for the encouragements! Yes I made a typo for the sign in the exponential, so that $\phi _X(k)=e^{-|k|c}$.
I have 2 definitions to calculate the first moment. One involves computing $\langle x \rangle = \int _{-\infty} ^{\infty} x\frac{1}{\pi } \frac{c}{x^2+c^2} dx$ which would be a pain like you say and the other way seems much easier: $\langle x \rangle = \frac{1}{i} \frac{d\phi (k)}{dk} \big | _{k=0}=\frac{-c}{i} if k>0$ and $\frac{c}{i}$ if $k<0$.
However the first moment should be a real number...

Now I'm looking at wikipedia (http://en.wikipedia.org/wiki/Cauchy_distribution).
It seems like my characteristic function would have been complex if $x_0$ was different from 0. Namely if I was given that $f_X (x)=\frac{1}{\pi } \frac{c}{(x-x_0)^2+c^2}$ I would have gotten $\phi (k)=e^{ikx_0-c|k|}$.
Nevermind, this would still not get rid of the problem.
Does this mean that there's no mean?!

OH WOW! On that wikipedia's page it's written that there's no mean nor any higher moment!!!
Sure. Look at the integral representation of the moments. They pretty obviously diverge.

Gold Member
Sure. Look at the integral representation of the moments. They pretty obviously diverge.
You are right. So I'm guessing this also means that there's no cummulants eithers.