Hypothesis Testing. Testing Hypotheses MIT Dr. Kempthorne. Spring MIT Testing Hypotheses

Similar documents
Lecture Testing Hypotheses: The Neyman-Pearson Paradigm

14.30 Introduction to Statistical Methods in Economics Spring 2009

6.4 Type I and Type II Errors

MIT Spring 2016

MIT Spring 2016

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

Partitioning the Parameter Space. Topic 18 Composite Hypotheses

F79SM STATISTICAL METHODS

STAT 830 Hypothesis Testing

MIT Spring 2015

Null Hypothesis Significance Testing p-values, significance level, power, t-tests

ORF 245 Fundamentals of Statistics Chapter 9 Hypothesis Testing

Hypothesis Testing - Frequentist

Compute f(x θ)f(θ) dθ

Comparison of Bayesian and Frequentist Inference

STAT 830 Hypothesis Testing

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

If there exists a threshold k 0 such that. then we can take k = k 0 γ =0 and achieve a test of size α. c 2004 by Mark R. Bell,

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

14.30 Introduction to Statistical Methods in Economics Spring 2009

MIT Spring 2016

hypothesis testing 1

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

Announcements. Proposals graded

(1) Introduction to Bayesian statistics

Frequentist Statistics and Hypothesis Testing Spring

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


Topic 15: Simple Hypotheses

40.530: Statistics. Professor Chen Zehua. Singapore University of Design and Technology

Statistical Preliminaries. Stony Brook University CSE545, Fall 2016

Choosing priors Class 15, Jeremy Orloff and Jonathan Bloom

Master s Written Examination - Solution

Chapter 7: Hypothesis Testing

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

Introduction to Statistics

Null Hypothesis Significance Testing p-values, significance level, power, t-tests Spring 2017

Mathematical Statistics

STA 732: Inference. Notes 2. Neyman-Pearsonian Classical Hypothesis Testing B&D 4

Hypothesis Testing Chap 10p460

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

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

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

Exam 2 Practice Questions, 18.05, Spring 2014

TUTORIAL 8 SOLUTIONS #

Design of Engineering Experiments

Basic Concepts of Inference

Chapter Three. Hypothesis Testing

STAT 135 Lab 5 Bootstrapping and Hypothesis Testing

Detection and Estimation Chapter 1. Hypothesis Testing

Bayesian Updating with Continuous Priors Class 13, Jeremy Orloff and Jonathan Bloom

Chapter 2. Binary and M-ary Hypothesis Testing 2.1 Introduction (Levy 2.1)

Topic 17 Simple Hypotheses

Institute of Actuaries of India

STAT 801: Mathematical Statistics. Hypothesis Testing

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

Classical and Bayesian inference

PhysicsAndMathsTutor.com

Statistics 135 Fall 2008 Final Exam

INTRODUCTION TO BAYESIAN METHODS II

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

Testing Simple Hypotheses R.L. Wolpert Institute of Statistics and Decision Sciences Duke University, Box Durham, NC 27708, USA

Continuous Data with Continuous Priors Class 14, Jeremy Orloff and Jonathan Bloom

Chapter 6. Hypothesis Tests Lecture 20: UMP tests and Neyman-Pearson lemma

Probability and Statistics. Terms and concepts

18.05 Final Exam. Good luck! Name. No calculators. Number of problems 16 concept questions, 16 problems, 21 pages

557: MATHEMATICAL STATISTICS II HYPOTHESIS TESTING: EXAMPLES

Hypothesis testing (cont d)

ECE531 Lecture 4b: Composite Hypothesis Testing

ST5215: Advanced Statistical Theory

Lecture notes on statistical decision theory Econ 2110, fall 2013

Detection theory 101 ELEC-E5410 Signal Processing for Communications

Statistical Inference

6.041/6.431 Fall 2010 Quiz 2 Solutions

Class 26: review for final exam 18.05, Spring 2014

ECE531 Lecture 6: Detection of Discrete-Time Signals with Random Parameters

Lecture 7. Bayes formula and independence

Conjugate Priors: Beta and Normal Spring January 1, /15

Lecture 9. Expectations of discrete random variables

Tests about a population mean

Probability and Statistics. Joyeeta Dutta-Moscato June 29, 2015

This does not cover everything on the final. Look at the posted practice problems for other topics.

Linear Models: Comparing Variables. Stony Brook University CSE545, Fall 2017

Lecture Slides - Part 1

Chapters 10. Hypothesis Testing

Detection theory. H 0 : x[n] = w[n]

Optimum Joint Detection and Estimation

Part III. A Decision-Theoretic Approach and Bayesian testing

Lecture 23. Random walks

Confidence Intervals for Normal Data Spring 2014

Bayesian Statistics. Debdeep Pati Florida State University. February 11, 2016

Summary of Chapters 7-9

Introduction to Statistical Inference

Unobservable Parameter. Observed Random Sample. Calculate Posterior. Choosing Prior. Conjugate prior. population proportion, p prior:

