### Counting Processes and Martingales

I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Poisson process is an example of Counting Process. If you do nothing other than click the "Start" button below, then the plot below shows a standard Poisson process N(t) (black) and its cumulative intensity t (red). Remember we picked initial lambda = 1 here. In other words, the intensity (speed) is 1.

The more interesting thing about this applet is that it allows you to change the speed (=intensity) as time goes by.

A general counting process is obtained by manipulating the speed -- this include changing the speed accoring to a fixed rule, or according to the history of the process, or according to the results from some other random variables, etc. In fact, you are allowed to do anything with the faster/slower button.

Claim: any counting process can be obtained by a time changed Poisson process.

Just as in the Poisson process case, N(t) - t is a martingale, the time warped Poisson process also gives rise to a martingale: M(t) = N(g(t)) - g(t).

In the plot, this means the difference between the black (=N(g(t))) and the red (=g(t)) is a martingale.

#### How to use this applet:

Click on "Start" to begin. Click on "Faster" to increase speed. A speed of 2 means you are watching the process in "2x fast forward" mode, and the waiting time for the next jump would be half as long. The red line records the total time passed. Click on "Slower" to decrease the speed. However, the minimum speed is zero. When speed is 0, the original Poisson process is paused. (If negative speed were allowed, then one can `Back from the Future' and tell what is going to happen exactly and the process is no longer random.)

The Java applet should have appeared here!
Since it has not, this means (a) your browser is not capable of viewing Java applets (In which case you should consider downloading a new browser) or (b) you need to get a "virtual java machine" or "Java run time enviroment".

The red line in the plot is the cumulative intensity. This is the intuition of how it is computed: If the speed is 2, means the average waiting time for jumps is 1/2 (instead of 1), and jump size is still one, then you need a slope of 2 to catch the counting process N(t).

A related question I often been asked: Isn't the empirical distribution a counting process? (aside from the fact that the jump size is all 1/n). The answer is YES but a very special kind. The picularity is that the empirical distribution must have \hat F( infty ) = 1 which is non-random, and the interarrival times must satisfy certain requirement.

To be an empirical distribution, a counting process needs to satisfy (1) the intensity (speed) must be tuned according to R(t) h(t) , where R(t) is the number of jumps left, and h(t) is the hazard of a random variable. (this is for n iid rv case.)

But the compensator is not F(t). You do not get the martingale representation for the empirical process sqrt n [ \hat F(t) - F(t)].