Some usefull definitions for stochastic processes

Bayes’s Rule

    \begin{align*} P[A_j|B] = \frac{P[B|A_j]P[A_j]}{P[B]}\\ \\ P[B]=P[B|A_1]P[A_1]+ \ldots  +  P[B|A_n]P[A_n]\\ \\ f_y (y| X = x) = \frac{f_x (x | Y = y) f_y (y)  }{f_x (x)} \\ \text{for random variable} \end{align*}

Mean – Variance and r-moment about the mean

    \begin{align*} \mu  = \int_{-\infty}^{+\infty} x f(x) dx\\ \sigma^2 = \int_{-\infty}^{+\infty} (x - \mu)^2 f(x) dx\\ \mu_r  = \int_{-\infty}^{+\infty} (x - \mu)^r f(x) dx \\ \\ \mu_{kr} = E\{(X - \mu_x)^k (Y - \mu_y)^r \} = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x - \mu_x)^k (y - \mu_y)^r f(x,y) dx dy \\ \\ \mu^\prime _ {kr}= E\{ X^k Y^r\} =   \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} x ^k y^r f(x,y) dx dy \\ \end{align*}

Laplace transform of pdf

    \begin{align*} f^L_s = \int_0 ^{\infty} e^{-sx} f(x) dx \end{align*}

Information content

    \begin{align*} I = - \int_{-\infty}^{\infty} f(x) \log_2(f(x)) dx \end{align*}

Conditional distribution

    \begin{align*} F_x (x|M) = P\{X \leq x | M \}  = \frac{P\{ X \leq x , M  \}}{P\{  M \}} \end{align*}

Characteristic function

    \begin{align*} \Phi (\omega) = E\{ e^{j\omega X}  \} = \int_{-\infty}^{\infty}   e^{j \omega x} f(x) dx \\  \text{for continuous r.v.} \\ \Phi (\omega) = \sum_k e^{j \omega x_k}  P\{ X = x_k \} \ \ \ \text{for discrete r.v} \\ \Phi(0) = 1, |\Phi (\omega)| < 1 \end{align*}

Independent random variables

note:

    \begin{align*} F_{xy} (x, y) = F_x (x) F_y (y) \\ f_{xy} (x,y) = f(x) f(y) \\ f_y (y|x) = f_y (y) \\ f_x (x|y) = f_x (x) \\  \\ \\ E\{g(X) h(X)\} = E\{ g(X)\} E\{h(X)\}  \\ \text{(If X, Y are independent, their functions are independent too)} \end{align*}

Expected value

    \begin{align*} E\{ X \} = \int_{-\infty} ^{\infty} x f(x) dx \ \ \ \ \text{continuous r.v.} \\ \\ E\{ X \} = \sum_n x_n P \{  X = x_n\} = \sum_n x_n p_n \ \ \ \text{discrete r.v. } \\ \\ E\{ Y = g(X) \} = \int_{-\infty} ^{\infty} y f_Y (y) dy  = \int_{-\infty} ^{\infty} g(x) f_X (x) dx \ \ \ \ \\\text{for function g(X)} \\ \\ E\{ g(X) | Y = y \} = \int_{-\infty} ^{\infty}  g(x) f_x (x| Y = y) dx \\ =  \frac{\int_{-\infty}^\infty g(x) f_{xy} (x,y) dx}{ \int_{-\infty}^\infty f_{xy} (x,y) dy} \ \ \ \text{conditional expected value} \\ \ \\ \\ E\{ g(X,Y |M)\} = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} g(x,y) f(x,y|M) dx dy \end{align*}

Jointly Normal Distribution density function

    \begin{align*} f(x,y) = \frac{1}{2 \pi \sigma_1 \sigma_2 \sqrt{1-r^2}} \text{exp} \left[-\frac{1}{2(1-r^2)} \left[ \frac{(x-\mu_1)^2}{\sigma_1^2} - \frac{2r(x - \mu_1)(y - \mu_2)}{\sigma_1 \sigma_2}  + \frac{(y-\mu_2)^2}{\sigma_2^2}  \right] \right]  \\ \ \\ \\ |r| < 1 \  \ \ \ \text{correlation coefficient} \end{align*}

Orthogonal r.v.’s

    \begin{align*} E\{XY\} = 0 \end{align*}

Correlation coefficient

    \begin{align*} r = \frac{E\{ (X - \mu_x) (Y - \mu_y)\}}{ \sqrt{E\{(X - \mu_x)^2\} E\{(Y - \mu_y)^2\} }}   = \frac{\mu_{11} ^\prime }{\sigma_x \sigma_y} \end{align*}

Normal random variables

    \begin{align*} E\{ (X - \mu_x) (Y - \mu_y)\} = r_{xy} \sigma_x \sigma_y\\ \\ \text{When X, Y are jointly normal with zero mean}\\ E\{ (aX + bY)^2 \} = a^2 \sigma_x ^2 + b^2 \sigma_y ^2 + 2ab r_{xy} \sigma_x \sigma_y  \\  \\ E\{ (aX + bY) (cX + dY)\} = ac \sigma_x ^2 + bd \sigma_y ^2 + (ad +bc) r_{xy} \sigma_x \sigma_y \end{align*}

Conditional densities

    \begin{align*} f(x_1, ..., x_k | x_{k+1} , ..., x_n) = \frac{ f(x_1,...,x_n)}{ f(x_{k+1}, ... ,x_n)} \end{align*}

