Doug's MATLAB Video Tutorials

Visualizing random walk data (1/3)

In this video we start with some data from a random process. Each piece of data represents a small time period and change in value. Think of it as something like a stock ticker, very noisy with a larger trend upward. From the patterns in this random data we can visualize it and try to predict what that phenomenon might do in the future. We will get a range of realistic futures and a sense of what the average looks like.

Polynomial fitting is problematic, so instead bootstraping of data will be tried. This week show the results, and the next two weeks show how it was done.

2 Responses to “Visualizing random walk data (1/3)”

1. Paul replied on :

Excellent! I’ve been looking for a good source on Random Walk functions for a while. Finding a good realistic algorithm that can exercise multiple frequency modes has so far alluded me. My specific application is instrument measurement, noise and drift. I look forward to your follow ups. Once I have time to digest, I may have further questions…

2. Doug replied on :

Paul,

I am not sure what you mean by multiple frequency modes. Since that section of the video will not be out for two weeks, I can tell you what I did here.

I considered modeling the distribution, and the cross correlation of the deltaX and deltaY. This seemed very difficult and prone to error with the smallish dataset. Instead, I went for a simplistic bootstraping technique. There were N samples in the original, and I wanted to run out for M more steps. I simply drew M samples from the original N samples (with replacement). This is easy to do with the randi command to generate a random integer.

Would that work in your cases?

 Name (required) E-mail (required, will not be published) Website (optional) Spam protection (required): What is 5 + 6 ?

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>


If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).

Doug Hull is a proud MathWorker who is on a mission to help you with MATLAB.

These postings are the author's and don't necessarily represent the opinions of MathWorks.