ECO220Y Review and Introduction to Hypothesis Testing Readings: Chapter 12

Similar documents
ECO220Y Hypothesis Testing: Type I and Type II Errors and Power Readings: Chapter 12,

Preliminary Statistics. Lecture 5: Hypothesis Testing

Preliminary Statistics Lecture 5: Hypothesis Testing (Outline)

Announcements. Unit 3: Foundations for inference Lecture 3: Decision errors, significance levels, sample size, and power.

Hypothesis Testing. ECE 3530 Spring Antonio Paiva

Econ 325: Introduction to Empirical Economics

Chapter Three. Hypothesis Testing

CHAPTER 9, 10. Similar to a courtroom trial. In trying a person for a crime, the jury needs to decide between one of two possibilities:

280 CHAPTER 9 TESTS OF HYPOTHESES FOR A SINGLE SAMPLE Tests of Statistical Hypotheses

Business Statistics: Lecture 8: Introduction to Estimation & Hypothesis Testing

Mathematical Statistics

Introductory Econometrics. Review of statistics (Part II: Inference)

Statistical Process Control (contd... )

LECTURE 5. Introduction to Econometrics. Hypothesis testing

ME3620. Theory of Engineering Experimentation. Spring Chapter IV. Decision Making for a Single Sample. Chapter IV

Mathematical statistics

Statistics for Managers Using Microsoft Excel/SPSS Chapter 8 Fundamentals of Hypothesis Testing: One-Sample Tests

Hypothesis tests

Section 9.1 (Part 2) (pp ) Type I and Type II Errors

Harvard University. Rigorous Research in Engineering Education

STAT Chapter 8: Hypothesis Tests

Quantitative Methods for Economics, Finance and Management (A86050 F86050)

Topic 17: Simple Hypotheses

First we look at some terms to be used in this section.

Section 5.4: Hypothesis testing for μ

14.30 Introduction to Statistical Methods in Economics Spring 2009

Statistical Inference: Uses, Abuses, and Misconceptions

Bias Variance Trade-off

MTMS Mathematical Statistics

Chapter 5: HYPOTHESIS TESTING

The problem of base rates

Basic Concepts of Inference

Last week: Sample, population and sampling distributions finished with estimation & confidence intervals

Last two weeks: Sample, population and sampling distributions finished with estimation & confidence intervals

Hypotheses and Errors

Hypothesis Testing The basic ingredients of a hypothesis test are

Lecture 10: Generalized likelihood ratio test

PHP2510: Principles of Biostatistics & Data Analysis. Lecture X: Hypothesis testing. PHP 2510 Lec 10: Hypothesis testing 1

8.1-4 Test of Hypotheses Based on a Single Sample

Chapter 9 Inferences from Two Samples

How do we compare the relative performance among competing models?

Interpretation of results through confidence intervals

AMS7: WEEK 7. CLASS 1. More on Hypothesis Testing Monday May 11th, 2015

STAT Chapter 9: Two-Sample Problems. Paired Differences (Section 9.3)

Chapter 9. Hypothesis testing. 9.1 Introduction

With our knowledge of interval estimation, we can consider hypothesis tests

6.4 Type I and Type II Errors

Inferences About Two Proportions

Statistical Inference for Means

8: Hypothesis Testing

1 Statistical inference for a population mean

Chapter 7 Comparison of two independent samples

Wooldridge, Introductory Econometrics, 4th ed. Appendix C: Fundamentals of mathematical statistics

20 Hypothesis Testing, Part I

Section 10.1 (Part 2 of 2) Significance Tests: Power of a Test

Unit 19 Formulating Hypotheses and Making Decisions

Statistics 251: Statistical Methods

Math 101: Elementary Statistics Tests of Hypothesis

For use only in [the name of your school] 2014 S4 Note. S4 Notes (Edexcel)

Hypothesis Testing One Sample Tests

Probability and Statistics

HYPOTHESIS TESTING. Hypothesis Testing

F79SM STATISTICAL METHODS

