I'm trying figure out why the variance for the turning point test is $V[T] = \frac{16n-29}{90}$.
Given a sequence of points $\{y_i\}_{i=1}^n$, we define a turning point at time $i$ where $1 < i <n$, if $y_{i−1} < y_i$ and $y_i > y_{i+1}$ or if $y_{i−1} > y_i$ and $y_i < y_{i+1}$, and denote $T$ to be the number of turning points of an iid sequence.
I was able to find the mean easily. $4$ of the $6$ total possibility are turning points giving me a probability of $\frac{2}{3}$ and since the initial and terminal points cannot be evaluated there are a total of $n-2$ points. I can think of this as a binomial distribution and arrive at:
$\mu_T = \frac{2}{3}(n-2)$ - which is the case, but when I apply the same reasoning for the variance, I would think that it would be $\sigma^2_T = \frac{2}{3}\cdot\frac{1}{3}(n-2) = \frac{2}{9}(n-2)$ - yet this is not the case. It should be $V[T] = \frac{16n-29}{90}$.
Since the values are i.i.d., all their orderings are equiprobable. As you correctly noted, for each of the $n-2$ potential turning points $4$ out of $6$ possible orderings yield a turning point, so by linearity of expectation the expected number of turning points is $\frac23(n-2)$.
You can't just "think of this as a binomial distribution". There are correlations between neighbouring points. They don't enter into the expectation due to the linearity of expectation, but they do enter into the variance. To calculated the variance by a similar approach, you need to express it in terms of expectations. We have
\begin{align} V[T] &=E[T^2]-E[T]^2 \\ &=E\left[\left(\sum_iT_i\right)^2\right]-E\left[\sum_iT_i\right]^2 \\ &=\sum_{ij}\left(E\left[T_iT_j\right]-\frac49\right)\;, \end{align}
where $T_i$ is the indicator variable for the $i$-th potential turning point.
For $i=j$, we have $E[T_iT_j]=E[T_i]=\frac23$.
For $|i-j|=1$, we have to consider the $4!$ orderings of $y_i$, $y_j$ and their two neighbours. The number of alternating permutations of $4$ elements is $10$ (see OEIS), so in this case $E[T_iT_j]=\frac{10}{4!}=\frac5{12}$.
For $|i-j|=2$, we have to consider the $5!$ orderings of $y_i$, $y_j$, the element between them and their two outer neighbours. Both $i$ and $j$ are turning points either if the ordering is an alternating permutation of $5$ elements, of which there are $32$ (see again OEIS), or if the element between $i$ and $j$ is not a turning point, in one of two directions, and the outer neighbours lie in the opposite directions, in one of $3\cdot4-1=11$ possible ways, for a total of $32+2\cdot11=54$ orderings. Thus in this case $E[T_iT_j]=\frac{54}{5!}=\frac9{20}$.
For $|i-j|\gt2$ the turning points are uncorrelated, so $E[T_iT_j]=E[T_i]^2=\frac49$.
Putting it all together, we have
\begin{align} V[T]&=(n-2)\cdot\left(\frac23-\frac49\right)+2(n-3)\cdot\left(\frac5{12}-\frac49\right)+2(n-4)\cdot\left(\frac9{20}-\frac49\right)\\ &=\frac{16n-29}{90}\;. \end{align}