Omega
As described in [models], random variables are thin wrappers around functions which take as input a value ω::Ω We previously described Ω as a type of AbstractRNG. This is true, but the full store is a bit more complex
Ω
Ω is an abstract type which represents a sample space in probability theory.
Missing docstring for Ω. Check Documenter's build log for details.
Missing docstring for SimpleΩ. Check Documenter's build log for details.
Samplers vs Random Variables
A sampler and a random variable have many similarities but are different. To demonstrate the difference, we shall show the changes one has to make to turn a sampler into an Omega RandVar.
Create a sampler that
x1() = rand() > 0.5x1 uses Random.GLOBAL_RNG in the background. Instead, make it explicit:
julia> x2(rng::AbstractRNG) = rand(rng) > 0.5
julia> x2(Random.MersenneTwister())
falseMake a cosmetic change
julia> x2(rng::AbstractRNG) = rand(rng) > 0.5
julia> x2(Random.MersenneTwister())
false