Non-parametric Inference and Resampling

ECE531 Screencast 11.4: Composite Neyman-Pearson Hypothesis Testing

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 3 9/10/2008 CONDITIONING AND INDEPENDENCE

Massachusetts Institute of Technology

Probability Intro Part II: Bayes Rule

P Values and Nuisance Parameters

Transcription:

Testing Hypotheses MIT 18.443 Dr. Kempthorne Spring 2015 1

Outline Hypothesis Testing 1 Hypothesis Testing 2

Hypothesis Testing: Statistical Decision Problem Two coins: Coin 0 and Coin 1 P(Head Coin 0) = 0.5 P(Head Coin 1) = 0.7 Choose one coin, toss it 10 times and report number of Heads Decide which coin was chosen. Hypothesis Testing Framework Data: X = number of heads in 10 tosses of coin Probability Model X Binomial(n = 10, prob = θ) =, n P(X = x θ) = θ x x (1 θ) n x, x = 0, 1,..., 10 Hypotheses: H 0 : θ = 0.5 H 1 : θ = 0.7 Specify a decision rule δ : δ(x ) Testing = 0 Hypotheses (H ) or 1 (H ) MIT 18.443 3

Outline Hypothesis Testing 1 Hypothesis Testing 4

Hypothesis Testing: to Hypothesis Testing Specify prior distribution on Hypotheses (θ) P(H 0 ) = P(θ = 0.5) = π 0 P(H 1 ) = P(θ = 0.7) = 1 π 0. Observe X = x (count of heads on 10 tosses), which specifies the likelihood function. =, n lik(θ) = P(X = x θ) = θ x (1 θ) x n x Compute posterior probabilities P(H 0 x) = P(H 0 x) P(H 0 )P(X = x H 0 ) = P(x) P(x) P(H 1 x) = P(H 1 x) P(H 1 )P(X = x H 1 ) = P(x) P(x) Note: P(x) = P(H 0 x) + P(H 1 x) (Law of Total Probability) Decision rule: δ(x) = 0 if P(H 0 x) > 1/2. 5

