Expectation : Exercises
Introduction
Example problems
Click on the problems to reveal the solution
Problem 1
Problem 2
Now from the question: $$ P\{ S(t)=s \} = S_0 \exp \left( (\mu-\frac{1}{2}\sigma^2)t +\sigma X \sqrt{t} \right) = S_0 \exp \left( (\mu-\frac{1}{2}\sigma^2)t \right)\exp\left( \sigma X \sqrt{t} \right) $$ We are calculating $\mathbb{E}[S(t)]$ at fixed $t$ hence the first exponential in the above is fixed. This is important as we only need to keep the terms that depend on the random variable, $X$, inside the integral for the expectation. When we take this integral we are going to integrate over the set of values that this random variable can take. Now the question tells us that $$ P\{X = x \} = \frac{1}{\sqrt{2\pi}} e^{-x^2/2} \qquad \qquad \textrm{Normal distribution} $$ Given all of the above we can rewrite our expectation value as: $$ \mathbb{E}[S(t)] = \int_{-\infty}^{\infty} s(t,x) P\{ X=x \} \textrm{d}x = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} s(t,x) e^{-x^2/2} \textrm{d}x $$ We can now insert $s(t,x)$ into the integral and manipulate this expression somewhat $$ \begin{aligned} \mathbb{E}[S(t)] & = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} S_0 \exp \left( (\mu-\frac{1}{2}\sigma^2)t +\sigma x \sqrt{t} \right) e^{-x^2/2} \textrm{d}x \\ & = \frac{ S_0 \exp \left( (\mu-\frac{1}{2}\sigma^2)t \right) }{\sqrt{2 \pi}} \int_{-\infty}^\infty \exp\left( \sigma x \sqrt{t} - \frac{x^2}{2} \right) \textrm{d}x \end{aligned} $$ For the next step of the solution we have to note that : $\sigma x \sqrt{t} - \frac{x^2}{2} = - \frac{1}{2}(x - \sigma \sqrt{t})^2 + \frac{1}{2} \sigma^2 t$. We can get this result by competing the square, which is an algebraic trick that it is useful to know about. In this question we were given this information in the question. $$ \begin{aligned} \mathbb{E}[S(t)] & = \frac{ S_0 \exp \left( (\mu-\frac{1}{2}\sigma^2)t \right) }{\sqrt{2 \pi}} \int_{-\infty}^\infty \exp\left( \frac{1}{2}(x - \sigma \sqrt{t})^2 + \frac{1}{2} \sigma^2 t \right) \textrm{d}x \\ & = \frac{ S_0 \exp \left( t(\mu-\frac{1}{2}\sigma^2) + \frac{1}{2} \sigma^2 t \right)}{\sqrt{2 \pi}} \int_{-\infty}^\infty \exp\left( \frac{1}{2}(x - \sigma \sqrt{t})^2 \right) \textrm{d}x \\ & = \frac{S_0 \exp\left( \mu t \right) }{\sqrt{2\pi}} \int_{-\infty}^\infty \exp\left( \frac{1}{2}(x - \sigma \sqrt{t})^2 \right) \textrm{d}x \end{aligned} $$ Now we finish the integration by making the substitution $y = x - \sigma \sqrt{t} \quad \rightarrow \quad \frac{\textrm{d}y}{\textrm{d}x } = 1$ Remember when we do an integration by substitution we have to change the limits, the integrand and the infinitessimal (the $\textrm{d}x$ part). $$ \mathbb{E}[S(t)] = \frac{S_0 \exp\left( \mu t \right) }{\sqrt{2\pi}} \int_{-\infty}^\infty e^{-y^2/2} \textrm{d}y = \frac{S_0 \exp\left( \mu t \right) }{\sqrt{2\pi}} \sqrt{2\pi} = S_0 \exp\left( \mu t \right) $$ It is worth noting something about this problem and its final solution. This problem is typical of the sort of thing that appears in financial maths. As discussed in the question this particular random variable appears in the context of modelling the value/price of an asset. Now the value of an asset changes for two reasons (1) the value increases geometrically because of compound interest and (2) the value changes randomly because of the various random factors that affect the assets price. The model has therefore been constructed so that on average it increases geometrically. There might, however, be some random fluctuations around this average. As such many of the terms that appear in the original random variable: $$ S(t)=S_0 \exp \left( (\mu-\frac{1}{2}\sigma^2)t +\sigma X \sqrt{t} \right) $$ (particularly the $-\frac{1}{2}\sigma^2 t$ that appears in the exponential) are there so that the expectation comes out as: $$ \mathbb{E}[S(t)] = S_0 \exp\left( \mu t \right) $$ I mention all this stuff because it is interesting and because we often don't get students to think about how we might (when modelling) set up ``problems" so that the solution comes out in a particular way.