Skip to contents

The stochastic discovery urn starts at counts \((r_0, b_0)\), adds \(a\) to the region drawn, and draws region A with probability equal to its share. The share is a martingale (Research.P4.Envelope.mean_const), one step adds \(s(1-s)(a/(T+a))^2 \le (a/(T+a))^2/4\) to its second moment (step_var), and the sum telescopes, so the variance of the share after any number of steps is at most \(a/(4(r_0+b_0))\) (var_le) and the share leaves a band of half-width \(t\) about its start with probability at most \(a/(4(r_0+b_0)t^2)\) (chebyshev). The exact law after n steps is computed by the urn's recursion for comparison.

Usage

morie_feedback_loop_envelope(r0, b0, a = 1, n = 100L, t = 0.25)

Arguments

r0, b0

Initial counts of the two regions (positive).

a

Reinforcement per discovery (positive).

n

Horizon at which the exact law is evaluated.

t

Half-width of the band about the initial share.

Value

A list with share0, variance_bound (\(a/(4(r_0+b_0))\)), chebyshev_bound (the band-exit probability bound at t), variance_n (the exact variance of the share after n steps), mean_n (its exact mean, equal to share0), exit_n (the exact band-exit probability) and law (the exact law of the number of A-draws).

Examples

morie_feedback_loop_envelope(1, 1, 1, n = 50, t = 0.25)[c("variance_bound", "variance_n")]
#> $variance_bound
#> [1] 0.125
#> 
#> $variance_n
#> [1] 0.08012821
#>