# Confusion regarding random walk model

I was referring to this book where it is given that

If we assume equally spaced nodes $i$ for $i=1,...,n$.

The first order random walk is constructed using independent increments

$$\Delta{x_i} \sim N(0,k^{-1}), \ \ \ \ \ \ i=1,...,n-1$$

The density for $${\bf{x}}=(x_1,x_2...x_n)'$$ is derived from the $n-1$ increments as

$$\pi({\bf{x}}|k) = k^{(n-1)/2} \cdot \exp \left(-k/2 \cdot \sum_{i=1}^{n-1}\Delta{(x_i)^2}\right)$$

I didn't get how the density of $x$ was represented in the form of increments. I mean how we can use increments to show the density how are they related or can be used in the density of $x$.

• What are $x$ and $\mathbf{x}$ and how are they related to $\Delta x_i$? It's natural to suppose that $x=\Delta x_1 + \Delta x_2 + \cdots + \Delta x_{n-1}$, but would $\mathbf{x}$ then be the vector $(\Delta x_1, \ldots, \Delta x_{n-1})$? These distinctions are important; they can explain what the derived density is trying to show and how to justify it. – whuber Jul 5 '12 at 2:20
• I have updated what x is. I just don't understand how density of x is given by the increments where xvector=(x1,x2...xn)'. I have also updated what x is. Actually, I got the above derivation from a book called Gaussian Markov Random Field Theory and Applications by Rue and Held. As you said for the above derivation to justify xvector should be equal to (deltax{1},...deltax{n-1}) but I don't think it is the case since xvector=(x1,...xn) – user34790 Jul 5 '12 at 10:35

Let's take this in short steps.

"$\Delta{x_i} \sim N(0,k^{-1})$" means that (up to a constant of proportionality which we can worry about at the end) the distribution function (PDF) of $\Delta{x_i}$ equals $k^{1/2}\exp{(-(k/2)\Delta{x_i}^2)}$. This is (one) definition of what it means to have a normal distribution with mean $0$ and variance $1/k$.

"Independent" implies the joint ($n-1$-variate) distribution function of all the $\Delta{x_i} = x_{i+1}-x_{i}$ is the product of the individual distribution functions. Exploit a basic property of the exponential (products of its values correspond to sums of its arguments) to write this joint density as

$$k^{1/2}\exp{(-(k/2)\Delta{x_1}^2)}\cdots k^{1/2}\exp{(-(k/2)\Delta{x_{n-1}}^2)}=k^{(n-1)/2}\exp{\left(-k/2(\Delta{x_1}^2+\cdots+\Delta{x_{n-1}}^2)\right)},$$

once more ignoring the constant.

Finally, because each $x_i$ is obtained by starting with $x_1$ and adding all previous increments,

$$x_i = x_1 + \Delta{x_1} + \Delta{x_2} + \cdots + \Delta{x_{i-1}},$$

we can rewrite the preceding sum of squares $\Delta{x_1}^2+\cdots+\Delta{x_{n-1}}^2$ in terms of the $x_i$ to get $x_1^2+2(x_2^2 + \cdots + x_{n-1}^2)+x_n^2 - 2(x_1x_2 + x_2x_3 + \cdots + x_{n-1}x_n)$. Plug this into the preceding formula to obtain the joint distribution of the $x_i$.

One usually doesn't care much about the details of this resulting (somewhat messy) expression; its form is what matters. Apart from constant multipliers, which will be determined by the integrate-to-unity criterion satisfied by any probability distribution, it is the exponential of a quadratic form $Q$. This means the $x_i$ have a multivariate normal distribution. You can read off their variances and covariances by inverting $Q$.

• That, plus a trivial Jacobian. – Did Jul 18 '12 at 18:19

Since each $Δx_i \sim N(0,1/k)$ (assuming $1/k$ is the standard deviation) then the walk travels $x$ equal to the sum of the $n-1$ independent increments and has a normal distribution $N(0,\sqrt{(n-1)}/k)$ because the variance is the sum of the variances of the individual variances and there are $n-1$ each with variance $1/k^2$. Now $x=∑Δx_i$. So the formula should represent that density. It is not quite written correctly the way you have it. It should be $$\frac{1}{\sqrt{2π(n-1)}/k} \exp \left(-\frac{(∑Δx_i -0)^2}{2(n-1)/k^2}\right)$$

• I didn't get how come x=sum(del_xi). If I have four locations x1,x2,x3,x4, sum(del_xi) = x4-x1. But the density of x should be something like density(x1,x2,x3,x4) or density(xvector) isn't it? – user34790 Jul 4 '12 at 22:25
• @user34790 Δxi= xi-xi-1 They are the independent increments and they are summed to get the total walk. – Michael R. Chernick Jul 4 '12 at 23:18
• yeah but the density of x. x is a vector (x1,x2..xn). So how come its density is equal to density of the sum of the increments. I just didn't get this part – user34790 Jul 5 '12 at 4:50
• I wrote down the density of xt. So maybe that explains why mine looked different. But each xi can be represented as the some of some of the Δxi. So each xi can be represented as sums of the Δxis and so then the joint density can too. Apparently k is the variance in the formula and power of 2π is missing. – Michael R. Chernick Jul 5 '12 at 10:21