Need help understanding hypothesis testing

50 Views Asked by At

I have the following question:

Let $X_{i}$ be Gaussian random variables with $\mu$ = 10 and $\sigma^{2}$ = 1. We decide to use the test statistic $\hat{\mu}$ = $\frac{1}{20}\sum_{i=1}^{20}X_{i}$ and following tests:

$|\hat{\mu}-10|>\tau$ : Reject $H_{0}$

$|\hat{\mu}-10|\leq \tau$ : Cannot reject $H_{0}$

1) Find $\tau$ if you want to have 95% confidence in the test.

2) You find that $\hat{\mu}=10.588$. Do you reject $H_{0}$? If so, what is the p-value?

Using textbook equations, I found out that for

1) $\tau$ = 1.96$\sigma_{\hat{\mu}}$ = $1.96 \sqrt{\frac{1}{20}}$ = 0.392

2) |10.588-10| = 0.588 > 0.392 $\rightarrow$ Reject $H_{0}$

p-value = 0.003

What I'm looking for is explanation or intuition as to why this is the answer? Any help would be appreciated.

1

There are 1 best solutions below

2
On BEST ANSWER

The $95\%$ confidence interval for $\mu$ is: $$\hat{\mu}-z_{\alpha/2}\cdot \sigma_{\hat{\mu}}<\mu<\hat{\mu}+z_{\alpha/2}\cdot \sigma_{\hat{\mu}} \iff \\ \hat{\mu}-1.96\cdot \frac{\sigma}{\sqrt{n}}<\mu<\hat{\mu}+1.96\cdot \frac{\sigma}{\sqrt{n}} \iff \\ -1.96\cdot \frac{\sigma}{\sqrt{n}}<\mu-\hat{\mu}<1.96\cdot \frac{\sigma}{\sqrt{n}} \iff \\ |\mu-\hat{\mu}|<1.96\cdot \frac{\sigma}{\sqrt{n}}=\tau=1.96\cdot \frac{1}{\sqrt{20}}=0.392 \ \text{or}\\ \hat{\mu}-0.392<\mu<\hat{\mu}+0.392$$ It implies that we are $95\%$ confident that the population mean will lie within $0.392$ distance from $\hat{\mu}$. The null hypothesis states to reject if it is greater distance. With $\hat{\mu}=10.588$, it is greater distance, so we reject $H_0$.

$p$-value is: $$\mathbb P\left(z>\frac{\hat{\mu}-\mu_0}{\sigma/\sqrt{n}}\right)=\mathbb P\left(z>\frac{10.588-10}{1/\sqrt{20}}\right)=\mathbb P(z>2.62962)=0.004<0.025 \Rightarrow \ \text{Reject $H_0$}.$$ Reference: WA answer.