
Simple Hypothesis Testing Student t-test and Analysis of Variance Chi-Squared Test Contingency Tables SYSM 6303: Quantitative Introduction to Risk and Uncertainty in Business Lecture 5: Hypothesis Testing M. Vidyasagar Cecil & Ida Green Chair The University of Texas at Dallas Email: [email protected] October 11, 2014 M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Chi-Squared Test Contingency Tables Outline 1 Simple Hypothesis Testing Accepting or Rejecting a Null Hypothesis Choosing Among Multiple Hypotheses 2 Student t-test and Analysis of Variance Student t-Test Analysis of Variance (ANOVA) 3 Chi-Squared Test 4 Contingency Tables Sensitivity, Specificity, Accuracy Chi-Squared Approximations Fisher's Exact Test M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Chi-Squared Test Contingency Tables Overview One of the major applications of statistical methods is to test various hypotheses, and choose the most likely one. This lecture is devoted to several such applications. Hypotheses can involve either categoricl variables, or numerical variables. Example of categorical variables: The percentage of left-handed men is roughly the same as that of left-handed women. Here the sex and handedness are categorical variables. Example of numerical variable: On average men are taller than women. Here the sex is categorical, but height (which is the quantity being compared) is numerical. M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Accepting or Rejecting a Null Hypothesis Chi-Squared Test Choosing Among Multiple Hypotheses Contingency Tables Outline 1 Simple Hypothesis Testing Accepting or Rejecting a Null Hypothesis Choosing Among Multiple Hypotheses 2 Student t-test and Analysis of Variance Student t-Test Analysis of Variance (ANOVA) 3 Chi-Squared Test 4 Contingency Tables Sensitivity, Specificity, Accuracy Chi-Squared Approximations Fisher's Exact Test M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Accepting or Rejecting a Null Hypothesis Chi-Squared Test Choosing Among Multiple Hypotheses Contingency Tables Outline 1 Simple Hypothesis Testing Accepting or Rejecting a Null Hypothesis Choosing Among Multiple Hypotheses 2 Student t-test and Analysis of Variance Student t-Test Analysis of Variance (ANOVA) 3 Chi-Squared Test 4 Contingency Tables Sensitivity, Specificity, Accuracy Chi-Squared Approximations Fisher's Exact Test M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Accepting or Rejecting a Null Hypothesis Chi-Squared Test Choosing Among Multiple Hypotheses Contingency Tables The Notion of a Null Hypothesis In hypothesis testing, one begins with a \null" hypothesis, which is defined as what one believes in the absence of any information. For instance, given a coin with two faces, we believe the coin is fair. Given a six-sided die, we believe that all six outcomes are equally likely. And so on. As evidence accumulates, we may be able to reject the null hypothesis. Or else we may be unable to reject it, and thus are forced to accept it. M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Accepting or Rejecting a Null Hypothesis Chi-Squared Test Choosing Among Multiple Hypotheses Contingency Tables Coin-Tossing Example We are given a two-faced coin, and the null hypothesis is that it is fair. 100 tosses of the coin produce 60 heads. Question: Do we accept or reject the null hypothesis? Answer: We compute the likelihood of the observation or worse under the null hypothesis. The matlab command T = binopdf(k,n,p) with n = 100; k = 60; p = 0:5 is the likelihood of getting exactly 60 heads in 100 fair coin tosses. But it is more reasonable to compute T = 1 - binocdf(k-1,n,p), which is the likelihood of getting at least 60 heads in 100 fair coin tosses. This returns the answer T = 0:0284. So we are 97.16% sure that the null hypothesis is false. M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Accepting or Rejecting a Null Hypothesis Chi-Squared Test Choosing Among Multiple Hypotheses Contingency Tables Coin-Tossing Example (Cont'd) Usually we set a threshold below which we will reject the null hypothesis. The value of 0:05 is widely used. So in this case we would say that \the null hypothesis is rejected at a 95% level," or in plain English that \we are 95% sure that the null hypothesis is false." This statement means only that the likelihood of the actual outcome is less than 0:95 { it doesn't say what the likelihood is. To eliminate the ambiguity, the phrase \P -value" (or p-value) is used. For this outcome the P -value is 0.0284, which is lower than the threshold we set of 0.05, so the null hypothesis is rejected at a 95% confidence level. M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Accepting or Rejecting a Null Hypothesis Chi-Squared Test Choosing Among Multiple Hypotheses Contingency Tables Coin-Tossing Example (Cont'd) Low P -values lead to the null hypothesis being rejected; but what about high P -values? Suppose the null hypothesis is that the coin is fair, and that 100 tosses result in 47 heads. This time we compute the likelihood of getting 47 or fewer heads. The commant binocdf(k,n,p) with n = 100; k = 47; p = 0:5 returns the value 0:3086. So we are about 30% sure that the null hypothesis is not consistent with the data. But we cannot reject the null hypothesis because this value is above the usual threshold of 0:05. M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Accepting or Rejecting a Null Hypothesis Chi-Squared Test Choosing Among Multiple Hypotheses Contingency Tables Outline 1 Simple Hypothesis Testing Accepting or Rejecting a Null Hypothesis Choosing Among Multiple Hypotheses 2 Student t-test and Analysis of Variance Student t-Test Analysis of Variance (ANOVA) 3 Chi-Squared Test 4 Contingency Tables Sensitivity, Specificity, Accuracy Chi-Squared Approximations Fisher's Exact Test M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Accepting or Rejecting a Null Hypothesis Chi-Squared Test Choosing Among Multiple Hypotheses Contingency Tables Null vs. Alternate Hypotheses A major change in hypothesis testing took place with the introduction of \alternate hypotheses." Instead of having just one hypothesis, namely the null, we have a variety of hypotheses from which to choose. Approach: Compute the likelihood of the data under each of the competing hypotheses, and choose the one with the highest (log) likelihood. M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Accepting or Rejecting a Null Hypothesis Chi-Squared Test Choosing Among Multiple Hypotheses Contingency Tables Coin-Tossing Example (Cont'd) Suppose we have two competing hypotheses: H0: The coin is fair (the null hypothesis). H1: The probability of heads is 0:7. An experiment of 100 tosses produces 60 heads. Which hypothesis do we choose? M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Accepting or Rejecting a Null Hypothesis Chi-Squared Test Choosing Among Multiple Hypotheses Contingency Tables Coin-Tossing Example (Cont'd) The likelihood of the data under H0 is computed as 1 - binocdf(k-1,n,p) with n = 100; k = 60; p = 0:5. This gives L0 = 0:0284. The likelihood of the data under H1 is computed as binocdf(k,n,p) with n = 100; k = 60; p = 0:7. This gives L1 = 0:0210. So we reject H1 and accept H0. Note however that each hypothesis would have been rejected, had it been the only (null) hypothesis! M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Accepting or Rejecting a Null Hypothesis Chi-Squared Test Choosing Among Multiple Hypotheses Contingency Tables Maximum Likelihood Estimation Revisited The previous example shows the potential pitfalls of being \forced" to choose the \least unlikely" hypothesis from a set of hypotheses, all of them unlikely by themselves. Maximum likelihood estimation gets around this difficulty by finding the best possible fit to the data from the given family of models. If n = 100 coin tosses result in k = 60 heads, then the maximum likelihood estimate of the probability of heads is p^ = 60=100 = 0:6. To put this in perspective, this choice maximizes the likelihood binopdf(k,n,p) (not binocdf(k,n,p)) with respect to p, given that n = 100; k = 60. M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Student t-Test Chi-Squared Test Analysis of Variance (ANOVA) Contingency Tables Outline 1 Simple Hypothesis Testing Accepting or Rejecting a Null Hypothesis Choosing Among Multiple Hypotheses 2 Student t-test and Analysis of Variance Student t-Test Analysis of Variance (ANOVA) 3 Chi-Squared Test 4 Contingency Tables Sensitivity, Specificity, Accuracy Chi-Squared Approximations Fisher's Exact Test M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Student t-Test Chi-Squared Test Analysis of Variance (ANOVA) Contingency Tables Outline 1 Simple Hypothesis Testing Accepting or Rejecting a Null Hypothesis Choosing Among Multiple Hypotheses 2 Student t-test and Analysis of Variance Student t-Test Analysis of Variance (ANOVA) 3 Chi-Squared Test 4 Contingency Tables Sensitivity, Specificity, Accuracy Chi-Squared Approximations Fisher's Exact Test M. Vidyasagar Modeling Dependencies Simple Hypothesis Testing Student t-test and Analysis of Variance Student t-Test Chi-Squared Test Analysis of Variance (ANOVA) Contingency Tables Student t-test The \student" t-test refers to a hypothesis-testing procedure first proposed by William Seely Gossett under the pseudonym \Student." It tests whether or not there is a statistically significant difference between the means of two samples.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages70 Page
-
File Size-