0
$\begingroup$

Let \begin{align} x_t &\sim \mathrm{Beta}(\alpha_t,\beta_t) \\ \alpha_{t+1} &= \alpha_t + x_t \\ \beta_{t+1} &= \beta_t + 1 - x_t \\ \end{align}

My questions are the following:

  1. What is the distribution of $x_t$ in terms of $\alpha_0,\beta_0$? Does it have a closed form?
  2. What is the distribution of $x_\infty$ in terms of $\alpha_0, \beta_0$?

The graph below shows an approximation of the distribution for $\alpha_0 = 2, \beta_0 = 4$ after a large $t$.

enter image description here

The true distribution at any given $t$ is a mixture of at most $t$ beta distributions. Here is the Python code I used to generate the graph:

import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import beta
from itertools import count

a0 = 2
b0 = 3

trials = 10**4
at = np.zeros(trials) + a0
bt = np.zeros(trials) + b0

μs = np.linspace(0, 1, 10**3)

plt.ion()
axes = plt.subplots()[1]
for t in count():
    if t % 100 == 0:
        axes.clear()
        axes.plot(μs, beta(a0, b0).pdf(μs), linewidth=1, label='$p(x_0)$', color='C0')
        axes.axvline(x=beta(a0, b0).mean(), linewidth=1, linestyle='--', label='$E(x_0)$', color='C0')
        axes.plot(μs, beta(at, bt).pdf(μs[:, None]).mean(-1), linewidth=1, label='$p(x_t)$', color='C1')
        axes.axvline(x=beta(at, bt).mean().mean(-1), linewidth=1, linestyle='--', label='$E(x_t)$', color='C1')
        axes.set_title('{} trials, t = {}'.format(trials, t))
        
        scale = (a0 + b0) * 2
        axes.plot(μs, beta(a0 * scale, b0 * scale).pdf(μs), linewidth=1, color='C2')

        plt.legend()
        plt.pause(1e-3)
    μ = beta(at, bt).rvs()
    o = np.random.binomial(1, μ)
    at = at + μ
    bt = bt + 1 - μ
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.