Decision Rule Based on Posterior Odds Ratio Posterior Odds Ratio: P(H 0 x) P(H 1 x) P(H 0 )P(X = x H 0 )/P(x) = P P(H 1 )P ( X = x P H 1 )/P(x) ( P(H 0 ) P(X = x H 0 ) = P(H 1 ) P(X = x H 1 ) = [Prior Odds] [Likelihood Ratio] P(H 0 x) Decision rule: δ(x) = 0 if > 1. P(H 1 x) Decision rule equivalent to δ(x) = 0 if [Likelihood Ratio] > c (= P(H 1 )/P(H 0 )) Likelihood Ratio measures evidence of x in favor of H 0 Stronger evidence Higher Likelihood Ratio (smaller x) 6

Bayes Decision Rules Hypothesis Testing Bayes Decision Rule: Given prior: P(H 0 ) = π 0 and P(H 1 ) = 1 π 0, Accept H 0 if P(H 1 ) (1 π 0 ) [Likelihood Ratio] > = P(H 0 ) π 0 Reject H 0 if P(H 1 ) (1 π 0 ) [Likelihood Ratio] = P(H 0 ) π 0 Example Cases: π 0 = 1/2: Accept H 0 if [Likelihood Ratio ] > 1 π 0 = 1/11: Accept H 0 if [Likelihood Ratio ] > 10. (Stronger evidence required to accept H 0 π 0 = 5/6: Accept H 0 if [Likelihood Ratio ] > 1/5. (H 0 accepted with weaker evidence) 7

Outline Hypothesis Testing 1 Hypothesis Testing 8

: Components Hypotheses Null Hypothesis: H 0. Alternative Hypothesis: H 1. Decision rule δ = δ(x ): accepts/rejects H 0 based on data X δ(x) = 0 (accept H 0 ) and δ(x) = 1 (reject H 0 ) Evaluate performance of decision rules using probabilities of two types of errors: Type I Error: Rejecting H 0 when H 0 is true. P(Type I Error) = P(δ = 1 H 0 ) Type II Error: Accepting H 0 when H 1 is true. P(Type II Error) = P(δ = 0 H 1 ) Optimal decision rule: Minimizes: P(Type II Error) Subject to: P(Type I Error) α where α : 0 < α < 1 is the significance level. 9

Consider Risk Set R R = {(x, y) : x = P(δ = 1 H 0 ), y = P(δ = 0 H 1 ), for a decision rule δ} Note that: R = {(x, y) : x = P(Type I Error for δ), y = P(Type II Error for δ), for a decision rule δ} The Risk Set R is convex on the space of all decision rules D = {δ} (including randomized decision rules) Apply convex optimization theory to solve for optimal δ using h(δ) = P(δ = 1 H 0 ) and g(δ) = P(δ = 0 H 1 ) Constrained Optimization: Minimize: g(δ), subject to: h(δ) α Unconstrained Optimization of Lagrangian: Minimize: q(δ, λ) = g(δ) + λ[h(δ) α] 10

Solving the Optimization: Fix λ and minimize q (δ) = g(δ) + λh(δ) for δ D For the solution δ, set K = q (δ ) The risk point for δ lies on the line {(x, y) : K = y + λx} which is equivalent to {(x, y) : y = K λx} δ corresponds to the tangent point of R with slope= λ. Specify λ to solve h(δ ) = α. If h(δ ) > α, then increase λ If h(δ ) < α, then decrease λ Nature of Solution: For given λ, the solution δ minimizes q (δ) = g (δ) + λh(δ) = P(δ = 0 H 1 ) + λp(δ = 1 H 0 ) = X [(1 g δ(x))f 1 (x) + λδ(x)f 0 (x)]dx = 1 + X [δ(x) [λf 0 (x) f 1 (x)]dx 11

Nature of Solution: For given λ, the solution δ minimizes q (δ) = g (δ) + λh(δ) = P(δ = 0 H 1 ) + λp(δ = 1 H 0 ) = X [(1 g δ(x))f 1 (x) + λδ(x)f 0 (x)]dx = 1 + X δ(x) [λf 0 (x) f 1 (x)]dx To minimize q (δ): Note that δ(x) : 0 δ(x) 1 for all tests δ Set δ (x) = 0 when [λf 0 (x) f 1 (x)] > 0 Set δ (x) = 1 when [λf 0 (x) f 1 (x)] < 0 The test δ accepts H 0, δ (x) = 0, when f 0 (x) > 1/λ f 1 (x) and rejects H 0, δ (x) = 1, when f 1 (x) > λ f 0 (x) The signficance level of δ is α = E [δ (X ) H 0 ] = P[f 1 (x)/f 0 (x) > λ H 0 ] MIT 18.443 Testing Hypotheses 12

Neyman-Pearson Lemma: H 0 and H 1 are simple hypotheses. Define the test δ of significance level α using the Likelihood Ratio: δ (X ) = 1 when LikelihoodRatio < c, and c is chosen such that: P(δ (X ) = 1 H 0 ) = α. Then δ is the most powerful test of size α. For any other test δ ' : If P(δ ' = 1 H 0 ) α, then P(δ ' (X ) = 1 H 1 ) P(δ (X ) = 1 H 1 ) Connection To Bayes Tests: Consider the Likelihood Ratio Test δ corresponding to c δ is the Bayes test corresponding to P(H 1 ) = c = 1/λ. P(H 0 ) 13

Additional Terminology The power of a test rule δ is β = P(reject H 1 H 1 ) = 1 P(Type II Error). The acceptance region of a test rule δ is {x : δ(x) = 0} The rejection region of a test rule δ is {x : δ(x) = 1} 14

Additional Terminology A test statistic T (X ) is often associated with a decision rule δ, e.g., T (X ) > t δ(x ) = 1 The distribution of T (X ) given H 0 is the null distribution. An hypothesis is a simple hypothesis if it completely specifies the distribution of X, and of T (X ). E.g., X f (x θ), θ Θ H 0 : θ = θ 0 (simple) H 1 : θ = θ 1 (simple) An hypothesis is a composite hypothesis if it does not completely specify the probability distribution. E.g., H 0 : X Poisson(θ) for some θ > 0. 15

Additional Terminology Uniformly Most Powerful Tests. Suppose H 0 : θ = θ 0 is simple H 1 : θ > θ 0 is composite (The value θ 0 is fixed and known.) If the most powerful level-α test of H 0 versus a simple alternative θ = θ 1 > θ 0 is the same for all alternatives θ 1 > θ 0, then it is the Uniformly Most Powerful Test of H 0 versus H 1. One-sided Alternative: H 1 : θ > θ 0, or, H 1 : θ < θ 0 Two-sided Alternative: H 1 : θ = θ 0 16

Outline Hypothesis Testing 1 Hypothesis Testing 17

Hypothesis Testing Neyman-Pearson Hypothesis-Testing Framework X f (x θ), θ Θ (pdf or pmf) Test Hypotheses: H 0 : θ = θ 0 versus an alternative H 1 (θ 0 is a fixed value, so H 0 is simple) Test Statistic: T (X ), defined so that large values are evidence against H 0 The rejection region is {x : T (X ) > t 0 } where t 0 is chosen to that P(T t 0 H 0 ) = α, (the significance level of test) Definition: Given X = x is observed, the P-value of the test statistic T (x) is P-Value = P(T (X ) > t(x) H 0 ). MIT 18.443 Testing Hypotheses 18

What Are: The P-Value is the smallest significance level at which H 0 would be rejected. The P-Value is the chance of observing evidence as extreme or more extreme than T (x) under the probability model of H 0. The P-Value measures how unlikely (surprising) the data are if H 0 is true. What Are Not: The P-value is not the probability H 0 is true. 19

MIT OpenCourseWare http://ocw.mit.edu 18.443 Statistics for Applications Spring 2015 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.