Skip to content

RandomFunction ​

One seeded sample path of a random process over a time grid.

RandomFunction(proc, [List, tmin, tmax])samples WienerProcess or PoissonProcess over 100100 equal steps from tmintmin to tmaxtmax (the fixed default step count, since this engine has no adaptive-resolution mechanism to match Wolfram's own).
RandomFunction(proc, [List, tmin, tmax, dt])samples over steps of size dtdt from tmintmin to tmaxtmax (the final step may be short, landing exactly on tmaxtmax).
Typed signatures
TypePackageApplies
(any, list<real>) random -> anystatisticsalways

Domain: Statistics

Details
  • Returns a PLAIN LIST of {t, x} pairs — List(List(t0, x0), List(t1, x1), ...) — NOT Wolfram's TemporalData object (an opaque, richer carrier with its own interpolation/display machinery this engine does not have). A documented divergence, not an oversight.
  • Draws through the same seeded PRNG stream RandomVariate uses (SeedRandom reseeds both together): Euler–Maruyama increments for a WienerProcess, and an independent Poisson(λ dt)Poisson(\lambda\, dt) draw per step for a PoissonProcess — both exact in distribution for their process, not merely approximate.
  • Reproducible for a fixed seed and grid, but NOT bit-identical to Wolfram's own generator — only the sampled distribution's shape is guaranteed to match, never the exact sequence of numbers (the same divergence RandomVariate documents).

Examples

Basic #

A seeded Poisson-process path — counts are nondecreasing nonnegative integers. Resets the shared PRNG stream back to the default seed afterward, same as this file's other examples.

live ↗
InLast([SeedRandom(7),RandomFunction(PoissonProcess(4),[0,2,0.5]),SeedRandom(42)])\mathrm{Last}(\bigl\lbrack\mathrm{SeedRandom}(7), \mathrm{RandomFunction}(\mathrm{PoissonProcess}(4), \bigl\lbrack0, 2, 0.5\bigr\rbrack), \mathrm{SeedRandom}(42)\bigr\rbrack)Out[[0,0],[0.5,0],[1,0],[1.5,4],[2,5]]\bigl\lbrack\bigl\lbrack0, 0\bigr\rbrack, \bigl\lbrack0.5, 0\bigr\rbrack, \bigl\lbrack1, 0\bigr\rbrack, \bigl\lbrack1.5, 4\bigr\rbrack, \bigl\lbrack2, 5\bigr\rbrack\bigr\rbrack

No dt given — 100 default equal steps from tmin to tmax, both endpoints included.

live ↗
InLast([Length(RandomFunction(WienerProcess(0,1),[0,1])),SeedRandom(42)])\mathrm{Last}(\bigl\lbrack\mathrm{Length}(\mathrm{RandomFunction}(\mathrm{WienerProcess}(0, 1), \bigl\lbrack0, 1\bigr\rbrack)), \mathrm{SeedRandom}(42)\bigr\rbrack)Out101101
Scope #

A Wiener-process path always starts at X(tmin)=0X(tmin) = 0.

live ↗
InFirst(Last([SeedRandom(3),RandomFunction(WienerProcess(0,1),[0,1,0.5]),SeedRandom(42)]))\mathrm{First}(\mathrm{Last}(\bigl\lbrack\mathrm{SeedRandom}(3), \mathrm{RandomFunction}(\mathrm{WienerProcess}(0, 1), \bigl\lbrack0, 1, 0.5\bigr\rbrack), \mathrm{SeedRandom}(42)\bigr\rbrack))Out[0,0]\bigl\lbrack0, 0\bigr\rbrack

Same seed, same grid — the same path every time (not Wolfram's own generator, only the same shape guaranteed — see RandomVariate).

live ↗
InLast([SeedRandom(7),RandomFunction(PoissonProcess(4),[0,2,0.5]),SeedRandom(42)])=Last([SeedRandom(7),RandomFunction(PoissonProcess(4),[0,2,0.5]),SeedRandom(42)])\mathrm{Last}(\bigl\lbrack\mathrm{SeedRandom}(7), \mathrm{RandomFunction}(\mathrm{PoissonProcess}(4), \bigl\lbrack0, 2, 0.5\bigr\rbrack), \mathrm{SeedRandom}(42)\bigr\rbrack)=\mathrm{Last}(\bigl\lbrack\mathrm{SeedRandom}(7), \mathrm{RandomFunction}(\mathrm{PoissonProcess}(4), \bigl\lbrack0, 2, 0.5\bigr\rbrack), \mathrm{SeedRandom}(42)\bigr\rbrack)OutTrue\mathrm{True}
About
Examples4

See also: WienerProcess, PoissonProcess, SliceDistribution, RandomVariate