Solved – Test statistic for binomial distribution

binomial distributionhypothesis testingp-value

I know that a test statistic is used to help us in hypothesis testing, etc. We compute the test statistic, and then compare it to the $\alpha$ value to reject or accept the null hypothesis.

For a normal distribution, this is easy, you just do $ Z = ((X-\mu)\sqrt n)/\sigma $, and all of these are well-defined.

So, if I'd like to find the test statistic of a binomial distribution, I thought that it was a similar process, given the Central Limit Theorem:

$
\mu = np \\
\sigma = \sqrt(np(1-p)) \\
Z = ((X-np)\sqrt n)/\sqrt(np(1-p))
$

So, why when I look up the test statistic, I see sources such as this one under the section "Normal Approximation to the Binomial Distribution", which define the test statistic differently for a binomial distribution?

What is the test statistic used for a binomial distribution?

Best Answer

I assume that you have $N$ observations that are either ''success'' or ''failure'' and you observe $n$ successes.

If you perform a hypothesis test, then you have some a priori idea about the success probbaility and you want to test whether it is confirmed by the data. So you $H_0$ is that $p=p_0$ where $p_0$ is you a priori value. So $H_0: p=p_0$.

If $H_0$ is true then the above mentioned observation is a random outcome of a Binomial random variable $X \sim Bin(p_0;N)$. Using the Binomial probabilities you can now compute $P(X \ge n)$ and compare this to your significance level, just as with hypothesis tests based on normal random variables.

An alternative is to approximate the Binomial random variable with a normal random variable with mean $Np_0$ and variance $Np_0(1-p_0)$. The approximation works fine for very large $N$ and is better when $p_0$ is close to 0.5.

Related Question