Chain rule for sequence of random variables

    \begin{align*} f(x_1,...,x_n) = f(x_n|,x_{n-1},...,x_1)...f(x_2|x_1)f(x_1) \end{align*}

Sample mean

Note that the variance of sample mean is n-time smaller than the one of a single sample.

    \begin{align*} &\overline X = (X_1 + \cdots + X_n) \slash n \\ \\ &\text{Density function of the sample mean}\\ &\text{(zero-mean, Gaussian case)}\\ &f_{\overline x}(x) = \frac{1}{\sqrt{2\pi \sigma^2 \slash n}} e^{-nx^2 \slash 2 \sigma^2} \\ \end{align*}

Sample variance

note:Sample variance

    \begin{align*} \overline S = [(X_1 - \overline X)^2  + \cdots + (X_n - \overline X)^2] \slash n = \sum_{i=1}^n \frac{X_i ^2}{n} - \overline X^2 \end{align*}

Random process X(t) and basis

note:Random process X(t)

    \begin{align*} &\text{Random process}\\ &X(t) = X(t,\zeta)\\ \\ &\text{First order distribution function}\\ &F(x;t) = P\{ X(t) \le x \}\\ \\ &\text{n-order distribution function}\\ &F(x_1,\cdots,x_n; t_1,\cdots,t_n) = P\{ X(t_1) \le x_1, \cdots  ,   X(t_n) \le x_n\} \\ \\ &\text{ n-order Density function or pdf}\\ &f(x_1,\cdots,x_n; t_1,\cdots, t_n) = \frac{ \partial F(x_1,\cdots, x_n ; t_1,\cdots,t_n)}{ \partial x_1, \cdots, \partial x_n}\\ \\ &\text{Autocorrelation}\\ &R(t_1,t_2) = E\{ X(t_1) X(t_2)\} = \int_{-\infty}^{\infty} x_1 x_2 f(x_1,x_2;t_1,t_2)dx_1 dx_2\\ \\ &\text{Autocovariance} \\ &C(t_1,t_2) = E\{[X(t_1) - \mu(t_1) ] [X(t_2) - \mu(t_2)]\} = R(t_1,t_2) - \mu(t_1) \mu(t_2) \end{align*}

Simulating the Schwartz type 1 stochastic process

The Schwartz type 1 model is a log price Ornstein-Uhlenbeck stochastic process. Monte Carlo simulation of the model can be done using the equation above. The above equation is an exact solution of the model, this means that the distribution of the simulation is exact, and that time steps can be any size.

    \begin{align*} \ln S_t \sim&\; e^{-\kappa t}\ln S_0+\left(1-e^{-\kappa t}\right)\left(\mu-\frac{\sigma^2}{2\kappa}\right)\\ &+\sigma \sqrt{\frac{1-e^{-2\kappa t}}{2\kappa}}N_{0,1} \end{align*}

Calibrating the Schwartz type 1 model

The Schwartz type 1 model is a log price Ornstein-Uhlenbeck stochastic process. The calibration can be done through a regression of the logprices as described in the above equation.

    \begin{align*} &\text{the Schwartz type 1 model is defined as:}\\ &dS_t =\; \kappa (\mu-\ln S_t) S_t dt + \sigma S_tdW \\ \\ &\text{Calibration can be done through a linear }\\ &\text{regression which recover a,b,c from:}\\ &\ln S_{t+\delta t}=a\ln S_t+b+cN_{0,1}\\ \\ &\text{The model parameters are then given by:}\\ &\kappa = -\frac{\ln a}{\delta t}\\ &\sigma = c \sqrt{\frac{2\kappa}{1-e^{-2\kappa \delta t}}}\\ & \mu = \frac{b}{1-e^{-\kappa \delta}}+\frac{\sigma^2}{2\kappa} \end{align*}

Complex process

note:

    \begin{align*} &\text{Complex process:}\\ &Z(t) = U(t) + jV(t)\\ &\text{Autocorrelation of complex process Z:}\\ &R_z(t_1,t_2) = E\{ Z(t_1) Z^*(t_2)\}\\ &\text{Crosscorrelation of complex processes X and Y:}\\ &R_{xy}(t_1,t_2) = E\{ X(t_1) Y^*(t_2)\} \end{align*}

(r,s)-Fold Trimmed Mean Filters

Short the samples in the window and omit r first samples and s last samples

    \begin{align*} \text{TrMean}(\textbf x = \{x(1), x(2), \ldots, x(N)\} ; r,s) = \frac{1}{N-r-s} \sum_{i = r+1}^{N-s} x(i) \end{align*}

This entry was posted in Equations. Bookmark the permalink. Trackbacks are closed, but you can post a comment.

2 Comments

  1. Igor Zomb
    Posted January 11, 2012 at 7:19 pm | Permalink

    I’ve always been a big fan of your site…

    In this article, the very first formula for mean does not seem to be correct — integrand should just be x*f(x) instead of (x – mu)*f(x).

    As written, this integral of single power of x about the mean is always zero :)

    • Thijs van den Berg
      Posted January 11, 2012 at 7:29 pm | Permalink

      Hee Igor,

      Yes, you’re right! I Fixed it right away, ..thanks for mentioning this! It’s much appreciated.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">