Suppose a function such as:
$\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) on $\phi$ where $x$ is drawn from a beta distribution with parameters (3,1) and $\alpha = 0.5$.
I don't know how to deal with $\phi$ in the random walk process, especially given its 3 conditions.
EDIT: $y$ is the mean of all the previous $x$. For instance, suppose we are at time $t=3$ and observations start at $t=0$. Then, $y_3 = \frac{x_0 + x_1 + x_2}{3}$.
ϕ[x_, y_] := Piecewise[{
{α*x, x < y},
{x, x == y},
{α*x + (1 - α), x > y}}]
ϕ[x, y]