Presentation on theme: "Lecture 2: Thu, Jan 16 Hypothesis Testing – Introduction (Ch 11)"— Presentation transcript:
1 Lecture 2: Thu, Jan 16 Hypothesis Testing – Introduction (Ch 11) Concepts of testingTests of Hypothesis (Sigma known)Rejection Region methodP-value methodTwo – tail test exampleRelationship between Tests and C.I
2 IntroductionThe purpose of hypothesis testing is to determine whether there is enough statistical evidence in favor of a certain belief about a parameter.ExamplesDoes the statistical evidence in a random sample of potential customers support the hypothesis that more than 10% of the potential customers will purchase a new product?Is a new drug effective in curing a certain disease? A sample of patients is randomly selected. Half of them are given the drug while the other half are given a placebo. The improvement in the patients’ condition is then measured and compared.
3 Hypothesis Testing in the Courtroom Null hypothesis: The defendant is innocentAlternative (research) hypothesis: The defendant is guiltyThe goal of the procedure is to determine whether there is enough evidence to conclude that the alternative hypothesis is true. The burden of proof is on the alternative hypothesis.Two types of errors:Type I error: Reject null hypothesis when null hypothesis is true (convict an innocent defendant)Type II error: Do not reject null hypothesis when null is false (fail to convict a guilty defendant)
4 Concepts of Hypothesis Testing The critical concepts of hypothesis testing.Example 11.1The manager of a department store is thinking about establishing a new billing system for the store’s credit customersThe new system will be cost effective only if the mean monthly account ( )is more than $170.There are two hypotheses about a population mean:H0: The null hypothesis m = 170H1: The alternative hypothesis m > 170 (What you want to prove)
5 Assume the null hypothesis is true (m= 170). Sample from the customer population, and build a statistic related to the parameter hypothesized (the sample mean).Pose the question: How probable is it to obtain a sample mean at least as extreme as the one observed from the sample, if H0 is correct?
6 Assume the null hypothesis is true (m= 170). Common sense suggests the following.Suppose is much larger than 170, then the mean m is likely to be greater than 170. Reject the null hypothesis.m = 170When the sample mean is close to 170, it is not implausible that the mean m is 170. Do not reject the null hypothesis.
7 Types of ErrorsTwo types of errors may occur when deciding whether to reject H0 based on the statistic value.Type I error: Reject H0 when it is true.Type II error: Do not reject H0 when it is false.Example continuedType I error: Reject H0 (m = 170) in favor of H1 (m > 170) when the real value of m is 170.Type II error: Believe that H0 is correct (m = 170) when the real value of m is greater than 170.
8 Testing the Population Mean When the Population Standard Deviation is Known Example 11.1A new billing system for a department store will be cost- effective only if the mean monthly account is more than $170.A sample of 400 accounts has a mean of $178.If accounts are approximately normally distributed with s = $65, can we conclude that the new system will be cost effective?
9 Testing the Population Mean (s is Known) Example 11.1 – SolutionThe population of interest is the credit accounts at the store.We want to know whether the mean account for all customers is greater than $170.H1 : m > 170The null hypothesis must specify a single value of the parameter m,H0 : m = 170
10 Approaches to TestingThere are two approaches to test whether the sample mean supports the alternative hypothesis (H1)The rejection region method is mandatory for manual testing (but can be used when testing is supported by a statistical software)The p-value method which is mostly used when a statistical software is available.
11 The Rejection Region Method The rejection region is a range of values such that if the test statistic falls into that range, the null hypothesis is rejected in favor of the alternative hypothesis.
12 The Rejection Region Method – for a Right - Tail Test Example 11.1 – solution continuedRecall: H0: m = H1: m > therefore,It seems reasonable to reject the null hypothesis and believe that m > 170 if the sample mean is sufficiently large.Reject H0 hereCritical value of thesample mean
13 The Rejection Region Method for a Right - Tail Test Example 11.1 – solution continuedDefine a critical value for that is just large enough to reject the null hypothesis.Reject the null hypothesis if
14 Determining the Critical Value for the Rejection Region Allow the probability of committing a Type I error be a (also called the significance level).Find the value of the sample mean that is just large enough so that the actual probability of committing a Type I error does not exceed a. Watch…
15 Determining the Critical Value – for a Right – Tail Test Example 11.1 – solution continuedaP(commit a Type I error) = P(reject H0 given that H0 is true)= P( given that H0 is true)… is allowed to be a.we have:
16 Determining the Critical Value – for a Right – Tail Test Example 11.1 – solution continueda= 0.05
17 Determining the Critical value for a Right - Tail Test ConclusionSince the sample mean (178) is greater than the critical value of , there is sufficient evidence to infer that the mean monthly balance is greater than $170 at the 5% significance level.
18 The standardized test statistic Instead of using the statistic , we can use the standardized value z.Then, the rejection region becomesOne tail test
19 The standardized test statistic Example continuedWe redo this example using the standardized test statistic.Recall: H0: m = 170H1: m > 170Test statistic:Rejection region: z > z.05 =
20 The standardized test statistic Example continuedConclusionSince Z = > 1.645, reject the null hypothesis in favor of the alternative hypothesis.
21 P-value MethodThe p-value provides information about the amount of statistical evidence that supports the alternative hypothesis.The p-value of a test is the probability of observing a test statistic at least as extreme as the one computed,given that the null hypothesis is true.Let us demonstrate the concept on Example 11.1
22 P-value MethodThe probability of observing a test statistic at least as extreme as 178,given that m = 170 is…The p-value
23 Interpreting the p-value Because the probability that the sample mean will assume a value of more than 178 when m = 170 is so small (.0069), there are reasons to believe that m > 170.In addition note that observing a value of 178 when the true mean is 170 is rare, but under the alternative hypothesis, observing a value of 178 becomes more probable.We can conclude that the smaller the p-value the more statistical evidence exists to support the alternative hypothesis.
24 Interpreting the p-value Describing the p-valueIf the p-value is less than 1%, there is overwhelming evidence that supports the alternative hypothesis.If the p-value is between 1% and 5%, there is a strong evidence that supports the alternative hypothesis.If the p-value is between 5% and 10% there is a weak evidence that supports the alternative hypothesis.If the p-value exceeds 10%, there is no evidence that supports the alternative hypothesis.
25 The p-value and the Rejection Region Methods The p-value can be used when making decisions based on rejection region methods as follows:Define the hypotheses to test, and the required significance level a.Perform the sampling procedure, calculate the test statistic and the p-value associated with it.Compare the p-value to a. Reject the null hypothesis only if p-value <a; otherwise, do not reject the null hypothesis.a= 0.05
26 Conclusions of a Test of Hypothesis If we reject the null hypothesis, we conclude that there is enough evidence to infer that the alternative hypothesis is true.If we do not reject the null hypothesis, we conclude that there is not enough statistical evidence to infer that the alternative hypothesis is true.Remember the truth of the alternative hypothesis is what we are investigating. The conclusion focuses on the validity of the alternative hypothesis.
27 A Two - Tail Test Example 11.2 AT&T has been challenged by competitors who argued that their rates resulted in lower bills.A statistics practitioner determines that the mean and standard deviation of monthly long-distance bills for all AT&T residential customers are $17.09 and $3.87 respectively.A random sample of 100 customers is selected and customers’ bills recalculated using a leading competitor’s rates. The sample mean of customers’ bills is $ Assuming the standard deviation is the same (3.87), can we infer at the 5% significance level that there is a difference between AT&T’s bills and the competitor’s bills (on the average)?
29 Two tail tests and C.I.Note that both tests and C.I. are computed based on the sampling distribution of the mean. To illustrate, the 95% C.I for the population mean is [16.79, 18.31] which includesThus we cannot conclude that there is sufficient evidence to infer that the population mean differs from 17.09Use of C.I has the advantage of simplicity but has two important drawbacksLack of correspondence to one-tail testsNo p-value type information
30 Problem 11.54Many Alpine ski centers base their projections of revenuesand profits on the assumption that the average Alpineskier skis 4 times per year.To investigate the validity of this assumption, a randomsample of 63 skiers is drawn and each is asked to reportthe number of times they skied the previous year.Assume that the population standard deviation is 2, andthe sample mean is Can we infer at the 10% levelthat the assumption is wrong?