Exercise of Hypothesis Testing An insurance company is reviewing its current policy rates. When originally setting the rates they
believed that the average claim amount was $1,800$. They are concerned that the true mean is actually
higher than this, because they could potentially lose a lot of money. They randomly select 40 claims, and
calculate a sample mean of $1,950$. Assuming that the standard deviation of claims is $500$, and set $\alpha = 0.05$,
test to see if the insurance company should be concerned.
My attempt:


*

*Null hypothesis: $H_0:\mu\leq1800$

*Alternative hypothesis: $H_1:\mu>1800$


Since our sample size is large, we will do $Z$-test. The test statistic is
$$Z=\frac{\bar x-\mu}{\frac{s}{\sqrt n}}=\frac{1950-1800}{\frac{500}{\sqrt 40}}=1.897,$$
and the rejection region is $Z>1.96$.
Conclusion: We fail to reject null hypothesis.
But here, they have considered a $t$-test. But the sample size is large enough to do a $Z$-test.
Again, the link doesn't consider 'upper tail'. So their conclusion is in contradiction with mine.
Which one is correct?
 A: "They randomly select 40 claims..."
First, you only have 40 samples. (not 40 samples!!, One sample with 40 cases). That's not enough to do a Z-test. You are in solid T-test territory as is your example.
"They are concerned that the true mean is actually higher than this..."
So this will be a one sided test. Looking up the test statistic for a one sided t-test with 39 degrees of freedom (from here http://www.sjsu.edu/faculty/gerstman/StatPrimer/t-table.pdf)
Also according to that table you don't have a z statistic until you've had over 1,000 samples.
The closest I can come is 40 so the statistic would be 1.684. Your null and alternative hypotheses look good to me
Using the one sample T-test referenced here (the same as your z-statistic): http://en.wikipedia.org/wiki/Student's_t-test
$$t = \frac{\overline x - \mu_0 }{\frac{s}{\sqrt n}} = \frac{1,950 - 1,800 }{\frac{500}{\sqrt 40}} = 1.8974$$
Which is the same value as you. Since $t > \alpha$ we reject the null hypothesis.
I think the main issue here is using a one sided test vs two sided and understanding you are not able to use a z-test with so few samples.
