Statistical distance of the integer-box samplers #
sampleIntBox B width factors through the residue sampler
ProbComp.sampleModNat width (2 * B + 1), so closeTo_uniform_sampleModNat bounds its
distance from the exact uniform law on [-B, B] by (2 * B + 1) / 2 ^ width. The
m-coordinate samplers lose at most this much per coordinate. The dyadic centered sampler is
exact.
Main results #
Cslib.Probability.closeTo_uniformBox1D_sampleIntBox: the 1D bound(2 * B + 1) / 2 ^ width.Cslib.Probability.closeTo_uniform_intBox_sampleIntBoxVec,Cslib.Probability.closeTo_uniform_intBox_sampleIntBoxList: the boundm * ((2 * B + 1) / 2 ^ width)onintBox (Fin m) B, for vectors and for lists.Cslib.Probability.closeTo_uniformDyadicIntBox_sampleDyadicIntBox: distance0.
1D box sampler statistical distance. sampleIntBox B width is within
(2 * B + 1) / 2 ^ width of the exact uniform distribution uniformBox1D B on [-B, B].
Multi-coordinate box sampler statistical distance (vector form). sampleIntBoxVec B m width
is within m * ((2 * B + 1) / 2 ^ width) of the exact uniform distribution on
intBox (Fin m) B = [-B, B]^m.
Multi-coordinate box sampler statistical distance (list form). sampleIntBoxList B m width
is within m * ((2 * B + 1) / 2 ^ width) of the encoded uniform distribution on
intBox (Fin m) B.
sampleDyadicIntBox width has 0 statistical distance from uniformDyadicIntBox width.