Q: Hypothesis testing of a binomial variable There's this problem I'm trying to solve and I can't wrap my head around it;
Let X be a binomial variable. The number $x_k$ of times we observed $k$ successes in 96 repetitions of the experiment is given by this table: 
$$\begin{array}{|c|c|} \hline
\text{k} & 0 & 1 & 2 & 3 & 4 \\ \hline
\text{$x_k$} & 5 & 22 & 35 & 28 & 6 \\ \hline
\end{array}$$
Should we accept with $\alpha = 0.10$ the hypothesis $H_0$ that $X\sim Bin(4,\frac{1}{2})$
From what I understand, what we're testing is 
$$H_0: p=\frac{1}{2}    \space \space \space H_1: p \neq \frac{1}{2} \space\space\space when \space n=4$$ 
But I can't find what value I should test it with... Just from looking at the data it looks about right but... Any help would be greatly appreciated!

A: Let $Y_i \sim \text{Bin}(m,p)$ iid over $i=1,\dots,n$ under the null. The likelihood of the model is 
$$\propto \prod_{i=1}^n p^{Y_i}(1-p)^{m-Y_i} = [p/(1-p)]^{\sum_i Y_i}(1-p)^m$$
so rejecting based on $\sum_i Y_i$ would be the most powerful test for one-sided alternatives. Generally, this suggests that basing any test on $T = \sum_{i=1}^n Y_i$ is a good idea.
The data you are given is $x_k = \sum_{i=1}^n 1\{Y_i = k\}$ (what is the relation between these and $T$?)
Under the null, we can reject based on $|T - E[T]|$ being large. By CLT (under the null),
$$
T' := \frac{ T - E[T]} {\sqrt{\text{var}(T)}}
$$
is approximately normally distributed (when $mn$ is large). You can use this to approximately set the threshold $\tau$ such that $P_{H_0}( |T'| \ge \tau) \approx \alpha$.
