On the frequencies of patterns of rises and falls
We investigate the probability of observing a given pattern of $n$ rises and falls in a random stationary data series. The data are modelled as a sequence of $n+1$ independent and identically distributed random numbers. This probabilistic approach has a combinatorial equivalent, where the data are modelled by a random permutation on $n+1$ objects. The probability of observing a long pattern of rises and falls decays exponentially with its length $n$ in general. The associated decay rate $\alpha$ is interpreted as the embedding entropy of the pattern. This rate is evaluated exactly for all periodic patterns. In the most general case, it is expressed in terms of a determinant of generalized hyperbolic or trigonometric functions. Alternating patterns have the smallest rate $\alpha_{{\rm min}}=\ln(\pi/2)=0.451582\dots$, while other examples lead to arbitrarily large rates. The probabilities of observing uniformly chosen random patterns are demonstrated to obey multifractal statistics. The typical value $\alpha_0=0.806361\dots$ of the rate plays the role of a Lyapunov exponent. A wide range of examples of patterns, either deterministic or random, is also investigated.