Hypothesis Testing of a Mean In the last section, we introduced the logic of hypothesis testing, as well as some examples on testing claims about a proportion. The same procedure can be applied to testing claims about the mean as well. Remember the example of estimating the average perceived age? By using a random sample of 31 guesses, we were able to derive two confidence intervals: one using the assumption that we know the population standard deviation , one using just the same (hence the sample standard deviation s ). Of course, I did not tell you my actual age at the time of the experiment: I just turned 34 when the experiment was conducted. So the natural question is: "on average, did I look older than my age at the time of the experiment?" Unlike the confidence interval, which only provides a range of values, hypothesis testing is actually capable of providing yes/no answers. Let's start by writing down the hypotheses. Since the claim is about the mean (average perceived age), this will involve the parameter : H 0 : 34 H a : 34 Notice that we have translated the original question to the alternative hypothesis. Although the sample mean 35.1 is a bit higher than my actual age 34, the question is whether this is an accident due to the normal variation in the data, or a significant result due to the fact that I do look older (at least in the classroom). To quantify what counts as a significant result, first we'll have to pick a level of significance: we'll use 0.05 , which corresponds to 1 Type I error in 20 similar experiments. The next step in hypothesis test is translating the null hypothesis and the data to a test statistic. In building the confidence interval, we had two choices: the standard normal Z , or Student's t , both of which have been used previously in constructing confidence intervals. Testing A Claim about the Mean with Given Population Standard Deviation Scenario 1: using the standard normal Z as the test statistic, assuming that the population standard deviation is known to us. (In our earlier example on confidence intervals, we had used 2.6 years). As we mentioned previously, if the null hypothesis were true ( 34 ), by the Central Limit Theorem, the sample mean x is supposed to follow a normal distribution N ( , / n ) . Hence we can measure the "extreme-ness" of the sample mean (i.e. the P-value) by looking at the right-tailed probability (since our alternative hypothesis is right-tailed): P-value = P ( x 35.1) To evaluate this probability, we could either use the normal calculator with 34 as the mean, and 2.6 / 31 as the standard deviation of the sampling distribution. Alternatively, we could also convert the normal distribution to Z , and compute the P-value based on Z : Z x 35.1 34 2.36 / n 2.6 / 31 The P-value will then be the area to the right of the test statistic: P-value= P( x 35.1) P( Z 2.36) 0.009 In this particular case, the meaning of the P-value can be interpreted as: "If my average perceived age were 34 years, then assuming that the population standard deviation is 3.0 years, there is a 0.9% chance that the average guess of my age by a randomly selected group of 31 students is over 35.1 years." Needless to say, this probability is quite small (less than 0.05 ). So our decision is pretty clear: the null hypothesis is quite implausible in face of the evidence, and we should reject the H 0 : in fact, I do look a little older than my actual age. Testing A Claim about the Mean by Only Using the Data Scenario 2: assuming that the population standard deviation conduct the test. is unknown to us, use the Student's t to Recall that if x ~ N ( , / n ) , the t distribution is obtained from the sample mean and standard deviation as follows: t x s/ n If is unknown (which is most likely the case for testing claims about the mean), then Student's t is the preferred test statistic for the hypothesis test. In our example earlier, using s 3.4 years, and the 34 according to the same H 0 , we can calculate the t statistic as follows: t 35.1 34 1.8 3.4 / 31 The degree of freedom for the t statistic is n 1 30 . Hence the P-value (again being right-tailed) will be: P-value= P(t 1.8) 0.04 This P-value was found through the t-distribution calculator in GeoGebra: Although our decision did not change (the significance level is still 0.05), our P-value is a lot closer to what's required for a significant result. Again, it’s useful to look at the interpretation of the P-value according to what we just did: "If my average perceived age were 34 years, then assuming the population standard deviation is unknown, there is a 4% chance that the average guess of my age over 31 students is over 35.1 years." Importance of P-value in Hypothesis Testing Comparing the two different approaches discussed above, you will notice the simplicity of the P-value approach: once we have identified a suitable test statistic, how much the data deviate from the null hypothesis will be quantified by the P-value: the smaller the P-value, the larger the discrepancy. Hence with a suitable tool for computing the P-value, anyone who correctly understands this logic will be able to apply the hypothesis test, without necessarily understanding the mathematics behind the sampling distribution of the test statistic. We shall see that the interpretation of P-value allows us to apply hypothesis testing to a much wider scope of problems beyond testing claims about a single proportion or mean. Because of its important, it’s worth repeating the general meaning of P-value as follows: General Interpretation of p-value: "the chance of seeing the evidence more extreme than the data (as per the appropriate sampling distribution), given that H 0 is true." When you are asked to state the “interpretation of P-value”, please use the proper context (i.e. the null hypothesis and what “more extreme” means) in your statement.