Hypothesis Tests for Mean


Hypothesis Tests for Mean

Anna
Hey Simon, have you ever wondered how companies back up their claims? Like when a car manufacturer says their cars average 50 miles per gallon, how do we know if that's really true?

Simon
That's a great question! And it's exactly what hypothesis testing is for. It's a statistical method to test a claim about a population parameter, like the mean. So if a company claims the average is 50 mpg, we can test that using sample data.

Anna
So we take a sample and calculate its average. If it's 49.99, that seems pretty close to 50. But what if it's 48? Or 45? At what point do we say the claim is wrong?

Simon
Exactly! That's where we need a formal process. First, we set up two hypotheses. The null hypothesis, denoted H0, is the claim we're testing, and it always contains an equality sign. Here, H0: μ = 50. The alternative hypothesis, Ha, is the complementary claim. For this example, Ha: μ ≠ 50.

Anna
So we have to decide whether to accept H0 or reject it in favor of Ha. And we base that decision on the sample mean, right? But how far from 50 does the sample average have to be before we reject the claim?

Simon
That's determined by a significance level, often denoted alpha. Common values are 0.05, 0.01, or 0.10. Alpha is the probability of rejecting H0 when it's actually true – that's called a Type I error. We want that error to be small.

Anna
So we choose a significance level, then compute a test statistic based on the sample. For means, we use the z-distribution if the sample is large (n ≥ 30) or if the population is normal and we know the population standard deviation. Otherwise, if the sample is small and sigma is unknown, we use the t-distribution.

Simon
Right. The test statistic tells us how many standard errors the sample mean is from the claimed population mean. Then we compare it to a critical value – a cutoff based on the significance level and the direction of the test.

Anna
Direction? You mean whether we're testing if the mean is less than, greater than, or not equal to a certain value?

Simon
Exactly! We have three types. A left-tailed test: Ha: μ < some value, so the rejection region is on the left. A right-tailed test: Ha: μ > some value, rejection region on the right. And a two-tailed test: Ha: μ ≠ some value, rejection regions on both sides.

Anna
So if the test statistic falls in the rejection region, we reject H0. If not, we fail to reject H0. But we never say we "accept" H0, only that we don't have enough evidence to reject it.

Simon
Precisely! And we also have to consider the possibility of a Type II error: failing to reject H0 when it's actually false. That's denoted beta. Ideally we want both alpha and beta to be small, but there's a trade-off.

Anna
Let's go back to the car example. Suppose we take a sample of 100 cars and find a sample mean of 48 mpg with a known population standard deviation of 10 mpg. We want to test H0: μ = 50 vs Ha: μ ≠ 50 at α = 0.05.

Simon
Great! Since n = 100 ≥ 30, we use the z-test. The test statistic is z = (x̄ - μ0) / (σ/√n) = (48 - 50) / (10/√100) = -2 / 1 = -2. For a two-tailed test at 0.05, the critical values are ±1.96. Since -2 < -1.96, it falls in the left rejection region, so we reject H0.

Anna
So we conclude that the mean is not 50 mpg. But what if the sample size was only 25 and we didn't know the population standard deviation? Then we'd use the t-distribution with n-1 = 24 degrees of freedom.

Simon
Right. We'd compute the sample standard deviation s instead of σ, and our test statistic becomes t = (x̄ - μ0) / (s/√n). Then compare to a t-critical value from the t-table with α and df = 24.

Anna
So hypothesis testing gives us a structured way to make decisions. It's not just about gut feeling – we set up the rules beforehand and let the data speak, while acknowledging the possibility of error.

Simon
Exactly. And remember, the steps are: 1) State H0 and Ha, 2) Choose significance level α, 3) Compute test statistic, 4) Find critical value(s) for the appropriate distribution, 5) Compare and make a decision, 6) State your conclusion in context.

Anna
This is really practical. I can see how it applies to so many real-world scenarios – from quality control in manufacturing to medical trials and even political polls.

Simon
Absolutely. And as we practice with more examples, the process becomes very intuitive. The key is always to correctly identify which distribution to use and what kind of test you're dealing with.

Anna
Thanks, Simon! I think I've got the basics now. Let's try a few problems later to solidify it.

Simon
Sounds good! I'll bring some examples. Remember, hypothesis testing is a powerful tool, but it always comes with uncertainty – that's why we talk about significance levels and errors.

Ask anything
We've read this whole study set, so questions about it get the best answers.