Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

When I look up the definition of 'Wiener process' at Wikipedia, it tells me:

$W(0) = 0$ and $W(t) - W(s) \sim N(0, t-s)$.

When I try to simulate this in matlab, I get different results when I define a vector $W1$ to be like:

$W1 = cumsum(dW)$, where $dW(j) \sim N(0, dt)$,

and a vector $W2$ to be like:

$W2(0) = 0$ and $W2(j) \sim N(0, dt*j)$

$W2$ apparently doesn't look like a Brownian motion, but it is still compliant with the requirements. How comes?

share|improve this question
    
I don't really understand: in the second one, the mean of an increment is: $E[W2(j) - W2(j-1)]$ with $W2(j) - W2(j-1) \sim N(0, j - (j-1)))$, so that should be zero as well? EDIT: apparently the comment I responded to is removed. –  JeffersonA Jul 28 '12 at 10:23
    
You have to sum all the increments. This is the reason why the first code works ("cumsum") and the the second one does not. –  Jon Jul 28 '12 at 10:38
    
But the idea was that in $W2$, instead of calculating the increments between $j$ and $j-1$, I used the increment between $j$ and 0 (so no additional cumsum step should be necessary) –  JeffersonA Jul 28 '12 at 10:45
    
This is not so. "cumsum" is always needed as you are describing a trajectory that, while has not derivative, is anyway continuous. The other way is just to write dW2(j)=dW2(j)+W2(j-1) and plotting dW2 but is not so efficient. You can find some code at marcofrasca.wordpress.com/2012/02/02/… and comments there. –  Jon Jul 28 '12 at 10:52

1 Answer 1

up vote 1 down vote accepted

In $W_2$ you're plotting a sample from a fresh different instance of the Wiener process for each $j$. The successive values are uncorrelated with each other, so even though things like $W_2(17)-W_2(0)$ have the distribution specified by the definition, $W_2(17)-W_2(16)$ doesn't.

share|improve this answer
    
It looks like I got something fundamentally wrong. I thought that $W_2(17) - W_2(16) \sim N(0, 17*dt) - N(0, 16*dt) \sim N(0, dt)$ (that last step assumes the $W_2(j)$'s are i.i.d.) I still don't see my error. –  JeffersonA Jul 28 '12 at 11:04
    
When the normal distributions are independent, since a normal distribution is symmetric about the mean, $N(0,17)-N(0,16)$ has the same distribution as $N(0,17)+N(0,16)$, which is $N(0,32)$ rather than $N(0,1)$. Your computation produces independent successive values of $W_2$, but the successive values in a Wiener process are not supposed to be independent. –  Henning Makholm Jul 28 '12 at 11:09
    
Now I see. Thanks! –  JeffersonA Jul 28 '12 at 11:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.