The collision times for a particle moving between two barriers are distributed exponentially, with a mean of three microseconds. If the particle starts at the right-hand barrier () and moves toward the left-hand barrier (), then simulate the collision process for 100 microseconds.
Wolfram Language code: collisionProcess = TelegraphProcess[1 / 3];Wolfram Language code: sample = RandomFunction[collisionProcess, {0, 100}];Wolfram Language code: ListLinePlot[sample["Path"], InterpolationOrder -> 0, Filling -> Axis]
Variance for the slice distribution is 1:
Wolfram Language code: Variance[collisionProcess[100]]
Compare with the variance of a sample:
Wolfram Language code: Variance[RandomVariate[collisionProcess[100], 10 ^ 4]]//N