A sequence of reals $x_1,...,x_n$ is said to have a turning point at index-value $i$ ($1\lt i\lt n$) iff $x_{i-1}\lt x_{i}\gt x_{i+1}$ or $x_{i-1}\gt x_{i}\lt x_{i+1}$. The number of turning points in the sequence is denoted $T(x_1,...,x_n)$, and we define the turning-point fraction as $$R(x_1,...,x_n)={\text{number of turning points}\over\text{number of potential turning points}}={T(x_1,...,x_n)\over n-2}$$ so $0\le R(x_1,...,x_n)\le 1.$ If $X_1,...,X_n$ are random variables, we define the corresponding r.v.s $T_n=T(X_1,...,X_n)$ and $R_n=R(X_1,...,X_n).$
Conjecture: If $X_1,...,X_n$ are i.i.d. r.v.s with any discrete distribution, then $E[R_n]\lt{2\over 3}$. (It's easy to show that $E[R_n]={2\over 3}$ when the $X_i$ are i.i.d. with any continuous distribution.)
Supposing the $X_i$ are i.i.d. with a discrete distribution having p.m.f. $p()$ and c.d.f. $F()$, we have the following: $$\begin{align*}E[R_n] &={1\over n-2}E\left[ \sum_{i=2}^{n-1}\mathbb{1}_{(X_{i-1}<X_i>X_{i+1}) \text{ or } (X_{i-1}>X_i<X_{i+1})}\right]\\ &=P[(X_1<X_2>X_3) \text{ or } (X_1>X_2<X_3)]\\ &=P[X_1<X_2>X_3] + P[X_1>X_2<X_3]\\ &=\sum_{x: p(x)>0} p(x)\left(P[X_1<x>X_3\mid X_2=x] + P[X_1>x<X_3\mid X_2=x]\right)\\ &=\sum_{x: p(x)>0} p(x)\left(P[X_1<x]^2 + P[X_1>x]^2\right)\\ &=\sum_{x: p(x)>0} p(x)\left(\left(F(x)-p(x)\right)^2 + \left(1-F(x)\right)^2\right)\\ \end{align*}$$
Question: How to show that this must be less than 2/3, if such is the case? Or find a counterexample if not?
NB: Simulations suggest that for a given finite support, a uniform distribution might maximize $E[R_n]$. When the $X_i$ are i.i.d. DiscreteUniform$\{1,...,m\}$, we have $p(x)={1\over m}$ and $F(x)={x\over m}$ for $x=1,...,m$, and the above summation reduces to $$E[R_n]={(2m-1)(m-1)\over 3m^2}\lt{2\over 3}$$ with $E[R_n]$ approaching ${2\over 3}$ from below as $m\to\infty.$
We can use the linearity of expectation argument in the discrete case as well, we just have to be a little bit more careful. For each $i$ with $1<i<n$, there are three cases:
If the probabilities of the three cases are $p_1, p_2, p_3$ with $p_1 + p_2 + p_3 = 1$, then the total probability that $X_i$ is a turning point is $\frac23p_1 + \frac13p_2$, and the expected number of turning points is $\mathbb E[T_n] = (\frac23 p_1 + \frac13p_2) (n-2)$.
It is clear that $\frac23 p_1 + \frac13 p_2 \le \frac23 p_1 + \frac23 p_2 + \frac23p_3 = \frac23$, which means that $\mathbb E[T_n] \le \frac23(n-2)$.
Moreover, if there is any value $x$ such that $\Pr[X_i = x] > 0$, then $p_3 \ge \Pr[X_i = x]^3 > 0$, and therefore $\frac23 p_1 + \frac13 p_2 < \frac23$; which means that $\mathbb E[T_n] < \frac23(n-2)$. Such a value $x$ will exist, in particular, for all discrete random variables.