Let $I$ be a (nonempty) compact interval in $\mathbb R$ and $a_1,b_1,\ldots,a_L,b_L \in \mathbb R$. Let $\varphi$ be a piecewise function with $T \ge 2$ pieces(for example $T=2$ for the choice $\varphi(t) = \max(0, t)$ for $t\in \mathbb R$). Consider the piecewise-linear function $f:I \rightarrow \mathbb R$ defined by $f(x)=z_L$, where $$ \begin{split} z_0&=x,\\ z_l &= \varphi(a_l z_{l-1} + b_l),\;\forall l=1,2,\ldots,L. \end{split} $$

Let $a_1,\ldots,a_L$ be drawn i.i.d from some $\mathcal N(0,\sigma_a^2)$ and $b_1,\ldots,b_L$ be drawn i.i.d from some $\mathcal N(0,\sigma_b^2)$.

I'm interested in the distribution of the number of linear pieces of $f$.

# Questions

- What is a good estimate of the average number of linear pieces of $\mathcal f$ as a function of $T$, $L$, $\sigma_a^2$, $\sigma_b^2$, and the length of $I$ ?
- What kinds of techniques can be used for such problems ?