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

Similar documents
HYPOTHESIS TESTING: FREQUENTIST APPROACH.

14.30 Introduction to Statistical Methods in Economics Spring 2009

STAT 135 Lab 5 Bootstrapping and Hypothesis Testing

Chapters 10. Hypothesis Testing

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

Institute of Actuaries of India

STAT 135 Lab 7 Distributions derived from the normal distribution, and comparing independent samples.

Topic 15: Simple Hypotheses

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

Hypothesis Testing One Sample Tests

TUTORIAL 8 SOLUTIONS #

BTRY 4090: Spring 2009 Theory of Statistics

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

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

Lecture Testing Hypotheses: The Neyman-Pearson Paradigm

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

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

Central Limit Theorem ( 5.3)

F79SM STATISTICAL METHODS

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.

The Chi-Square Distributions

Topic 19 Extensions on the Likelihood Ratio

6.4 Type I and Type II Errors

7.2 One-Sample Correlation ( = a) Introduction. Correlation analysis measures the strength and direction of association between

Partitioning the Parameter Space. Topic 18 Composite Hypotheses

Chapters 10. Hypothesis Testing

Lecture 2: Basic Concepts and Simple Comparative Experiments Montgomery: Chapter 2

STT 843 Key to Homework 1 Spring 2018

STAT 830 Hypothesis Testing

EC2001 Econometrics 1 Dr. Jose Olmo Room D309

Fundamental Probability and Statistics

Frequentist Statistics and Hypothesis Testing Spring

Homework 7: Solutions. P3.1 from Lehmann, Romano, Testing Statistical Hypotheses.

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

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

Chapter 9: Hypothesis Testing Sections

Lecture 10: Generalized likelihood ratio test

Composite Hypotheses and Generalized Likelihood Ratio Tests

Stat 135, Fall 2006 A. Adhikari HOMEWORK 6 SOLUTIONS

18.05 Practice Final Exam

Lecture 21. Hypothesis Testing II

Example. χ 2 = Continued on the next page. All cells

STAT 4385 Topic 01: Introduction & Review

The Chi-Square Distributions

Inference and Regression

Summary of Chapters 7-9

STAT 830 Hypothesis Testing

simple if it completely specifies the density of x

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

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

Ch. 7. One sample hypothesis tests for µ and σ

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

Let us first identify some classes of hypotheses. simple versus simple. H 0 : θ = θ 0 versus H 1 : θ = θ 1. (1) one-sided

4.5.1 The use of 2 log Λ when θ is scalar

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

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

557: MATHEMATICAL STATISTICS II HYPOTHESIS TESTING: EXAMPLES

Visual interpretation with normal approximation

ORF 245 Fundamentals of Statistics Chapter 9 Hypothesis Testing

Psychology 282 Lecture #4 Outline Inferences in SLR

Exam 2 Practice Questions, 18.05, Spring 2014

Chapter 5: HYPOTHESIS TESTING

Statistics 135 Fall 2008 Final Exam

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

DATA IN SERIES AND TIME I. Several different techniques depending on data and what one wants to do

Statistics 3858 : Contingency Tables

Mathematical Statistics

STAT 135 Lab 2 Confidence Intervals, MLE and the Delta Method

The goodness-of-fit test Having discussed how to make comparisons between two proportions, we now consider comparisons of multiple proportions.

Hypothesis Testing: The Generalized Likelihood Ratio Test

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

Outline for Today. Review of In-class Exercise Bivariate Hypothesis Test 2: Difference of Means Bivariate Hypothesis Testing 3: Correla

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

INTERVAL ESTIMATION AND HYPOTHESES TESTING

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

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

Asymptotic Statistics-VI. Changliang Zou

ST495: Survival Analysis: Hypothesis testing and confidence intervals

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

Nuisance parameters and their treatment

Some General Types of Tests

z and t tests for the mean of a normal distribution Confidence intervals for the mean Binomial tests

2. What are the tradeoffs among different measures of error (e.g. probability of false alarm, probability of miss, etc.)?

STAT 801: Mathematical Statistics. Hypothesis Testing

Master s Written Examination - Solution

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

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

MATH4427 Notebook 2 Fall Semester 2017/2018

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

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

Probability & Statistics - FALL 2008 FINAL EXAM

Topic 21 Goodness of Fit

Chapter Eight: Assessment of Relationships 1/42

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

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

Lecture 21: October 19

Robustness and Distribution Assumptions

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

Confidence Intervals for Normal Data Spring 2014

Transcription:

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

The duality between CI and hypothesis testing

The duality between CI and hypothesis testing Recall that the acceptance region was the range of values of our test statistic for which H 0 will not be rejected at a certain level α. For example, suppose that we have a test that rejects the null hypothesis when our sample X 1,..., X n (where X i F θ ) satisfies n X i < 1.2 i=1 Then our acceptance region, A(θ 0 ), is the set of values of our test statistic (which in this case is n i=1 X i) that would not lead to a rejection of H 0 : θ = θ 0, i.e. { n } n A(θ 0 ) = X i X i 1.2 i=1 i=1

The duality between CI and hypothesis testing Assume that the true value of θ is actually θ 0 (i.e. that H 0 is true). Then a 100 (1 α) confidence interval corresponds to the values of θ for which the null hypothesis H 0 : θ = θ 0 is not rejected at significance level α. The CI sounds an awful lot like the acceptance region, right? What s the difference? the acceptance region is the set of values of the test statistic, T (X 1,..., X n ), for which we would not reject H 0 at significance level α. the 100 (1 α)% confidence interval is the set of values of the parameter θ for which we would not reject H 0.

