I have the following problem for which I'm not sure my solution is correct:
There's a random sample of size n = 10 observations over a normally distributed population with standard deviation $\sigma=2$:
8.7, 7, 4, 7.6, 3, 8.1, 6.4, 6.1, 9.4, 6.2
- Find 96% confidence interval for the population mean
- Test the hypothesis $H_0: \mu=7.5$ against $H_a: \mu \neq 7.5$ with significance level $\alpha=0.01$. Find approximation of the observed p value.
My Solution:
We are looking for real numbers l and u s.t.:
$P(l < \hat \theta < u) = 0.96$, where $\hat \theta = \frac{\sum_{i=1}^n X_i-n \theta}{\sqrt{n\sigma^2}} \sim N(0,1)$.
We are looking for $z_{0.2}$ which from the z-score table is: 2.055. Therefore:
$$-2.055 < \frac{\sum_{i=1}^n X_i-n \theta}{\sqrt{n\sigma^2}} < 2.055 \equiv -2.055\sqrt{40} < \sum_{i=1}^n X_i-n \theta < 2.055\sqrt{40} \equiv \\ -12.996 - 66.5 <-10\theta < 12.996-66.5 \equiv 5.350 < \theta < 7.94. $$
For the second part:
We set two z-scores: $z_1=-2.325$ and $z_2=2.325$ from which we construct a two-tailed test.
Our test statistic is: $t=\frac{(6.65-7.5)\sqrt{10}}{2}=-1.343 \implies t \ge -2.235$, from where we see the test statistic t is not in the rejection region, therefore we fail to reject the null hypothesis.
My questions are:
- Is my solution correct?
- Do I have to find optimal critical region before test the hypothesises?
- What does the last part mean "Find approximation of the observed p-value., and how do I find such approximation?
In Your first part of solution we must receive for duplex confidence interwal quantile: $ z_{\alpha}: \phi(\alpha)= 1-\frac{\alpha}{2}.$
To second of part J'll make use program R
$$> data<-c(8.7,7.0,4.0,7.6,3.0,8.1,6.4,6.1,9.4,6.2)$$ $$> X10 = mean(data)$$ $$> X10 $$ $$[1] 6.65 $$ $$ > u10 = (6.65 -7.5)/(2/sqrt(10))$$ $$ > u10 $$ $$ [1] -1.343968 $$ $$ > 1 - 0.01/2 $$ $$ [1] 0.995 $$ $$ > k = qnorm(0.995)$$ $$ > k $$ $$ [1] 2.575829 $$
Value of statistic
$$ u_{10} = -1,34 \notin (-\infty, -2,58> \cup <2,58, \infty)$$
There are no reasons to reject $ H_{0} $ and to receive $ H_{1}.$