Random
A random element of a domain: uniform over a finite collection or an interval, or drawn from a distribution; with a count or shape, that many draws.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
RandomReal✓Random()A real in .Random(domain, shape)One draw from a finite collection, uniform by index, or an interval; with a count, that many draws, and with a list of dimensions, an array of that shape. Every draw comes from the engine's one seeded stream, restarted by SeedRandom.Random(dist, shape)Draws from a distribution, by its own sampler.Typed signatures
| Type | Package | Applies |
|---|---|---|
(() random -> real) & ((collection<any> | set<real>) random -> any) & ((collection<any> | set<real>, integer<0..> | list<integer<0..>>) random -> list) | combinatoricsreplaces compute-engine | always |
(() random -> real) & ((collection<any> | set<real>) random -> any) & ((collection<any> | set<real>, integer<0..> | list<integer<0..>>) random -> list) & ((distribution, (integer<0..> | list<integer<0..>>)?) random -> any) | statisticsreplaces combinatorics | always |
((collection<any> | set<real>)?) random -> any | compute-engine | always |
Examples
Basic #
one permutation of , drawn uniformly by index from the collection; seeded, so it is the same every time
live ↗InOut
Properties & Relations #
About
| Examples | 3 |
|---|---|
| Checked against | Wolfram Language 2 agreeCombinatorica 1 agree |
| Crosswalk | Wolfram Language |
See also: SeedRandom, RandomInteger, RandomVariate