# Find the characteristic function of $Y$ if $Y\in Tri(-1,1)$

Problem:

Find the characteristic function of $Y$ if $Y\sim\mathcal{ Tri}(-1,1)$. The p.d.f. of Y is thus

$$f_{Y}(y)=\begin{cases}1-\lvert{y}\rvert \ &\text{ for } \lvert{y}\rvert<1\\0\ &\text{ otherwise } \end{cases}.$$

Attempt:

One way to derive the triangular distribution is from the sum of two independent uniform variables, in this particular case: $$Z=X_1 + X_2,$$ where $$X_1,X_2\overset{\rm iid}\sim\mathcal U(-1/2,1/2).$$

Using this approach the characteristic function of $Z$ is easily computed from: $$\varphi_Z(t)=\varphi_{X_1}(t)\varphi_{X_2}(t)=\left(\frac{\sin(\frac{t}{2})}{\frac{t}{2}}\right)^2.$$

I am however attempting to compute this characteristic function using the expected value defined as: $$E[e^{itY}]=\int_{-1}^1 e^{ity}f_{Y}(y) \;\mathrm dy =\int_{-1}^1e^{ity}(1-\lvert{y}\rvert) \;\mathrm dy.$$

When computing this integral I first use the sum property to form:

$$\int_{-1}^1 e^{ity} \;\mathrm dy - \int_{-1}^1e^{ity}\lvert{y}\rvert \;\mathrm dy,$$

and additivity to make the last integral

$$\int_{-1}^0 e^{ity}(-y) \;\mathrm dy + \int_{0}^1e^{ity}y \;\mathrm dy.$$

After competing these integrals I do not end up with the correct signs in order to use the Euler formulas. Hence I'm wondering if the presented integrals are correct or if the sign error lies in my computations.

I am again solving this as an exercise in my probability course and any help would be greatly appreciated!

## 1 Answer

That's the way to go, and a key point is indeed recognising that: $~\cos x=\tfrac 12(e^{\imath x}+e^{-\imath x})~$

\begin{align}\mathsf E(e^{itY}) ~=~& \int_{-1}^1 e^{\imath ty}(1-\lvert{y}\rvert)\operatorname dy \\[0.5ex] ~=~& \int_{-1}^0 e^{-\imath t\cdot(-y)}(1-(-y))\operatorname dy+\int_0^1 e^{\imath ty}(1-y)\operatorname dy \\[0.5ex] ~=~& \int_0^1 (e^{-\imath ty}+e^{\imath ty})(1-y)\operatorname dy \\[0.5ex] ~=~& 2 \int_0^1 \cos(ty)~(1-y)\operatorname dy \\[0.5ex] ~=~& \tfrac 2t \int_0^{t} \cos(ty)\operatorname dty-\tfrac 2{t^2} \int_0^{t} ty\cos(ty)\operatorname dty \\[0.5ex] ~=~& \tfrac 2t \int_0^{t} \cos(z)\operatorname dz-\tfrac 2{t^2} \int_0^{t} z\cos(z)\operatorname dz \end{align}

... and so on.

PS: Don't forget that: $2(1-\cos(t))=4\sin^2\tfrac t2$

• Amazing! Works like a charm! If I've understood the second step correctly the function (1-(-y)) over -1:0 will behave like (1-y) over 0:1 and similarly with the negative exponential function why we get step 3? Thanks. Aug 26, 2016 at 13:13
• @Camram Yes; to take it slowly: \begin{align}\int_{-1}^0 g(-y) ~\mathrm d~y ~=~& \int_{-(-1)}^{-0} g(-y)~(-1)~\mathrm d~(-y) \\[1ex] ~=~& -\int_1^0 g(u)~\mathrm d~u \\[1ex]~=~& \int_0^1 g(u)~\mathrm d~u \\[1ex]\therefore~\int_{-1}^0 g(-y)~\mathrm d~y~=~& \int_0^1 g(y)~\mathrm d~y\end{align} Aug 26, 2016 at 22:17