Find the Variance of random variable $Y=\int_{0}^{2}X(t)dt $ 
If $X(t)$ is stationary process having mean value $E[X(t)]=3$ and autocorrelation function $R_{xx}(\tau)=9+2e^{-|\tau|}$.The variance of random variable $Y=\int_{0}^{2}X(t)dt $ will be____
$(A)1$
$(B)2.31$
$(C)4.54$
$(D)0$


I have no idea how to solve this but I tried like this

$$E[X^2]=R_{xx}(0)=11$$
$$E[X]^2=9$$
\begin{align}
Var(Y)&=\int_{0}^{2}Var(X(t))dt\\
&=\int_{0}^{2}E[X^2(t)]-E[X]^2dt\\
&=\int_{0}^{2}2dt\\
&=4
\end{align}
But its not in the options.
 A: First of all: The error of your approach was to pull out the integral from the Variance function. While this works (under some conditions) for the expected value, it doesn't for $$E\left[\left(\int_0^2X(t)dt\right)^2\right],$$ due to the square term.
Note that:


*

*You can calculate $E[Y]$ by interchanging integration and expected value.

*$E[Y]^2$ can be calculated by using \begin{align}E[Y^2]&=E\left[\left(\int_0^2X(t)dt\right)\left(\int_0^2X(s)ds\right)\right]\\
&=\int_0^2\int_0^2E[X(t)X(s)]dt~ds\\
&=\int_0^2\int_0^2R(t-s)dt~ds\\
&\left(=\int_{-2}^2(2-|x|)R(x)dx\right)
\end{align}


Altogether, this should yield answer $(C)$.
EDIT: I used the identity
$$\int_0^a\int_0^a f(x-y) dx~dy =\int_{-a}^a (a-|z|)f(z) dz$$
for the last part (Proof), but it's not needed. You can also directly calculate the double integral. Just split it into a positive and negative part, in order to get rid of the absolute term in the exponent.  After that it's plain calculation.
EDIT2: Note that
\begin{align}
\int_0^2\int_0^2R(t-s)dt~ds&=\int_0^2\int_0^2 9+2\exp^{-|t-s|}dt~ds\\
&=36+2\int_0^2\int_0^2\exp^{-|t-s|}dt~ds\\
&=36+2\left(\int_0^2\int_s^2\exp^{-(t-s)}dt~ds+\int_0^2\int_0^s\exp^{t-s}dt~ds\right).
\end{align}
A: Hint #1: The equality
$$Var(Y)=\int_{0}^{2}Var(X(t))dt$$
is incorrect
Hint #2: If you are unfamiliar with continuous time process, try to use first a (Riemann) discretisation of the integral.
Hint #3: this question has already been asked on X validated.
