Let $X_t$ be IID random variables in $[0,1]$ and CDF $F(\cdot)$. Suppose there exists a variable $Y_t$ given by:
$Y_1 = X_1$ and $Y_t = \phi(X_t, \overline{Y}_{t-1}), \forall t >1$, where
$\overline{Y}_{t} = \frac{1}{t} \sum_{i=1}^{t} Y_i$
and
$\phi^{\alpha} (x,y) = \left\{ \begin{array}{l l} \alpha x & \quad \text{if $x < y$}\\ x & \quad \text{if $x = y$}\\ \alpha x + (1 -\alpha) & \quad \text{if $x > y$}\\ \end{array} \right.$
I wish to run a simulation for 5 random walks (each with length 100) of $\overline{Y}_{t}$ where $X$ is drawn from a beta distribution with parameters (3,1) and $\alpha = 0.5$.
Normally, we should observe a convergence to the mean of $X$, i.e. $\mathbb{E}[X]$.
I have for $\phi^{\alpha} (x,y)$:
f[a_, {x_, y_}] := Piecewise[{{a x, x < y}, {x, x == y}, {1 - a + a x, x > y}}, 0]
My Beta distribution (with 100 iterations) can be expressed as:
RandomVariate[BetaDistribution[3, 1], 100]
I have difficulties to form the aggregation of data, and plot the evolution of $\overline{Y}_{t}$. Any help would be highly appreciated.
ListPlot[Table[<%simulated_data%>], PlotRange -> All, Joined -> True, Frame -> True]