# Calculate the expection and variance using Ito's Lemma

Let $x_k$ be a Ito process defined by the equation $dx_t=-ax_tdt+\sigma dB_t$, where a is a real constant, $\sigma$ is a positive real constant and $B_t$ is a standard Brownian motion. Let $x_t=x_0$ at $t=0$.

By applying Ito's Lemma on $y_t=f(t)x_t$, where $f(t)$ is a deterministic function of $t$, show that,

i) the expectation value of $x_t$ is $x_0e^{-at}$,

ii) the variance of $x_t$ is $\frac{\sigma^2}{2a}(1-e^{-2at})$.

I tried to substitute $y_t=f(t)x_t$ into the Ito's Lemma, gives $$dy=\left(-a y_t + \frac{\partial f(t)}{\partial t}x_t\right) dt + \sigma f(t) dB_t$$ What should I do next?

• What is "dz" in your last equation ? Commented Oct 23, 2016 at 14:31
• sorry, it is typo Commented Oct 23, 2016 at 14:34

You have $$y_t=f(0)x_0+\int_0^t (f'(s)x_s-ay_s)\,ds+\sigma\int_0^t f(s)\,dB_s.$$ Take $f(t)=e^{at}$. In this way, you have $f'(s)x_s-ay_s=0$ and therefore $$e^{at}x_t=x_0+\sigma\int_0^t e^{as}\,dB_s\Rightarrow x_t=e^{-at}\left(x_0+\sigma\int_0^t e^{as}\,dB_s\right).$$ When you have a deterministic function $f\in L^2[0,t]$, one has $\int_0^t f(s)\,dB_s\sim N(0,\Vert f\Vert_{L^2[0,t]}^2)$. Hence, $$x_t\sim N\left(e^{-at}x_0,\,e^{-2at}\sigma^2\int_0^t e^{2as}\,ds=\frac{1-e^{-2at}}{2a}\sigma^2\right).$$

• Thank you for your answer, one more question: is there any reason that we have to set $f'(s)x_s-ay_s=0$? Commented Oct 23, 2016 at 19:02
• @StephenGe As I knew the distribution of $\int_0^tf(s)\,dB_s$, I thought of getting rid of the $ds$ part. However, there is a general method to solve the equation you asked for (more concretely, to solve $dx_t=(c(t)+e(t)x_t)\,dt+\Sigma(t)\,dB_t$), which a generalization of the variation of constants method for ordinary differential equation. Take the $dt$ part of your equation: $dx_t=-ax_t\,dt$, which has as general solution $x_t=Ce^{-at}$, $C\in\mathbb{R}$. Now, we are going to find a solution for you stochastic equation of the form $x_t=C_te^{-at}$, where $C_t$ is a process. Commented Oct 23, 2016 at 19:48
• Continuation: Notice that $C_t$ is your $y_t$! Take your $x_t=C_te^{-at}$ and differentiate: $dx_t=e^{-at}\,dC_t-ax_t\,dt$, and since we want $x_t$ to be a solution, impose $dx_t=-ax_t\,dt+\sigma\,dB_t$, so $e^{-at}\,dC_t=\sigma\,dB_t$, that is, $C_t=k+\sigma\int_0^t e^{as}\,dB_s$. The solution: $$x_t=e^{-at}\left(k+\sigma\int_0^t e^{as}\,dB_s\right).$$ Put $t=0$ to obtain $k=x_0$. So my chosen $f$ comes from the solution of the deterministic ODE $dx_t=-ax_t\,dt$. Commented Oct 23, 2016 at 19:53
• @user39756 Do you help me to understand your first line answer? Commented Oct 24, 2016 at 1:08
• @Khosrotash Of course! Do you refer to $$y_t=f(0)x_0+\int_0^t (f'(s)x_s-a y_s)\,ds+\sigma\int_0^tf(s)\,dB_s\;?$$ That's the integral form of the differential expression that Stephen Ge wrote: $$dy_t=(f'(t)x_t-ay_t)\,dt+\sigma f(t)\,dB_t.$$ In a more general setting, if you have a process $y_t$, the expression $$y_t=y_0+\int_0^t v(s)\,ds+\int_0^t u_s\,dB_s\quad (1)$$ is equivalent to $$dy_t=v(t)\,dt+u_t\,dB_t. \quad (2)$$ Equation (1) makes sense mathematically: $\int_0^t v(s)\,ds$ is the Lebesgue integral of an adapted process $v_t$, and... Commented Oct 24, 2016 at 7:12

$$y_t=f(t).x_t \to g(t,x)=f(t).x \\ \frac{\partial g}{\partial t}=f'(t).x\\\frac{\partial g}{\partial x}=f(t).1\\\frac{\partial^2 g}{\partial x^2}=0$$ I don't find any clue ... but by other observation I can solve it ...let me say to you $$\times e^{at} \to e^{at}dx_t=-ae^{at}x_tdt+\sigma e^{at} dB_t\\ e^{at}dx_t+ae^{at}x_tdt=\sigma e^{at} dB_t\\d(e^{at}x_t)=\sigma ae^{at} dB_t\\$$ now apply integral
$$t \in [0,t] \to \int d(e^{as}x_s)=\int \sigma e^{at} dB_s\\e^{at}x_t-e^{0}x_0=\sigma \int_{0}^{t} e^{at} dB_s \\ \to e^{at}x_t=x_0+\sigma \int_{0}^{t} e^{at} dB_s \to \div e^{at} \\x_t=x_0e^{-at}+\sigma e^{-at}\int_{0}^{t} e^{at} dB_s$$ now

\begin{align} & E[{{x}_{t}}]=E[{{x}_{0}}{{e}^{-at}}+\sigma {{e}^{-at}}\int_{0}^{t}{\,{{e}^{as}}d{{B}_{s}}]} \\ & E[{{x}_{t}}]=E[{{x}_{0}}{{e}^{-at}}]+\sigma E[{{e}^{-at}}\int_{0}^{t}{\,{{e}^{as}}d{{B}_{s}}]} \\ \end{align} $\color{red} {E[\int_{0}^{t}{\,{{e}^{b(s-t)}}d{{B}_{s}}]}=0}$ \begin{align} & E[{{x}_{t}}]=E[{{x}_{0}}{{e}^{-at}}]+\sigma .(0) \\ & E[{{x}_{t}}]=E[{{x}_{0}}].{{e}^{-at}} \\ \end{align}

$Var\left[ {{X}_{t}} \right]=E\left[ X_{t}^{2} \right]-{{E}^{2}}\left[ {{X}_{t}} \right]$ \begin{align} & E\left[ X_{t}^{2} \right]=E[({{x}_{0}}{{e}^{-at}}+\sigma {{e}^{-at}}\int_{0}^{t}{\,{{e}^{as}}d{{B}_{s}}{{)}^{2}}]} \\ & =E[{{({{x}_{0}}{{e}^{-at}})}^{2}}+(\sigma {{e}^{-bt}}\int_{0}^{t}{\,{{e}^{as}}d{{B}_{s}}{{)}^{2}}+2({{x}_{0}}{{e}^{-at}})(\sigma {{e}^{-at}}\int_{0}^{t}{\,{{e}^{as}}d{{B}_{s}}{{)}^{{}}}]}} \\ \end{align}

\begin{align} & {{e}^{-2at}}E\left[ X_{0}^{2} \right]+2\sigma {{e}^{-at}}E\left[ {{X}_{0}} \right]E\left[ \int_{\,0}^{\,t}{{{e}^{-a(t-s)}}\,d{{B}_{s}}} \right]+{{\sigma }^{2}}E\left[ {{\left( \int_{\,0}^{\,t}{{{e}^{-a(t-s)}}\,d{{B}_{s}}} \right)}^{2}} \right] \\ & ={{e}^{-2at}}E\left[ X_{0}^{2} \right]+{{\sigma }^{2}}E\left[ \int_{\,0}^{\,t}{{{e}^{-2a(t-s)}}\,ds} \right] \\ \end{align} $={{e}^{-2at}}E\left[ X_{0}^{2} \right]+{{\sigma }^{2}}\frac{1-{{e}^{-2at}}}{2a}$ $\to \\$ VAR $={{e}^{-2at}}Var\left[ {{X}_{0}} \right]+\frac{{{\sigma }^{2}}}{2a}\left( 1-{{e}^{-2at}} \right)$