Chapters 10. Hypothesis Testing

Similar documents
Chapters 10. Hypothesis Testing

STAT 135 Lab 6 Duality of Hypothesis Testing and Confidence Intervals, GLRT, Pearson χ 2 Tests and Q-Q plots. March 8, 2015

Topic 15: Simple Hypotheses

Hypothesis Testing Chap 10p460

Lecture Testing Hypotheses: The Neyman-Pearson Paradigm

Economics 520. Lecture Note 19: Hypothesis Testing via the Neyman-Pearson Lemma CB 8.1,

Hypothesis Testing. 1 Definitions of test statistics. CB: chapter 8; section 10.3

exp{ (x i) 2 i=1 n i=1 (x i a) 2 (x i ) 2 = exp{ i=1 n i=1 n 2ax i a 2 i=1

Hypothesis Test. The opposite of the null hypothesis, called an alternative hypothesis, becomes

4 Hypothesis testing. 4.1 Types of hypothesis and types of error 4 HYPOTHESIS TESTING 49

STAT 830 Hypothesis Testing

Statistics Ph.D. Qualifying Exam: Part I October 18, 2003

Master s Written Examination - Solution

Exam 2 Practice Questions, 18.05, Spring 2014

ORF 245 Fundamentals of Statistics Chapter 9 Hypothesis Testing

STAT 830 Hypothesis Testing

Summary of Chapters 7-9

The University of Hong Kong Department of Statistics and Actuarial Science STAT2802 Statistical Models Tutorial Solutions Solutions to Problems 71-80

Hypothesis testing (cont d)

Statistics 135 Fall 2008 Final Exam

STAT 801: Mathematical Statistics. Hypothesis Testing

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

simple if it completely specifies the density of x

6.4 Type I and Type II Errors

Institute of Actuaries of India

Hypothesis Testing. BS2 Statistical Inference, Lecture 11 Michaelmas Term Steffen Lauritzen, University of Oxford; November 15, 2004

Two hours. To be supplied by the Examinations Office: Mathematical Formula Tables THE UNIVERSITY OF MANCHESTER. 21 June :45 11:45

Problems ( ) 1 exp. 2. n! e λ and

STAT 135 Lab 5 Bootstrapping and Hypothesis Testing

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

HYPOTHESIS TESTING: FREQUENTIST APPROACH.

Cherry Blossom run (1) The credit union Cherry Blossom Run is a 10 mile race that takes place every year in D.C. In 2009 there were participants

F79SM STATISTICAL METHODS

Nuisance parameters and their treatment

Hypothesis Testing: The Generalized Likelihood Ratio Test

Introduction to Statistical Data Analysis Lecture 7: The Chi-Square Distribution

Probability & Statistics - FALL 2008 FINAL EXAM

Partitioning the Parameter Space. Topic 18 Composite Hypotheses

McGill University. Faculty of Science. Department of Mathematics and Statistics. Part A Examination. Statistics: Theory Paper

Solution: First note that the power function of the test is given as follows,

Chapters 9. Properties of Point Estimators

Stat 579: Generalized Linear Models and Extensions

Frequentist Statistics and Hypothesis Testing Spring

Methods for Statistical Prediction Financial Time Series I. Topic 1: Review on Hypothesis Testing

Hypothesis Testing. A rule for making the required choice can be described in two ways: called the rejection or critical region of the test.

14.30 Introduction to Statistical Methods in Economics Spring 2009

Topic 19 Extensions on the Likelihood Ratio

Epidemiology Wonders of Biostatistics Chapter 11 (continued) - probability in a single population. John Koval

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

DA Freedman Notes on the MLE Fall 2003

Ch. 5 Hypothesis Testing

BEST TESTS. Abstract. We will discuss the Neymann-Pearson theorem and certain best test where the power function is optimized.

Stat 135, Fall 2006 A. Adhikari HOMEWORK 6 SOLUTIONS

Chapter 9: Hypothesis Testing Sections

Chapter 10. Hypothesis Testing (I)

LECTURE 10: NEYMAN-PEARSON LEMMA AND ASYMPTOTIC TESTING. The last equality is provided so this can look like a more familiar parametric test.

Lecture 12 November 3

TUTORIAL 8 SOLUTIONS #

Mathematical Statistics

1. Let A be a 2 2 nonzero real matrix. Which of the following is true?

Section 9.4. Notation. Requirements. Definition. Inferences About Two Means (Matched Pairs) Examples

Hypothesis testing: theory and methods

Lecture 16 November Application of MoUM to our 2-sided testing problem

Hypothesis Tests Solutions COR1-GB.1305 Statistics and Data Analysis

Statistical Data Analysis Stat 3: p-values, parameter estimation

Recall that in order to prove Theorem 8.8, we argued that under certain regularity conditions, the following facts are true under H 0 : 1 n

Statistics for Managers Using Microsoft Excel

j=1 π j = 1. Let X j be the number

Final Exam. 1. (6 points) True/False. Please read the statements carefully, as no partial credit will be given.

Math 494: Mathematical Statistics

Physics 403. Segev BenZvi. Classical Hypothesis Testing: The Likelihood Ratio Test. Department of Physics and Astronomy University of Rochester

Non-parametric Inference and Resampling

Summary: the confidence interval for the mean (σ 2 known) with gaussian assumption

Chapter 8 - Statistical intervals for a single sample

Hypothesis Testing One Sample Tests

Topic 10: Hypothesis Testing

Lecture 8: Information Theory and Statistics

Ling 289 Contingency Table Statistics

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

Definition 3.1 A statistical hypothesis is a statement about the unknown values of the parameters of the population distribution.

CHI SQUARE ANALYSIS 8/18/2011 HYPOTHESIS TESTS SO FAR PARAMETRIC VS. NON-PARAMETRIC

18.05 Practice Final Exam

Statistics. Statistics

Chapter 7: Hypothesis Testing

Introduction 1. STA442/2101 Fall See last slide for copyright information. 1 / 33

Topic 10: Hypothesis Testing

Contents. 22S39: Class Notes / October 25, 2000 back to start 1

557: MATHEMATICAL STATISTICS II HYPOTHESIS TESTING: EXAMPLES

This exam contains 13 pages (including this cover page) and 10 questions. A Formulae sheet is provided with the exam.

Fundamental Probability and Statistics

Introductory Econometrics

Section 6.2 Hypothesis Testing

KDF2C QUANTITATIVE TECHNIQUES FOR BUSINESSDECISION. Unit : I - V

Statistical Theory 1

Review. December 4 th, Review

Courtesy of Jes Jørgensen

MISCELLANEOUS TOPICS RELATED TO LIKELIHOOD. Copyright c 2012 (Iowa State University) Statistics / 30

Advanced Herd Management Probabilities and distributions

Statistical Methods for Particle Physics Lecture 2: statistical tests, multivariate methods

Exam 2 (KEY) July 20, 2009

Transcription:

Chapters 10. Hypothesis Testing

Some examples of hypothesis testing 1. Toss a coin 100 times and get 62 heads. Is this coin a fair coin? 2. Is the new treatment on blood pressure more effective than the old one? 3. Sex discrimination? A female pharmacist at Lagranze Phar. filed lawsuit against the company, complaining of sex discrimination. The data contains 2 females and 24 males. Months to Promotion F 453 229 M 47 192 14 12 14 5 37 7 68 483 34 19 25 125 34 22 25 64 14 23 21 67 47 24 The data is re-organized in terms of ranks, from shortest to longest. Months to Promotion Rank 1 2 3 4 5 6 7 8 9 10 11 12 13 Sex M M M M M M M M M M M M M Rank 14 15 16 17 18 19 20 21 22 23 24 25 26 Sex M M M M M M M M M M F F M

Basic setup of hypothesis testing Population parameters of interest θ (unknown). Samples collected from experiment or observation {X 1, X 2,..., X n }. Hypothesis Testing. 1. Null Hypothesis and Alternative Hypothesis. H 0 : θ Θ 0, H a : θ Θ a. For example H 0 : θ = 0.5, H a : θ 0.5 H 0 : θ = 0.5, H a : θ > 0.5 H 0 : θ < 1, H a : θ > 2 2. Test statistics a function of the samples, say T = T (X 1, X 2,..., X n ). 3. Rejection region (RR). (a) When T RR, reject H 0 and accept H a. (b) When T RR, accept H 0.

Type I error, Type II error and Power of a test Consider the simple hypotheses H 0 : θ = θ 0, H a : θ = θ 1, where θ 0, θ 1 are given constants. 1. Type I error. α =. P (Reject H 0 H 0 is true) = P (T RR θ = θ 0 ) 2. Type II error. β =. P (Accept H 0 H a is true) = P (T RR θ = θ 1 ) 3. Power. P (Reject H 0 H a is true) = 1 β.

Example Consider the following hypothesis testing. X 1, X 2,..., X n are iid from N(µ, 1). H 0 : µ = 0, H a : µ = 1. Suppose T = X and the rejection region is RR =. {x : x > 0.5}. 1. Type I error: α = P ( X > 0.5 µ = 0) = P ( n X > 0.5 n) = Φ( 0.5 n). 2. Type II error: β = P ( X 0.5 µ = 1) = P ( n[ X 1] 0.5 n) = Φ( 0.5 n). 3. Power: 1 β = 1 Φ( 0.5 n) = Φ(0.5 n).

Remark: 1. The ideal scenario is that both α and β are small. But α and β are in conflict. 2. Increasing the sample size will reduce both α and β, and increase the power the test. 3. Type I error is more often called the significance level of the test. 4. When θ 0 and θ 1 are closer, the power of the test will decrease. 5. Usually we are looking for sufficient evidence to reject H 0. Thus type I error is more important than the type II error. Consequently, one usually control the type I error below some pre-assigned small threshold, and then, subject to this control, look for a test which maximize the power (or minimize the type II error).

Remark: All the previous definitions and discussions extend to composite hypotheses H 0 : θ Θ 0, H a : θ Θ a, where 1. Type I error: for θ 0 Θ 0, 2. Type II error: for θ a Θ a, α(θ 0 ) = P (T RR θ = θ 0 ) β(θ a ) = P (T RR θ = θ a ) 3. Power = 1 β(θ a ).

Testing the mean of normal distribution Suppose X 1, X 2,..., X n are iid from N(µ, σ 2 ) with σ 2 known but µ unknown. Consider the following types of one-sided tests and two-sided test. In all three cases, the test statistics is [1]. H 0 : µ = µ 0, H a : µ > µ 0 [2]. H 0 : µ = µ 0, H a : µ < µ 0 [3]. H 0 : µ = µ 0, H a : µ µ 0 T = X = 1 n (X 1 + X 2 + + X n ). We also assume that the type I error (significance level) is fixed to be a preassigned small number α (usually α = 0.05).

[1]. H 0 : µ = µ 0, H a : µ > µ 0 The rejection region is of the form for some k. RR = { X > k} Determine k. α = Type I error = P ( X > k µ = µ 0 ). But X is N(µ, σ 2 /n). Therefore k = µ 0 + σ n z α = µ 0 + σ Xz α.

[2]. H 0 : µ = µ 0, H a : µ < µ 0 The rejection region is of the form for some k. RR = { X < k} Determine k. α = Type I error = P ( X < k µ = µ 0 ). k = µ 0 σ n z α = µ 0 σ Xz α..

[3]. H 0 : µ = µ 0, H a : µ µ 0 The rejection region is of the form RR = { X < k 1 } { X > k 2 } for some k. Determine k. α = Type I error = P ( X < k 1 µ = µ 0 ) + P ( X > k 2 µ = µ 0 ). Symmetry. k 1 = µ 0 σ n z α/2 = µ 0 σ Xz α/2 k 2 = µ 0 + σ n z α/2 = µ 0 + σ Xz α/2.

Example 1. National student exam scores are distributed as N(500, 100 2 ). In a classroom of 25 freshmen, the mean score was 472. Is the freshmen of below average performance? (Consider different cases with the significance level α = 0.1, 0.05, 0.01) Reject H 0 at level α = 0.1, Accept H 0 at level α = 0.05, 0.01.

2. In a two-sided test of H 0 : µ = 80 in a normal population with σ = 15, an investigator reported that since X = 71.9, the null hypothesis is rejected at 1% level. What can we say about the sample sized used? n 23

Extension to Large Sample Tests The test for normal distributions easily extend to large sample tests where the test statistics ˆθ is approximately N(θ, σˆθ). and the hypotheses are H 0 : θ = θ 0, H a : θ > θ 0 H 0 : θ = θ 0, H a : θ < θ 0 H 0 : θ = θ 0, H a : θ θ 0

Examples In all these examples, the significance level is assumed to be α = 0.05. 1. Toss coin 100 times, and get 33 heads. Is this a fair coin?

2. Do indoor cats live longer than wild cats? Cats Sample size Mean age Sample Std Indoor 64 14 4 Wild 36 10 5

3. In order to test if there is any significant difference between opinions of males and females on abortion, independent random samples of 100 males and 150 females were taken. Sex Sample size Favor Oppose Male 100 52 48 Female 150 95 55

P-value P-value: The probability of getting an outcome as extreme or more extreme than the actually observed data (under the assumption that the null hypothesis is true). Remark: Given a significance level α, 1. If P-value α, reject the null hypothesis. 2. If P-value > α, accept the null hypothesis.

Redo all the previous examples to find P-value.

Sample Size Suppose the population distribution is N(µ, σ 2 ) with σ 2 known. Consider the test H 0 : µ = µ 0, H a : µ > µ 0. Pick a sample size so that the type I error is bounded by α and the type II error is bounded by β when µ = µ a. n [ (zα + z β )σ µ a µ 0 ] 2

Remark: The same argument extends to large sample testing. In particular, the binomial setting. Suppose X 1, X 2,..., X n are iid Bernoulli with P (X i = 1) = p = 1 P (X i = 0). Consider the test H 0 : p = p 0, H a : p > p 0. Pick a sample size so that the type I error is bounded by α and the type II error is bounded by β when p = p a. n [ ] 2 z α p0 (1 p 0 ) + z β pa (1 p a ) p a p 0

Examples 1. Suppose it is required to test population mean H 0 : µ = 5, H a : µ > 5 at level α = 0.05 such that type II error is at most 0.05 when true µ = 6. How large should the sample be when σ = 4.

2. How many tosses of a coin should be made in order to test H 0 : p = 0.5, H a : p > 0.5 at level α = 0.5 and when true p = 0.6 type II error is 0.1?

Neyman-Pearson Lemma Suppose {X 1, X 2,..., X n } are iid samples with common density f(x; θ). Consider the following simple hypotheses. H 0 : θ = θ 0, H a : θ = θ a. Question: Among all the possible rejection regions RR such that the type I error satisfies P (RR θ = θ 0 ) α with α pre-specified, which RR gives the maximal power (or minimal type II error)?

Neyman-Pearson Lemma. Define for each k RR k. = {(x 1, x 2,..., x n ) : Suppose there is a k such that } f(x 1, θ 0 )f(x 2, θ 0 ) f(x n, θ 0 ) f(x 1, θ a )f(x 2, θ a ) f(x n, θ a ) k. P (RR k θ = θ 0 ) = α, then RR k attains the maximal power among all tests whose type I error are bounded by α.

Examples 1. Consider the following test for density f. { 1, 0 < x < 1, H 0 : f(x) =, H 0, elsewhere a : f(x) = { 2x, 0 < x < 1, 0, elsewhere Find the most powerful test at significance level α based on a single observation..

2. Suppose X 1, X 2,..., X n are iid N(µ, σ 2 ) with σ 2 known. We wish to test H 0 : µ = 0, H a : µ = θ (θ < 0) Find the most powerful test at significance level α.

Remark: What can we say about the test H 0 : µ = 0, H a : µ < 0. Remark: What can we say about the test H 0 : µ = 0, H a : µ 0.

3. Let X has density Consider test f(x, θ) = with significance level α. { 2θx + 2(1 θ)(1 x), 0 < x < 1, 0, elsewhere H 0 : θ = 0, H a : θ = 1

Likelihood ratio test The general form of likelihood ratio test H 0 : θ Θ 0, H a : θ Θ a The test statistics where Θ = Θ 0 Θ a. Rejection region {λ k} for some k. λ. = max θ Θ 0 L(x 1, x 2,..., x n ; θ) max θ Θ L(x 1, x 2,..., x n ; θ) Remark: Θ 0 and Θ a may contain nuisance parameters. And 0 λ 1.

Example 1. Suppose Y 1, Y 2,..., Y n are iid samples from Bernoulli with parameter p. H 0 : p = p 0, H a : p > p 0.

2. Suppose Y 1, Y 2,..., Y n are iid samples from N(µ, σ 2 ). µ and σ 2 are both unknown. We want to test H 0 : µ = µ 0, H a : µ > µ 0. Find the appropriate likelihood ratio test.

Large sample distribution of λ Theorem: When n is large, the distribution 2 ln(λ) under H 0 is approximately χ 2 with degree of freedom equal number of free parameters in Θ number of free parameters in Θ 0. The Rejection region with significance level α is just { 2 ln(λ) χ 2 α}.