DSPRelated.com
Forums

variance of Brownian motion vector in Matlab

Started by fyrf...@yahoo.com September 18, 2008
Dear all,

I have a problem computing the variance of a Brownian motion vector and matching it to the expression in Papoulis's "Probability, Random Variable, and Stochastic Processes" for the variance of Brownian motion process.

The code (below) results in a variance (averaged over 10000 realizations) that is approximately 2*pi smaller than what I expected from the book formula var(Brownian)=sequence_length*variance(RV vector).

I would appreciate very much your pointers to what I am doing wrong. Thank you in advance!

Fyrforko

____________
runs000;
var_Wei=zeros(1, runs);
for II=1:runs
seq_length6;
RV_vector=1*randn(1, seq_length);
Wei_process=cumsum(RV_vector);
var_Wei(II)=var(Wei_process);

varWei_over_varRV_over_Length=mean(var_phase) / 1 / seq_length;