1
$\begingroup$

I am using the following code snippet to generate Compound Poisson process random numbers:

P = CompoundPoissonProcess[1, NormalDistribution[0, 1]];
dataP = RandomFunction[P, {1, 10}]

I am using Mathematica 10 and on different runs of the code I get variously 10 points or 9 points or 13 points...

Is this normal?

How can I force Mathematica to get $n$ data points...

$\endgroup$
  • 3
    $\begingroup$ You get as many points as necessary to cover time values from 1 to 10. In the case of Poisson processes, number of events per unit of time varies. $\endgroup$ – kirma Oct 7 '14 at 17:35
3
$\begingroup$

Use an explicit time step in RandomFunction to get 10 points in resulting TemporalData:

P = CompoundPoissonProcess[1, NormalDistribution[0, 1]];
dataP = RandomFunction[P, {1, 10, 1}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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