IID — The Independent and Identically Distributed (i.i.d.) distribution

Usage

IID(n: Int, dist: Distribution<a>) → Distribution<List<a>>

Arguments

n:

Number of draws, a nonnegative integer

dist:

Distribution used for every draw

Description

IID produces a list of n independent draws from the same distribution dist. If dist has shared random parameters, the draws are independent conditional on those parameters.

Examples

~IID(10, Normal(0,1))  # A list of 10 independent Normal(0,1) draws