Hypothesis Tests for Means The context “Statistical significance” Hypothesis tests and confidence intervals The steps Hypothesis Test statistic Distribution.

Slides:



Advertisements
Similar presentations
Unlocking the Mysteries of Hypothesis Testing
Advertisements

Statistics.  Statistically significant– When the P-value falls below the alpha level, we say that the tests is “statistically significant” at the alpha.
Hypothesis Testing A hypothesis is a claim or statement about a property of a population (in our case, about the mean or a proportion of the population)
Inference Sampling distributions Hypothesis testing.
Copyright © 2014 by McGraw-Hill Higher Education. All rights reserved.
Hypothesis Testing Developing Null and Alternative Hypotheses Developing Null and Alternative Hypotheses Type I and Type II Errors Type I and Type II Errors.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 9 Hypothesis Testing Developing Null and Alternative Hypotheses Developing Null and.
Chapter 10 Section 2 Hypothesis Tests for a Population Mean
EPIDEMIOLOGY AND BIOSTATISTICS DEPT Esimating Population Value with Hypothesis Testing.
Business 205. Review Sampling Continuous Random Variables Central Limit Theorem Z-test.
Hypothesis Testing Steps of a Statistical Significance Test. 1. Assumptions Type of data, form of population, method of sampling, sample size.
Tests of significance Confidence intervals are used when the goal of our analysis is to estimate an unknown parameter in the population. A second goal.
Stat Day 16 Observations (Topic 16 and Topic 14)
BCOR 1020 Business Statistics Lecture 21 – April 8, 2008.
Chapter 9 Hypothesis Testing.
BCOR 1020 Business Statistics
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 8 Tests of Hypotheses Based on a Single Sample.
Statistical Inference Dr. Mona Hassan Ahmed Prof. of Biostatistics HIPH, Alexandria University.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 9 Hypothesis Testing.
Overview Definition Hypothesis
Confidence Intervals and Hypothesis Testing - II
Hypothesis Tests In statistics a hypothesis is a statement that something is true. Selecting the population parameter being tested (mean, proportion, variance,
Chapter 8 Hypothesis testing 1. ▪Along with estimation, hypothesis testing is one of the major fields of statistical inference ▪In estimation, we: –don’t.
Statistics for Managers Using Microsoft® Excel 7th Edition
Introduction to Biostatistics and Bioinformatics
Fundamentals of Hypothesis Testing: One-Sample Tests
Section 9.1 Introduction to Statistical Tests 9.1 / 1 Hypothesis testing is used to make decisions concerning the value of a parameter.
Tests of significance & hypothesis testing Dr. Omar Al Jadaan Assistant Professor – Computer Science & Mathematics.
1/2555 สมศักดิ์ ศิวดำรงพงศ์
Let’s flip a coin. Making Data-Based Decisions We’re going to flip a coin 10 times. What results do you think we will get?
+ Chapter 9 Summary. + Section 9.1 Significance Tests: The Basics After this section, you should be able to… STATE correct hypotheses for a significance.
STATISTICAL INFERENCE PART VII
1 Today Null and alternative hypotheses 1- and 2-tailed tests Regions of rejection Sampling distributions The Central Limit Theorem Standard errors z-tests.
1 Power and Sample Size in Testing One Mean. 2 Type I & Type II Error Type I Error: reject the null hypothesis when it is true. The probability of a Type.
One Sample Inf-1 If sample came from a normal distribution, t has a t-distribution with n-1 degrees of freedom. 1)Symmetric about 0. 2)Looks like a standard.
10.2 Tests of Significance Use confidence intervals when the goal is to estimate the population parameter If the goal is to.
The Practice of Statistics Third Edition Chapter 10: Estimating with Confidence Copyright © 2008 by W. H. Freeman & Company Daniel S. Yates.
Chapter 20 Testing hypotheses about proportions
Chapter 9 Fundamentals of Hypothesis Testing: One-Sample Tests.
1 Psych 5500/6500 The t Test for a Single Group Mean (Part 1): Two-tail Tests & Confidence Intervals Fall, 2008.
1 Chapter 10: Introduction to Inference. 2 Inference Inference is the statistical process by which we use information collected from a sample to infer.
1 ConceptsDescriptionHypothesis TheoryLawsModel organizesurprise validate formalize The Scientific Method.
Statistical Hypotheses & Hypothesis Testing. Statistical Hypotheses There are two types of statistical hypotheses. Null Hypothesis The null hypothesis,
CHAPTER 9 Testing a Claim
Significance Test A claim is made. Is the claim true? Is the claim false?
Hypothesis Testing State the hypotheses. Formulate an analysis plan. Analyze sample data. Interpret the results.
EMIS 7300 SYSTEMS ANALYSIS METHODS FALL 2005 Dr. John Lipp Copyright © Dr. John Lipp.
S-012 Testing statistical hypotheses The CI approach The NHST approach.
Introduction to Inferece BPS chapter 14 © 2010 W.H. Freeman and Company.
10.1: Confidence Intervals Falls under the topic of “Inference.” Inference means we are attempting to answer the question, “How good is our answer?” Mathematically:
1 Chapter 9 Hypothesis Testing. 2 Chapter Outline  Developing Null and Alternative Hypothesis  Type I and Type II Errors  Population Mean: Known 
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 8 Hypothesis Testing.
1 9 Tests of Hypotheses for a Single Sample. © John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. 9-1.
Chapter 8 Parameter Estimates and Hypothesis Testing.
Fall 2002Biostat Statistical Inference - Confidence Intervals General (1 -  ) Confidence Intervals: a random interval that will include a fixed.
Chap 8-1 Fundamentals of Hypothesis Testing: One-Sample Tests.
Business Statistics for Managerial Decision Farideh Dehkordi-Vakil.
© Copyright McGraw-Hill 2004
AP Statistics Chapter 11 Notes. Significance Test & Hypothesis Significance test: a formal procedure for comparing observed data with a hypothesis whose.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
Tests of Significance: The Basics ESS chapter 15 © 2013 W.H. Freeman and Company.
Today: Hypothesis testing. Example: Am I Cheating? If each of you pick a card from the four, and I make a guess of the card that you picked. What proportion.
If we fail to reject the null when the null is false what type of error was made? Type II.
Chapter 12 Tests of Hypotheses Means 12.1 Tests of Hypotheses 12.2 Significance of Tests 12.3 Tests concerning Means 12.4 Tests concerning Means(unknown.
Uncertainty and confidence Although the sample mean,, is a unique number for any particular sample, if you pick a different sample you will probably get.
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
Review Statistical inference and test of significance.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 1 FINAL EXAMINATION STUDY MATERIAL III A ADDITIONAL READING MATERIAL – INTRO STATS 3 RD EDITION.
4-1 Statistical Inference Statistical inference is to make decisions or draw conclusions about a population using the information contained in a sample.
Hypothesis Testing: Hypotheses
Presentation transcript:

Hypothesis Tests for Means The context “Statistical significance” Hypothesis tests and confidence intervals The steps Hypothesis Test statistic Distribution Alpha, and the rejection region Result p-Values One-sided vs. two-sided tests Hypothesis tests for proportions

The context PARAMETERS  = population mean (unknown)  = population SD (might be known) STATISTICS n = sample size x = sample mean s = sample SD (using n-1) ALSO  0 = conjectured value of 

Statistical significance We’re trying to decide whether  is equal to  0. As usual we use x as an estimate of . Usually x is at least a little different from  0. But could the difference be due to random variation? IF YES – then we DO NOT REJECT the hypothesis that  is really equal to  0. We say that x is not significantly different from  0. IF NO – then we REJECT the hypothesis that  =  0. We say that x IS significantly different from  0.

Hypothesis tests are just confidence intervals If we only cared about hypothesis tests for means, we could make this a lot simpler. Just construct a confidence interval for , based on n, x, s (or  ) and your favorite confidence level C. If  0 is outside the confidence interval, then we reject the hypothesis that  =  0. The significance level is  = 1 – C. That’s all there is to it. So why all the complex ritual of a hypothesis test? Because there are other hypothesis tests, for other hypotheses (difference of two means, for example). For those tests, we need the ritual.

Hypothesis Test for  Cookbook using rejection regions 1. Choose hypotheses – H 0 and H A. 2. Define a test statistic. 3. Predict the distribution of the test statistic, assuming that H 0 is true. 4. Choose C and . Pick a rejection region. 5. Look at the observed value of the test statistic. Is it in the rejection region? If so, reject H 0.

Hypothesis Test for  Cookbook using rejection regions 1. Choose hypotheses – H 0 and H A. 2. Define a test statistic. 3. Predict the distribution of the test statistic, assuming that H 0 is true. 4. Choose C and . Pick a rejection region. 5. Look at the observed value of the test statistic. Is it in the rejection region? If so, reject H 0.

Choose hypotheses Two-sided test: H 0 :  =  0 H A :    0 One-sided tests: H 0 :  =  0 H A :  >  0 or H 0 :  =  0 H A :  <  0 Working rule: Always use two-sided tests.

Hypothesis Test for  Cookbook using rejection regions 1. Choose hypotheses – H 0 and H A. 2. Define a test statistic. 3. Predict the distribution of the test statistic, assuming that H 0 is true. 4. Choose C and . Pick a rejection region. 5. Look at the observed value of the test statistic. Is it in the rejection region? If so, reject H 0.

Define a test statistic Choose or Do you know  ? Maybe it comes with the null hypothesis. If so, use it.

Hypothesis Test for  Cookbook using rejection regions 1. Choose hypotheses – H 0 and H A. 2. Define a test statistic. 3. Predict the distribution of the test statistic, assuming that H 0 is true. 4. Choose C and . Pick a rejection region. 5. Look at the observed value of the test statistic. Is it in the rejection region? If so, reject H 0.

Distribution of the test statistic ASSUME H 0 IS TRUE. Then (if you know  ) z has a STANDARD NORMAL distribution. Or (if you’re using s) t has a “t” distribution with n-1 degrees of freedom.

Hypothesis Test for  Cookbook using rejection regions 1. Choose hypotheses – H 0 and H A. 2. Define a test statistic. 3. Predict the distribution of the test statistic, assuming that H 0 is true. 4. Choose C and . Pick a rejection region. 5. Look at the observed value of the test statistic. Is it in the rejection region? If so, reject H 0.

(Standard normal case) The rejection region is a range (or double-range) of values of the test statistic that are (a) UNLIKELY if H 0 is true (b) roughly consistent with the alternative H A. The rejection region should have probability  (given H 0 ). Two-sided case: z*  /2 - z*  /2 Rejection region consists of two parts, each with probability  /2.

Predicting the distribution If you’re using t, just use t-critical values. For the one-sided case: z*  Rejection region probability , all in one tail.

Chance of a Type I error Note: IF H 0 is actually true, then there is still a probability of  that you will reject the null hypothesis. z*  /2 - z*  /2

Chance of a Type I error There are two possible bad results: TYPE I ERROR (“act of commission”) – reject H 0, when H 0 is actually true. The probability of a Type I error is  (given that H 0 is true) TYPE II ERROR (“act of omission”) – don’t reject H 0, when H 0 is actually false. The probability of a Type II error depends on the actual value of 

Hypothesis Test for  Cookbook using rejection regions 1. Choose hypotheses – H 0 and H A. 2. Define a test statistic. 3. Predict the distribution of the test statistic, assuming that H 0 is true. 4. Choose C and . Pick a rejection region. 5. Look at the observed value of the test statistic. Is it in the rejection region? If so, reject H 0.

Tradeoff High  (say, 10%) then you have a good chance of having a statistically significant result, but it won’t impress anyone. MORE TYPE I ERRORS Low  (say, 1%) then your significant results are more convincing, but you’ll have fewer of them. MORE TYPE II ERRORS Is there a way to avoid choosing  in advance?

Determine p-value The “p-value” is the answer to this question: What fraction of x ‘s are more extreme than the one you actually obtained? If H A :    0 this means, what fraction are further from zero than the value you obtained? If H A :  >  0 this means, what fraction are more than the value you obtained? If H A :  <  0 this means, what fraction are less than the value you obtained?

Determine p-value Example: Do a test of H 0 :  =  0 vs. H A :    0. Get test statistic z = What’s the p-value? Probability of seeing 2.30 OR MORE: Probability of seeing 2.30 OR MORE EXTREME: p-value for 2-sided test: z=2.30 tail:

Determine p-value Keep it simple? p-value = (for 1-sided test with z) = 1 - NORMSDIST ( |z| ) (for 2-sided test with z) = 2 × (1-NORMSDIST(|z|)) (for 1-sided test with t) = TDIST ( |t|, n-1, 1 ) (for 2-sided test with t) = TDIST ( |t|, n-1, 2 ) df number of tails

Determine p-value The p-value is the border between  ’s for which we reject H 0 and  ’s for which we do not reject H 0. REJECTION REGION VERSION: Pick , and the rejection region, in advance. In this story, the p-value is an afterthought. p-VALUE FIRST VERSION: Find the p-value first. Then if anyone has a favorite , you can… Reject H 0 if p <  Do not reject if p > .

Example: 1969 Draft Lottery Null hypothesis (informally): The numbers for the second half of the year were drawn randomly from the population 1, 2, …, 366. (Note: The mean of these numbers is 183.5, and their standard deviation is ) Null hypothesis (formally): H 0 :  = (and this is one of those cases where  = comes with the null hypothesis) Alternative: H A :   183.5

Example: 1969 Draft Lottery H 0 :  = H A :    0 =  = Experiment: n = 184, x = _________ Test statistic: p-value: Conclusion: REJECT H 0 (even at 1% significance level) =

Hypothesis tests for proportions PARAMETER p = population proportion STATISTICS n = sample size k = number of “hits” p = k / n = sample proportion

Hypothesis tests for proportions Test statistic: (Minor subtlety: The distribution of the test statistic is based on H 0, so we use p 0 in the formula for SE. This is different from what we do in confidence intervals, but not by much.)

Another example Suppose we have flipped coins, and obtained 5100 heads. Is this result statistically significant?

Another example Suppose we have flipped coins, and obtained 5100 heads. Is this result statistically significant? Choose: H 0 : p = 0.50H A : p  0.50

Another example Suppose we have flipped coins, and obtained 5100 heads. Is this result statistically significant? Choose: H 0 : p = 0.50H A : p  0.50 Conditions? OK.

Another example Suppose we have flipped coins, and obtained 5100 heads. Is this result statistically significant? Choose: H 0 : p = 0.50H A : p  0.50 Conditions? OK. Distribution of p^, given H 0 : Normal, mean 0.50, SD=0.005

Another example Our value of p^ is That’s 2.0 SD’s above the mean. What fraction of p^ values would be further from zero than 0.51 ?

Another example Our value of p^ is That’s 2.0 SD’s above the mean. What fraction of p^ values would be further from zero than 0.51 ? ABOUT 4.5%, counting both tails. So, P-value is

Result of test Is a P-value of good enough to reject H 0 ?

Result of test Is a P-value of good enough to reject H 0 ? If we choose  = 0.05, then yes. But that’s a very mild test for such an extraordinary claim.

Result of test Is a P-value of good enough to reject H 0 ? If we choose  = 0.05, then yes. But that’s a very mild test for such an extraordinary claim. If we pick  = 0.05, then 5% of all our experiments will end in rejecting H 0, even though H 0 is true every time.

Result of test Is a P-value of good enough to reject H 0 ? If we choose  = 0.05, then yes. But that’s a very mild test for such an extraordinary claim. If we pick  = 0.05, then 5% of all our experiments will end in rejecting H 0, even though H 0 is true every time. So we should choose a lower value of . In this case, our result isn’t really “statistically significant.”

Result of test Is a P-value of good enough to reject H 0 ? If we choose  = 0.05, then yes. But that’s a very mild test for such an extraordinary claim. If we pick  = 0.05, then 5% of all our experiments will end in rejecting H 0, even though H 0 is true every time. So we should choose a lower value of . In this case, our result isn’t really “statistically significant.” We need a bigger sample!