Exercise

Exercise: The duality between CI and hypothesis testing Suppose that X 1 = x 1,..., X n = x 1, are such that X i N(µ, σ 2 ) with µ unknown and σ known. Show that the hypothesis test which tests H 0 : µ = µ 0 H 1 : µ µ 0 at significance level α corresponds to the confidence interval [ X z (1 α/2) σ n, X + z (1 α/2) σ n ]

Generalized likelihood ratio tests

Generalized likelihood ratio tests Recall that the Neyman-Pearson lemma told us that when our hypotheses are simple H 0 : θ = θ 0 H 1 : θ = θ 1 the likelihood ratio test has the highest power. Unfortunately there is no such theorem that tells us the optimal test when one of our hypotheses is composite: H 0 : θ = θ 0 H 1 : θ > θ 0, H 1 : θ < θ 0, H 1 : θ θ 0

Generalized likelihood ratio tests Suppose that observations X 1,..., X n have a joint density f (x θ). If our hypothesis is composite e.g. H 0 : θ 0 H 1 : θ > 0 then we can use a (non-optimal) generalization of the likelihood ratio test where the likelihood is evaluated at the value of θ that maximizes it.

Generalized likelihood ratio tests For our example (H 0 : θ 0), we consider a likelihood ratio test statistic of the form: max [lik(θ)] θ 0 Λ = max [lik(θ)] θ where, for technical reasons, the denominator maximizes the likelihood over all possible values of θ rather than just those under H 1.

Generalized likelihood ratio tests The generalized likelihood ratio test involves rejecting H 0 when Λ = max [lik(θ)] θ 0 max [lik(θ)] λ 0 θ for some threshold λ 0, chosen so that P(Λ λ 0 H 0 ) = α where α is the desired significance level of the test. In order to determine λ 0, however, we need to know the distribution of our test statistic, Λ, under the null hypothesis.

Generalized likelihood ratio tests It turns out that (under smoothness conditions on f (x θ)): Assuming that H 0 is true, then asymptotically 2 log(λ) χ 2 df df = #{ overall free parameters } #{ free parameters under H 0 }

Generalized likelihood ratio tests 2 log(λ) χ 2 df Thus, if F χ 2 k is the CDF of a χ 2 k random variable, α = P(Λ λ 0 ) = P( 2 log Λ 2 log λ 0 ) = 1 F χ 2 df ( 2 log λ 0 ) implying that we can find λ 0 by λ 0 = exp F 1 χ 2 df (1 α) 2 where F 1 (1 α) is the 1 α quantile of a χ 2 χ 2 df distribution df

Generalized likelihood ratio tests: degrees of freedom What s this degrees of freedom thing? df = #{ overall free parameters } #{ free parameters under H 0 } Suppose that we have a sample X 1,..., X n such that X i N(µ, σ 2 = 8), and we want to test the hypothesis Then: H 0 : µ < 0, H 1 : µ 0 Overall we have two parameters: µ and σ We have only one free parameter overall (we have specified σ 2 = 8, but made no assumptions on µ). We have no free parameters under H 0 (we have specified both µ < 0 and σ 2 = 8). Thus df = 1 0 = 1.

Pearson s χ 2 -test

Pearson s χ 2 -test Pearson s χ 2 test, often called the goodness-of-fit test, can be used to test the adequacy of a model to our data. For example, we can use this test to test the null hypothesis that the observed frequency distribution in a sample is consistent with a particular theoretical distribution. The chi-squared test statistic, X 2, is given by X 2 = n i=1 (O i E i ) 2 E i = n i=1 O 2 i E i N O i is an observed frequency E i is the expected (theoretical frequency) under the null hypothesis n is the number of groups in the table N is the sum of the observed frequencies

Pearson s χ 2 -test Under the null hypothesis, X 2 = n (O i E i ) 2 E i i=1 χ 2 n 1 dim(θ) where θ is our parameter of interest. Thus our p-value is given by p-value = P(χ 2 n 1 dim(θ) > X 2 )

Exercise

Exercise: Pearson s χ 2 -test (Rice, Chaper 9 exercise 42) 1. A student reported getting 9207 heads and 8743 tails in 17,950 coin tosses. Is this a significant discrepancy from the null hypothesis H 0 : p = 1 2? 2. To save time, the student had tossed groups of five coins at a time and had recorded the results: Number of Heads Frequency 0 100 1 524 2 1080 3 1126 4 655 5 105 Are the data consistent with the hypothesis that all the coins were fair (p = 1 2 )?

Q-Q plots

Normal Q-Q plots Normal Quantile-Quantile (Q-Q) plots: Graphically compare the quantiles of observed data (reflected by the ordered observations) to the theoretical quantiles from the normal distribution (can also do this for any other distribution). If the resultant plot looks like a straight line, then this implies that the observed data comes from a normal distribution. If the resultant plot does not look like a straight line, you could use it to figure out if the data comes from a distribution with heavier or lighter tails, or is skewed etc

Normal Q-Q plots

Exercise

Exercise: normal Q-Q plots Simulate 500 observations from the following distributions, and plot Q-Q plots t 2 Exponential(5) Normal(2, 3 2 ) Plot Q-Q plots and discuss the properties of these distributions.