Ch. 9 - Hypothesis Testing PDF
Document Details
Uploaded by Joeeeyism
Beijing Foreign Studies University
Tags
Summary
This document is a chapter on hypothesis testing, covering basics, null and alternative hypotheses, and various related concepts. The chapter is from the International Business School, Beijing Foreign Studies University.
Full Transcript
Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Chapter 9: Hypothesis Testing International Business School BEIJING FOREIGN STUDIES UNIVERSITY...
Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Chapter 9: Hypothesis Testing International Business School BEIJING FOREIGN STUDIES UNIVERSITY Chap 9 1 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Introduction In general, we do not know the true value of population parameters - they must be estimated. However, we do have hypotheses about what the true values are. The major purpose of hypothesis testing is to choose between two competing hypotheses about the value of a population parameter. For example, one hypothesis might claim that the wages of men and women are equal, while the alternative might claim that men make more than women. Figure 1: Which one is true? 2 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Basics of Hypothesis Testing This section presents individual components of a hypothesis test. We should know and understand the following: How to identify the null hypothesis and alternative hypothesis from a given claim, and how to express both in symbolic form How to calculate the value of the test statistic, given a claim and sample data How to choose the sampling distribution that is relevant How to identify the P-value or identify the critical value(s) How to state the conclusion about a claim in simple and nontechnical terms 3 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Basics of Hypothesis Testing Hypothesis and Hypothesis Test A hypothesis is a claim or statement about a property of a population. A hypothesis test is a procedure for testing a claim about a property of a population. 4 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Null Hypothesis: H0 Definition The hypothesis actually to be tested is usually given the symbol H0 , and is commonly referred to as the null hypothesis. It is a statement that the value of a population parameter (e.g. proportion, mean or standard deviation) is equal to some claimed value We test H0 directly in the sense that we assume it is true Then we conclude to either reject H0 or fail to reject H0. 5 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Alternative Hypothesis: H1 Definition The alternative hypothesis (denoted by H1 or Ha or HA ) is the statement that the parameter has a value that somehow differs from the null hypothesis. The symbolic form of the alternative hypothesis must use one of these symbols: 6=,. Note: Both the null and alternative hypothesis should be stated before any statistical test of significance is conducted. 6 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Stating the H0 and H1 In general, it is most convenient to always have the null hypothesis contain an equal sign, e.g. H0 : = 100 H1 : > 100 and H1 be the one not containing equality so that H1 uses the symbol 6=, > or < (as in the above example). The true value of the population parameter should be included in the set specified by H0 or in the set specified by H1. 7 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Stating the H0 and H1 Example Consider the claim that the mean weight of airline passengers is at most 195 lb (by the Federal Aviation Administration). Identify the null hypothesis and the alternative hypothesis. Steps: 1. The claim that the mean is at most 195 lb is expressed in symbolic form as µ ≤ 195 lb. 2. If µ ≤ 195 lb is false, then µ > 195 lb must be true. 3. Since µ > 195 lb does not contain equality, so the H1 be µ > 195 lb. Thus, H0 must be a statement that the mean equals 195 lb, so we let H0 be µ =195 lb. H0 : = 195lb H1 : > 195lb 8 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Critical Region and Significance Level Critical Region The critical region (or rejection region) is the set of all values of the test statistic that cause us to reject the null hypothesis. Significance Level The significance level (denoted by α) is the probability that the test statistic will fall in the critical region when the null hypothesis is actually true (making the mistake of rejecting the null hypothesis when it is true). Common choices for α are 0.05, 0.01, and 0.10. 9 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Test Statistic Definition The test statistic is a value used in making a decision about the null hypothesis, and is found by converting the sample statistic to a score with the assumption that the null hypothesis is true. Test statistic for mean: x̄ − µ x̄ − µ z= or t= √σ √s n n 10 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Critical Value Definition A critical value is any value that separates the critical region (where we reject the null hypothesis) from the values of the test statistic that do not lead to rejection of the null hypothesis. The critical values depend on the nature of the null hypothesis, the sampling distribution that applies, and the significance level, α See the previous figure where the critical value of z = 1.645 corresponds to a significance level of α = 0.05. 14 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Types of Hypothesis Tests: Two-tailed, Left-tailed, Right-tailed The tails in a distribution are the extreme regions bounded by critical values. Determinations of P-values and critical values are affected by whether a critical region is in , the left tail, or the right tail. It, therefore, becomes important to correctly ,characterize a hypothesis test as two-tailed, left-tailed, or right-tailed. 15 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Types of Hypothesis Tests: Two-tailed, Left-tailed, Right-tailed Type of test Hypothesis Area Significance level α is divided equally be- Two-tailed H0 := and H1 :6= tween the two tails of the critical region Left-tailed H0 := and H1 :< All α in the left tail Right-tailed H0 := and H1 :> All α in the right tail 16 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Types of Hypothesis Tests: Two-tailed, Left-tailed, Right-tailed Example According to a survey by a local magazine in 2016, a sample of primary six students showed that their backpacks weighed an average of 8.4 kg. Another magazine wants to check whether or not this mean has changed since that survey. Determine whether this is a two-tailed, left-tailed or right-tailed test. Then, write the null and alternative hypotheses. Solution The key word here is changed. The mean weight of backpacks for primary six students has changed if it has either increased or decreased since 2016. This is an example of a two-tailed test. 17 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Types of Hypothesis Tests: Two-tailed, Left-tailed, Right-tailed Let µ be the weight of backpacks for the current primary six students. The two possible decisions are: The mean weight of backpacks for the students has not changed since 2016, that is, currently µ = 8.4kg. The mean weight of backpacks for the students has changed since 2016, that is currently µ 6= 8.4kg. The null and alternative hypotheses: H0 : µ = 8.4 kg H1 : µ 6= 8.4 kg 18 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Types of Hypothesis Tests: Two-tailed, Left-tailed, Right-tailed Example The mean amount of soda in all soft-drink cans produced by a company. The company claims that these cans, on average, contain 12 ounces of soda. However, if these cans contain less than the claimed amount of soda, then the company can be accused of cheating. Suppose a consumer agency wants to test whether the mean amount of soda per can is less than 12 ounces. Determine whether this is a two-tailed, left-tailed or right-tailed test. Then, write the null and alternative hypotheses. Solution Note that the key phrase this time is less than, which indicates a left-tailed test. Let µ be the mean amount of soda in all cans. The two possible decisions are as follows: 19 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Types of Hypothesis Tests: Two-tailed, Left-tailed, Right-tailed The mean amount of soda in all cans is equal to 12 ounces, that is, currently µ = 12 ounces. The mean weight of soda in all cans is less than 12 ounces, that is, currently µ < 12 ounces. The null and alternative hypotheses: H0 : µ = 12 ounces H1 : µ < 12 ounces 20 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known P-value Definition The P-value (or p-value or probability value) is the probability of getting a value of the test statistic that is at least as extreme as the one representing the sample data, assuming that the null hypothesis is true. Table 1: The P-values with respect to the critical regions Critical region P-value Left Area to the left of the test statistic Right Area to the right of the test statistic Two tails Twice the area in the tail beyond the test statistic The null hypothesis is rejected if the P-value is very small, such as 0.05 or less. 21 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Decisions and Conclusions: Wording the Final Conclusion Note: Do not use ”Accept” for ”Fail to Reject” Do not use Multiple Negatives 25 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Errors in Hypothesis Tests Type I Error A Type I error is the mistake of rejecting the null hypothesis when it is actually true. The symbol α is used to represent the probability of a Type I error. Type II Error A Type II error is the mistake of failing to reject the null hypothesis when it is actually false. The symbol β is used to represent the probability of a Type II error. 27 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Errors in Hypothesis Tests Summary of Type I and Type II Errors 28 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Using the P-value Method Steps: 1. Identify t he s pecific claims and put i t i n s ymbolic f orm 2. Give the symbolic form that must be true when the original claim is false 3. Obtain H1 and H0. 4. Select t he s ignificance l evel α based on t he s eriousness of a t ype I error. make α s mall i f consequences of r ejecting a t rue H0 are s evere. (for example 0.05 and 0.01) 5. Identify the statistic (such as normal or t). 6. Find t he t est s tatistic and find t he P-value. D raw a graph and s how the test s tatistic and P-value 7. Reject H0 i f t he P-value ≤α. Fail t o r eject H0 i f t he P-value >α. 8. Restate this previous decision in simple, non-technical terms, and address the original claim. Chap 31 6 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Using the Traditional Method 1 Identify the specific claims and put it in symbolic form 2 Give the symbolic form that must be true when the original claim is false 3 Obtain H1 and H0 4 Select the significance level α based on the seriousness of a type I error. Make α small if consequences of rejecting a true H0 are severe. (for example 0.05 and 0.01) 5 Identify the statistic (such as normal or t). 6 Find the test statistic, the critical values and the critical region. Draw a graph. 7 Reject H0 if test statistic is in the critical region. Fail to reject H0 if the test statistic is not in the critical region. 8 Restate this previous decision in simple, non-technical terms, and address the original claim. 32 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Confidence Method Confidence Interval (CI) Construct a CI with a confidence level selected as in the table below. Because a CI estimate of a population parameter contains the likely values of that parameter, reject a claim that the population parameter has a value that is not included in the CI. For one-tail hypothesis test with significance level α, construct a CI with CL of 1 − 2α. See table below. (given α) 1-tail test Confidence level (1%) 98% z=2.33 (5%) 90% z=1.65 (10%) 80% z=1.28 33 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Known Key Concept This section presents methods for testing a claim about a population mean, given that the population standard deviation, σ is a known value. Notation n = sample size x̄ = sample mean µx̄ = population mean of all sample means form samples of size n σ = known value of the population standard deviation 40 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Requirements for Testing a Claim About a Mean: σ Known Requirements 1. The sample is a simple random sample. 2. The value of the population standard deviation σ is known. 3. Either or both of these conditions is satisfied: The population is normally distributed or n > 30. 41 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Known Example People have died in boat accidents because an obsolete estimate of the mean weight of men was used. Using the weights of the simple random sample of men from an existing data set, we obtain these sample statistics: n = 40 and x̄ = 172.55lb. Research from several other sources suggests that the population of weights of men has a standard deviation given by σ = 26lb. Use these results to test the claim that men have a mean weight greater than 166.3 lb, which was the recommended weight by the board of transportation and safety. Use a 0.05 significance level, and use the P-value method. Solution Requirements are satisfied: simple random sample, σ is known (26 lb), sample size is 40 (n > 30). 42 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Known 1. 3. µ > 166.3 lb does not contain equality, it is the alternative hypothesis: H0 : µ = 166.3lb H1 : µ > 166.3lb (original claim) 4. Significance level is α = 0.05, critical value = 1.65 2. 43 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Known 3. 6. Calculate test statistic, z: x̄ − µx̄ 172.55 − 166.3 z = = √σ √26 n 40 = 1.52 This is right-tailed test, thus P-value is the area to the right of z = 1.52. From the z-table, area to the left of z = 1.52 is 0.9357, so the area to the right is 1 − 0.9357 = 0.0643. Therefore, P-value = 0.0643 44 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Known 4. 7. The P-value of 0.0643 is greater than the significance level of α = 0.05, we fail to reject the null hypothesis. or TS = 1.52 < 1.65 is not in the critical region, so fail to reject H0. The P-value of 0.0643 tells us that if men have a mean weight given by = 166.3 lb, there is a good chance (0.0643) of getting a sample mean of 172.55 lb. A sample mean such as 172.55 lb could easily occur by chance. There is not sufficient evidence to support a conclusion that the population mean is greater than 166.3 lb, as recommended by the transport and safety board. 45 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Known Example Use the traditional method to solve the previous problem. Solution We start at Step 3 of the Traditional Method. 3. 6. For α = 0.05, the corresponding critical value z = 1.65. Since test statistic is z = 1.52, it does not fall in the critical region. 4. 7. Since the test statistic does not fall in the critical region, we fail to reject H0. (same result with P-value method) 46 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Known Example Use traditional method and confidence method to test the claim. Solution We start at Step 3 of the Traditional Method. 3. 6. For α = 0.05, the corresponding critical value z = 1.65. Since test statistic is z = 1.52, it does not fall in the critical region. 4. 7. Since the test statistic does not fall in the critical region, we fail to reject H0. (same result with P-value method) 47 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Known Confidence Method Use a one-tailed test with α = 0.05, so construct a 90% confidence interval: Now, n = 40, x̄ = 172.55 and σ = 26. Margin of error, σ E = z α2 √ n √ = 1.65(26)/ 40 = 6.783 Therefore, CI = (172.55 − 6.783, 172.55 + 6.783) = (165.8, 179.3) or 165.8 < µ < 179.3. This confidence interval contains 166.3lb, hence, we cannot support a claim that µ is greater than 166.3. Again, fail to reject the null hypothesis. 48 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Known Example At Nissin Food Corporation, it used to take an average of 90 minutes for new workers to learn a food processing job. Recently the company installed a new food processing machine. The supervisor at the company wants to find if the mean time taken by new workers to learn the food processing procedure on this new machine is different from 90 minutes. A sample of 20 workers showed that it took, on average, 85 minutes for them to learn the food processing procedure on the new machine. It is known that the learning times for all new workers are normally distributed with a population standard deviation of 7 minutes. Find the p-value for the test that the mean learning time for the food processing procedure on the new machine is different from 90 minutes. What will your conclusion be if α = 0.01? 49 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Known Solution Requirements are satisfied: simple random sample, σ is known (7 minutes), normally distributed (n < 20). 1. 6 90 minutes Express claim as µ = H0 : µ = 90 minutes H1 : µ 6= 90 minutes (original claim) 2. Significance level is α = 0.01, critical value = -2.58 or +2.58 50 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Known 3. 5. Calculate the test statistic, z: x̄ − µx̄ 85 − 90 z= = = −3.19 √σ √7 n 20 From the z-table, the area to the left of z = −3.19 is 0.0007. Since this is a two-tailed test, p-value = 2(0.0007)=0.0014. 51 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Known 4. 7. The P-value of 0.0014 is less than the significance level of α = 0.01, we reject the null hypothesis. or TS = -3.19 < -2.58 is in the critical region, so we reject H0. 8. We can conclude that there is sufficient evidence to support the claim that the mean time for learning the food processing procedure on the new machine is different from 90 minutes. 52 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Not Known Key Concept This section presents methods for testing a claim about a population mean when we do not know the value of σ. The methods of this section use the Student t distribution introduced earlier. Notation n = sample size x̄ = sample mean µx̄ = population mean of all sample means form samples of size n 53 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Requirements for Testing a Claim About a Mean: σ Not Known Requirements 1. The sample is a simple random sample. 2. The value of the population standard deviation σ is not known. 3. Either or both of these conditions is satisfied: The population is normally distributed or n > 30. P-values and Critical Values Use t-Distribution table from the Mathematical Formulae Book To find degrees of freedom, df = n − 1 54 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Important Properties of the Student t Distribution 1. The Student t distribution is different for different sample sizes. 2. The Student t distribution has the same general bell shape as the normal distribution; its wider shape reflects the greater variability that is expected when s is used to estimate σ. 3. The Student t distribution has a mean of t = 0 (just as the standard normal distribution has a mean of z = 0). 4. The standard deviation of the Student t distribution varies with the sample size and is greater than 1 (unlike the standard normal distribution, which has σ = 1). 5. As the sample size n gets larger, the Student t distribution gets closer to the standard normal distribution. 55 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Student t Distributions for n = 3 and n = 12 56 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Not Known Example People have died in boat accidents because an obsolete estimate of the mean weight of men was used. Using the weights of the simple random sample of men from an existing data set, we obtain these sample statistics: n = 40 and x̄ = 172.55 lb, and s = 26.33 lb. Do not assume that the value of σ is known. Use these results to test the claim that men have a mean weight greater than 166.3 lb, which was the recommended weight by the board of transportation and safety. Use a 0.05 significance level, and the traditional method. Solution Requirements are satisfied: simple random sample, population standard deviation is not known, sample size is 40 (n > 30) 57 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Not Known 1.1.µ > 166.3 lb does not contain equality, it is the alternative hypothesis: H0 : µ = 166.3lb H1 : µ > 166.3lb (original claim) 4. Significance l evel i s α =0.05, df = 40 - 1 = 39, critical value = 1.684 2. 3. 5. Calculate test statistic, t: x̄ − µ 172.55 − 166.3 t = = √s 26.33 n 40 = 1.501 58 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Testing a Claim About a Mean: σ Not Known 7. t = 1.501 does not fall in the critical region bounded by cv = 1.684, thus we fail to reject the null hypothesis. 8. Because we f ail t o r eject t he null hypothesis, we conclude t hat there i s not sufficient evidence to support a conclusion that the population mean i s greater than 166.3 l b, as r ecommended by the transport and safety board. 59 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Finding P-Values with the Student t Distribution P-Value approach is more difficult in this section than in last section Reason: Student t Distribution table usually does not allow you to get exact P-value. Thus, we need to identify a range of P-values. 1. Use df to locate the relevant row of t-table 2. Determine where the test statistic lies relative to the t values in that row 3. Based on a comparison of the t test statistic and the t values in the row of t-table, identify a range of values by referring to the area values given at the top of t-table 60 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Finding P-Values with the Student t Distribution Example Use t-table to find a range of values for the P-value corresponding to the test statistic of t = 1.501 from the preceding example. Note df = 39 and the test is right-tailed. Solution Refer to the t-table, test statistic of t = 1.501 falls between the table values of 1.684 and 1.303, and so the area in one tail is between 0.05 and 0.10. 61 / 61 Basics of Hyp. Testing Testing a Claim About a Proportion Mean: σ Known Mean: σ Not Known Finding P-Values with the Student t Distribution As shown in the figure below, the area to the right of t = 1.501 is greater than 0.05. Although we cannot find the exact value for P-value from the table, we can conclude that P-value > 0.05. Therefore, we fail to reject the null hypothesis. There is no sufficient evidence to support the claim that the mean weight of men is greater than 166.3 lb. 62 / 61