TITLE: function that is the average of affine transformations of itself
QUESTION [6 upvotes]: Consider the function $f : \mathbb{R} \to [-1,1]$ with
$$
 f(x) = \begin{cases}
          -1 & x \le -1 \\
          +1 & x \ge +1 \\
          \frac{f(\frac32 (x-\frac13)) + f(\frac32 (x+\frac13))}{2} & -1 \le x \le +1\,.
        \end{cases}
$$
So $f$ is the average of two affine transformations of itself.
The picture shows the graph of $f$ (in red) and the two affine transformations from the definition (in blue).

What is known about such functions? Is $f(0.5) \approx 0.694064$ rational?

REPLY [5 votes]: This function (with a parameter $0 < \lambda < 1$, more generally than $2/3$) arises in Probability as cumulative distribution function $f_\lambda$ of a sum $S:=\sum_{j=0}^\infty \pm \lambda^j$ with random signs, independently and identically chosen with equal probability $(1/2,1/2)$ (the $k$-th iterate considered here by Per Alexandersson corresponds to a partial sum, if I'm not wrong). In this context, a functional equation like the one you wrote is a simple consquence of the independence, partitioning into two cases, according to the sign of the first term.
For $\lambda <1/2$ one finds a function whose variation is concentrated on  a Cantor like set -exactly the Cantor ternary set when $\lambda =1/3$. It is also easy to see that $\lambda=1/2$ corresponds to the uniform distribution $f(x) = x$ (due to elementary facts of the binary representation). What happens for $\lambda > 1/2$ is more difficult to understand; the problem is  studied since the $30$s starting with Erdős, and found interesting connections in different areas of mathematics. I'm not adding other chats, but the keyword for a search, which is Bernoulli convolutions.
Here is a good survey paper on the subject: Sixty years of Bernoully convolutions, by
Y.Peres W.Schlag, B.Solomyak .