Hypotheses testing without a standard deviation

378 Views Asked by At

So, there seems to be a gap in my knowledge somewhere... here's the question

A species of a common butterfly with a large population occurs in two different types, light (type $L$) and dark (type $D$). A naturalist observes 10 of the butterflies in a particular wood, $2$ of which are type $L$ and $8$ are type $D$. The naturalist wishes to decide whether this sample provides significant evidence that the proportion of type L butterflies differs from the proportion of type $D$ butterflies in this wood.

Is there evidence to reject the null hypothesis at the $5\%$ level?

So I believe this requires the T distribution due to the small sample size. So using $\frac{X-\mu}{\frac{\sigma}{\sqrt{10}}}$. I take $X$ as $=5$ as it's half the size as the proportion of both $L$ and $D$ should be $=$. Then $\mu=2$ as that was the actual value and $n$ as $10$. But what would $\sigma$ be? Or am I approaching this wrong? is there a way to find the standard deviation from this?

1

There are 1 best solutions below

4
On BEST ANSWER

When testing for proportions, we do not use a $t$-distribution because $p$ is a Bernoulli random variable with only one parameter to estimate since the variance $p(1-p)$ is a function of the mean $p$.

This is a one sample test of proportions where

$$H_0 : p=0.5$$

$$H_a : p\neq 0.5$$

and

$$Z=\frac{\hat{p}-p}{\sqrt{\frac{p(1-p)}{n}}}$$

In our case, we can use $\hat{p}=0.8$ or $\hat{p}=0.2$ and come to the same conclusion.

We have

$$Z=\frac{0.8-0.5}{\sqrt{\frac{0.5(1-0.5)}{10}}}=1.897$$

By a $z$-table, you should find

$$P(|Z|\gt 1.897)\approx 2\cdot0.0287=0.0574$$

R statistical software give a p-value of $0.0578$

> 2*pnorm(-1.897)
[1] 0.05782794

Thus, at $\alpha=0.05$ we fail to reject the null hypothesis that $p=0.5$ so we do not have significant evidence that the proportion of type L butterflies differs from the proportion of type D butterflies in this population.

Non-Parametric Test:

You can also run a binomial test to get the exact probability. Let $X$ denote the number of type D butterflies we observe. Then

$$P(X\leq 2 \cup X \geq 8 \mid p=0.5)\approx 0.1094$$

> sum(dbinom(0:2,10,.5))+sum(dbinom(8:10,10,.5))
[1] 0.109375

Here we fail to reject the null hypothesis as well.