T.I.H.E. IT 233 Statistics and Probability: Sem. 1: 2013 ESTIMATION AND HYPOTHESIS TESTING OF TWO POPULATIONS

Summary of Chapters 7-9

HYPOTHESIS TESTING II TESTS ON MEANS. Sorana D. Bolboacă

Statistics for IT Managers

Quantitative Introduction ro Risk and Uncertainty in Business Module 5: Hypothesis Testing

Class 24. Daniel B. Rowe, Ph.D. Department of Mathematics, Statistics, and Computer Science. Marquette University MATH 1700

EC2001 Econometrics 1 Dr. Jose Olmo Room D309

INTERVAL ESTIMATION AND HYPOTHESES TESTING

In any hypothesis testing problem, there are two contradictory hypotheses under consideration.

where Female = 0 for males, = 1 for females Age is measured in years (22, 23, ) GPA is measured in units on a four-point scale (0, 1.22, 3.45, etc.

Probability, Statistics, and Bayes Theorem Session 3

Testing Hypothesis. Maura Mezzetti. Department of Economics and Finance Università Tor Vergata

The Components of a Statistical Hypothesis Testing Problem

Business Statistics 41000: Homework # 5

Topic 17 Simple Hypotheses

Hypotheses Test Procedures. Is the claim wrong?

CHAPTER 8. Test Procedures is a rule, based on sample data, for deciding whether to reject H 0 and contains:

7.1 Basic Properties of Confidence Intervals

Math 124: Modules Overall Goal. Point Estimations. Interval Estimation. Math 124: Modules Overall Goal.

1 Descriptive statistics. 2 Scores and probability distributions. 3 Hypothesis testing and one-sample t-test. 4 More on t-tests

Hypothesis testing I. - In particular, we are talking about statistical hypotheses. [get everyone s finger length!] n =

CONTINUOUS RANDOM VARIABLES

LECTURE 12 CONFIDENCE INTERVAL AND HYPOTHESIS TESTING

Inferential Statistics

CHAPTER 9: HYPOTHESIS TESTING

Lecture Testing Hypotheses: The Neyman-Pearson Paradigm

Fundamental Statistical Concepts and Methods Needed in a Test-and-Evaluator s Toolkit. Air Academy Associates

Lectures 5 & 6: Hypothesis Testing

Statistical Inference. Section 9.1 Significance Tests: The Basics. Significance Test. The Reasoning of Significance Tests.

EXAM 3 Math 1342 Elementary Statistics 6-7

Purposes of Data Analysis. Variables and Samples. Parameters and Statistics. Part 1: Probability Distributions

Gov 2000: 6. Hypothesis Testing

Class 19. Daniel B. Rowe, Ph.D. Department of Mathematics, Statistics, and Computer Science. Marquette University MATH 1700

The t-statistic. Student s t Test

Introduction to Statistics

Confidence Intervals with σ unknown

Lecture #16 Thursday, October 13, 2016 Textbook: Sections 9.3, 9.4, 10.1, 10.2

Transcription:

ECO220Y Review and Introduction to Hypothesis Testing Readings: Chapter 12 Winter 2012 Lecture 13 (Winter 2011) Estimation Lecture 13 1 / 33

Review of Main Concepts Sampling Distribution of Sample Mean (Chapter 10 [10.6] and Chapter 13 [13.1]) Sampling Distribution of Sample Proportion (Chapter 10 [10.3]) Central Limit Theorem (Chapter 13 [10.5]) Confidence Interval for Population Proportion (Chapter 11) Confidence Interval Estimator when σ is unknown (Chapter 13 [13.2-13.4]) Student t-distribution, t-statistic Plan for the next four lectures: Hypothesis Tests for Population Proportion (Chapter 12) Hypothesis Tests for Population Mean (Chapter 13, sections 13.5-13.6) (Winter 2011) Estimation Lecture 13 2 / 33

Sampling distribution of Sample Proportion, ˆp ˆp is distributed with mean equal to the true population proportion, p, and standard deviation of p(1 p)/n ˆp (p, p(1 p)/n) }{{} variance The shape of the distribution is normal if the rule of thumb holds: 0 < ˆp ± 3 ˆp(1 ˆp)/n < 1, or ˆpn > 10 and (1 ˆp) > 10 ˆp N(p, p(1 p)/n) Why would we be interested in a sampling distribution of ˆp? (Winter 2011) Estimation Lecture 13 3 / 33

Sampling Distribution of Sample Mean, X X is distributed with mean equal to population mean, µ, and standard deviation of σ/ n σ X 2 (µ, ) }{{} n variance Central Limit Theorem implies that for a sample with n > 30 the shape of the distribution of X will be normal X N(µ, σ2 n ) Chapter 14 is excluded from the material covered for the Final Exam (Winter 2011) Estimation Lecture 13 4 / 33

Sampling Distribution of Sample Mean, X When population standard deviation, σ, is unknown, the standard deviation of sampling distribution of X is s/ n where s is a sample standard deviation. The standardized sample mean, t = X µ s/ follows a Student t n distribution with ν = n 1 degrees of freedom If you are interested in why ν = n 1 and what are the degrees of freedom, read optional section 13.7 in Chapter 13 (Winter 2011) Estimation Lecture 13 5 / 33

Confidence Interval Estimator Confidence interval estimator for p is: ˆp(1 ˆp) ˆp ± z α/2 n Confidence interval estimator for µ is: X ± z α/2 σ n or X ± t α/2,ν s n (Winter 2011) Estimation Lecture 13 6 / 33

Student t-distribution Student t distribution has one parameter ν = n 1, or degrees of freedom The shape of the distribution is approximately normal for large n Critical values for t-statistic can be found from table Implication: if σ is unknown, all computations about population mean involve t-distribution, not standard normal (Example: CI for µ s becomes X ± t α/2 n ) (Winter 2011) Estimation Lecture 13 7 / 33

Hypothesis Testing Murphy s law states, If anything can go wrong, it will. For instance, if I m putting jelly on a slice of bread and drop it, why does it usually land jelly side down? How to prove Murphy s law is right or wrong? Drop 1721 slices of bread and observe an outcome I did not make that up. See William R. Simpson, A Probabilistic Formulation of Murphy Dynamics as Applied to the Analysis of Operational Research Problems, 1983 Jelly-side-up: 206 or 12%; Jelly side-down: 1506, or 88% Triumph of Murphy s law or simply a chance? I did not make that up. See William R. Simpson, A Probabilistic Formulation of Murphy Dynamics as Applied to the Analysis of Operational Research Problems, 1983 (Winter 2011) Estimation Lecture 13 8 / 33

Introduction to Hypothesis testing - General Idea Statistical inference is often used to confirm or reject theories We can never be certain that the theory is true, but we can make probability statements, such as, Given the data, we are 90% confident that the theory is true. Hypothesis test is really an attempted proof by statistical contradiction. If the collected data are of the kind consistent with the theory (likely kind), then the theory is deemed to be true If the data are of unlikely kind, then the theory is rejected (Winter 2011) Estimation Lecture 13 9 / 33

Textbook Analogy: A Trial A person is accused Value of population parameter of a crime is hypothesized Guilt of accused person Population parameter is unknown is unknown Collect relevant evidence Collect a sample, compute statistic Jury makes decision Test hypothesis based on evidence based on evidence from sample Complete evidence? Entire population? (Winter 2011) Estimation Lecture 13 10 / 33

Two Hypotheses Null Hypothesis (H 0 ) Alternative Hypothesis (H A ) (or Research Hypothesis) Hypothesis not based on evidence Hypothesis that can be proved based on evidence Example: Defendant is innocent Defendant is guilty p = 0.45 p 0.45 µ=60 µ > 60 (Winter 2011) Estimation Lecture 13 11 / 33

Decision/Inference Statisticians say: Fail to reject H 0 Reject H 0 Fail to find evidence of guilt, insufficient evidence to infer guilt; Enough evidence to infer guilt and reject presumption of innocence; not enough evidence sufficient evidence to infer p 0.45 to infer p 0.45 Wrong language: X Accept H 0 X Prove H A (Winter 2011) Estimation Lecture 13 12 / 33

How to Set Up Hypotheses Consider two cases: Legal Standard I: Innocent until proven guilty beyond a reasonable doubt Legal Standard II: Guilty until proven innocent beyond a reasonable doubt H 0 -? H 0 -? H A -? H A -? If no evidence what the jury verdict should be? If no evidence what the jury verdict should be? (Winter 2011) Estimation Lecture 13 13 / 33

Type I and Type II Errors H 0 is the true H A is the true state of the world state of the world (Innocent) (Guilty) Fail to reject H 0 No error Type II Error (Acquit) Reject H 0 Type I Error No error (Convict) What is probability jury makes no errors (reaches the right conclusion)? (Winter 2011) Estimation Lecture 13 14 / 33

Type I and Type II Errors Probability of committing Type I error is called α and it is also a significance level of the statistical test. P(Type I error) = P(Reject H 0 H 0 is true) = α Probability of committing Type II error is called β and 1 β is called power of the test P(Type II error) = P(Fail to reject H 0 H A is true) = β 1-P(Type II error) = 1-β = Power of the test (Winter 2011) Estimation Lecture 13 15 / 33

Significance Level α Significance level is chosen by researcher (conventional levels - 1%, 5%, 10%). There is a trade-off between P(Type I error) and P(Type II error) - increasing significance of the test (α ), power of the test decreases ((1 β) or β ). Interpretation of α: if α=0.05, then researcher allows herself to reject the true H 0 5% of the time. (Winter 2011) Estimation Lecture 13 16 / 33

Null and Alternative Again Null Hypothesis Alternative Hypotheses H A : p < B H 0 : p = B H A : p B H A : p > B (Winter 2011) Estimation Lecture 13 17 / 33

Two Approaches to Hypothesis Testing 1 Rejection Region Idea: Divide area under the density curve into rejection and acceptance regions. Rejection region: if test statistic falls into rejection region, reject H0, accept H A. Rejection refers to H0. Acceptance region formally is incorrect. Why? 2 P-value Compute probability of observing the value of sample statistics, P-value Compare P-value to significance level, α (Winter 2011) Estimation Lecture 13 18 / 33

(Winter 2011) Estimation Lecture 13 19 / 33

Rejection Region How to find rejection region? Specify the null and alternative hypotheses. Find sampling distribution of ˆp using population parameter specified under the null hypothesis, p 0. Specify significance level α. Find critical values for the specified significance level. Idea: how likely is that the sample comes from the population hypothesized under the null? Critical values determine the cut-offs of that likelihood. Rejection rule: Reject H 0 if ˆp > critical value. (Winter 2011) Estimation Lecture 13 20 / 33

Example (Murphy s Law) - One-tailed test Set up competing hypotheses: H 0 : p = 0.5 vs H A : p > 0.5 Choose a significance level: α = 0.05 Find critical value, or value at the cut-off ˆp critical = 0.5197 P(ˆp >? H 0 ) = 0.05 P(ˆp >? p 0 = 0.5) = 0.05 ˆp p 0 P( p0 (1 p 0 )/n >? p 0 p0 (1 p 0 )/n ) = 0.05 P(Z >? 0.5 0.012 ) = 0.05? 0.5 = 1.645? = 0.5197 0.012 Rejection rule: Reject H 0 if ˆp > 0.5197 (Winter 2011) Estimation Lecture 13 21 / 33

(Winter 2011) Estimation Lecture 13 22 / 33

Determinants of the Critical Value ˆp critical = z α p0 (1 p 0 ) n + p 0 Significance level, α Sample size Null hypothesis How does each affect the critical value? (Winter 2011) Estimation Lecture 13 23 / 33

Example (Murphy s Law) - Two-tailed test Set up competing hypotheses: H 0 : p = 0.5 vs H A : p 0.5 Choose a significance level: α = 0.05 Find critical values, or values at the cut-off P(ˆp > ˆp critical H 0 ) = 0.025 and P(ˆp < ˆp critical H 0 ) = 0.025 Standardize and un-standardize to find the value of ˆp critical using population parameters specified in H 0 : ˆp critical p 0 p0 (1 p 0 )/n = 1.96 ˆp critical 0.5 = 1.96 0.012 ˆp critical = 1.96 0.012 + 0.5 = 0.5235 ˆp critical = 1.96 0.012 + 0.5 = 0.4765 Rejection rule: Reject H 0 if ˆp > 0.5235 or ˆp < 0.4765 (Winter 2011) Estimation Lecture 13 24 / 33

(Winter 2011) Estimation Lecture 13 25 / 33

Standardized Critical Value Can use a standardized test-statistic and set up a standardized rejection region. Test-statistic - a random variable created using the sample statistic. Does not change the conclusion of the test Standardized test-statistic for testing p Z = ˆp p 0 p0 (1 p 0 )/n (Winter 2011) Estimation Lecture 13 26 / 33

Sampling Distribution of Z test statistic Sampling distribution of Z test statistic is standard normal for every problem Think carefully of why that must be true Assumption 1: the null hypothesis is true Assumption 2: the sample size is large enough for the rule of thumb to hold If Z statistic = 0, then Z statistic is exactly what is specified under the null hypothesis If Z statistic= -1 (or 1), then it is one standard deviation below (above) what is specified under the null hypothesis If Z statistic= -4 (or 4), then it is four standard deviation below (above) what is specified under the null hypothesis (Winter 2011) Estimation Lecture 13 27 / 33

Standardized Critical Value - Example What is? such that P(Z >?) = 0.05 Can be found directly from the Standard normal table:? = 1.645 Standardized value of test statistic is Z = ˆp p 0 0.88 0.5 = = 31.53 p0 (1 p 0 )/n 0.012 The null hypothesis is rejected if test-statistic>critical value 31.53 > 1.645 Reject H 0, accept H A (Winter 2011) Estimation Lecture 13 28 / 33

Less Extreme Example A poll of 100 randomly selected voters found 46 percent favoring candidate A and 54 percent favoring the opponent. Are these data sufficient to reject the null hypothesis at 5% significance level that the voters are evenly divided between the two candidates, or can it be reasonably attributed to sampling error? H 0 : p = 0.5 vs H A : p 0.5 P(ˆp >? H 0 ) = 0.025 and P(ˆp <? H 0 ) = 0.025 1.96 = ˆp critical 0.5 0.5 0.5/100 ˆp critical = 1.96 0.05 + 0.5 = 0.598 1.96 = ˆp critical 0.5 0.5 0.5/100 ˆp critical = 1.96 0.05 + 0.5 = 0.402 Can use 0.46 or 0.54 as ˆp or test-statistic Rejection region is ˆp < 0.402 and ˆp > 0.598 Conclusion: Fail to reject H 0 (Winter 2011) Estimation Lecture 13 29 / 33

(Winter 2011) Estimation Lecture 13 30 / 33

Less Extreme Example - Standardized Approach H 0 : p = 0.5 vs H A : p 0.5 P(Z >? H 0 ) = 0.025 and P(Z <? H 0 ) = 0.025 Z critical = 1.96, Z critical = 1.96 Rejection region is Z test statistic< 1.96 and Z test statistic> 1.96 Z test statistic= 0.46 0.5 0.05 = 0.8 Z test statistic= 0.54 0.5 0.05 = 0.8 Conclusion: Fail to reject H 0 (Winter 2011) Estimation Lecture 13 31 / 33

(Winter 2011) Estimation Lecture 13 32 / 33

Preview: A P-Value Approach A hypothesis test ask the question, If the null hypothesis is true, what is the probability that a random sample will yield a statistic whose value is so far from it s expected value? If this probability is very small, then we reject the null hypothesis by concluding that the discrepancy is too large to be explained by chance alone. If, on the other hand, the probability is not small, then we accept the null hypothesis by concluding that the observed discrepancy may well be due to chance, i.e. sampling error. (Winter 2011) Estimation Lecture 13 33 / 33