Topic 15: Simple Hypotheses

Similar documents
Topic 17: Simple Hypotheses

Topic 17 Simple Hypotheses

Partitioning the Parameter Space. Topic 18 Composite Hypotheses

Topic 19 Extensions on the Likelihood Ratio

Composite Hypotheses. Topic Partitioning the Parameter Space The Power Function

Lecture Testing Hypotheses: The Neyman-Pearson Paradigm

F79SM STATISTICAL METHODS

STAT 135 Lab 5 Bootstrapping and Hypothesis Testing

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

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

Hypothesis Testing Chap 10p460

Topic 10: Hypothesis Testing

Summary of Chapters 7-9

Chapters 10. Hypothesis Testing

Topic 10: Hypothesis Testing

Chapters 10. Hypothesis Testing

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

TUTORIAL 8 SOLUTIONS #

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

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

Hypothesis Testing: The Generalized Likelihood Ratio Test

STAT 830 Hypothesis Testing

simple if it completely specifies the density of x

Direction: This test is worth 250 points and each problem worth points. DO ANY SIX

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

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

SUFFICIENT STATISTICS

Stat 529 (Winter 2011) Experimental Design for the Two-Sample Problem. Motivation: Designing a new silver coins experiment

HYPOTHESIS TESTING: FREQUENTIST APPROACH.

6.4 Type I and Type II Errors

Spring 2012 Math 541B Exam 1

STAT 830 Hypothesis Testing

Topic 11: The Central Limit Theorem

Introductory Econometrics

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

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

STAT 801: Mathematical Statistics. Hypothesis Testing

Statistical Inference

A Very Brief Summary of Statistical Inference, and Examples

Ch. 5 Hypothesis Testing

Topic 12 Overview of Estimation

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

Nuisance parameters and their treatment

MATH5745 Multivariate Methods Lecture 07

Institute of Actuaries of India

ORF 245 Fundamentals of Statistics Chapter 9 Hypothesis Testing

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

Math 152. Rumbos Fall Solutions to Assignment #12

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

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

Basic Concepts of Inference

Chapter 7. Hypothesis Testing

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

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

Math 494: Mathematical Statistics

INTERVAL ESTIMATION AND HYPOTHESES TESTING

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

8: Hypothesis Testing

Topic 9 Examples of Mass Functions and Densities

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,

Visual interpretation with normal approximation

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

EC2001 Econometrics 1 Dr. Jose Olmo Room D309

Stat 135, Fall 2006 A. Adhikari HOMEWORK 6 SOLUTIONS

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

557: MATHEMATICAL STATISTICS II HYPOTHESIS TESTING: EXAMPLES

Parameter Estimation, Sampling Distributions & Hypothesis Testing

Chapter 3 - The Normal (or Gaussian) Distribution Read sections

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

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

Master s Written Examination - Solution


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

Some Asymptotic Bayesian Inference (background to Chapter 2 of Tanner s book)

Confidence Intervals and Hypothesis Tests

Mathematical Statistics

STAT 513 fa 2018 Lec 05

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

Lecture 21: October 19

Homework for 1/13 Due 1/22

Lecture 21. Hypothesis Testing II

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

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

Hypothesis testing (cont d)

Lecture 12 November 3

Hypothesis testing: theory and methods

Introduction to Machine Learning. Lecture 2

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

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

Slides for Data Mining by I. H. Witten and E. Frank

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

hypothesis testing 1

Lecture 8: Information Theory and Statistics

Master s Written Examination

Chapter 9: Hypothesis Testing Sections

Frequentist Statistics and Hypothesis Testing Spring

14.30 Introduction to Statistical Methods in Economics Spring 2009

Data Mining. Chapter 5. Credibility: Evaluating What s Been Learned

Comparison of Bayesian and Frequentist Inference

DA Freedman Notes on the MLE Fall 2003

Transcription:

Topic 15: November 10, 2009 In the simplest set-up for a statistical hypothesis, we consider two values θ 0, θ 1 in the parameter space. We write the test as H 0 : θ = θ 0 versus H 1 : θ = θ 1. H 0 is called the null hypothesis. H 1 is called the alternative hypothesis. The possible actions are: Reject the hypothesis. Rejecting the hypothesis when it is true is called a type I error or a false positive. Its probability α is called the size of the test or the significance level. Fail to reject the hypothesis. Failing to reject the hypothesis when it is false is called a type II error or a false negative, has probability β. The power of the test 1 β. H 0 is true H 1 is true reject H 0 type I error OK fail to reject H 0 OK type II error Given observations X, the rejection of the hypothesis is based on whether or not the data X lands in a critical region C. Thus, reject H 0 if and only if X C. Given a choice α for the size of the test, the choice of a critical region C is called best or most powerful if for any choice of critical region C for a size α test, and we have the lowest probability of a type II error, β β. β = P θ1 {X / C}, β = P θ1 {X / C }. (1) 1 The Neyman-Pearson Lemma The Neyman-Pearson lemma tell us that the best test for a simple hypothesis is a likelihood ratio test. Theorem 1 (Neyman-Pearson Lemma). Let L(θ x) denote the likelihood function for the random variable X corresponding to the probability measure P θ, θ Θ. If there exists a critical region C of size α and a nonnegative constant k such that L(θ 0 x) k for x C and then C is the most powerful critical region of size α. k for x / C, L(θ 0 x) 95

2 Examples Example 2. Let X = (X 1,..., X n ) be independent normal observations with unknown mean and known variance σ 2. The hypothesis is H 0 : µ = µ 0 versus H 1 : µ = µ 1. The likelihood ratio L(µ 1 x) L(µ 0 x) = The likelihood test is equivalent to 1 (x1 µ1)2 1 (xn µ1)2 2 2σ 2 2 2σ 2 1 (x1 µ0)2 1 (xn µ1)2 2 2σ 2 2 2σ 2 = 1 n 2σ 2 (x i µ 1 ) 2 1 n 2σ 2 (x i µ 0 ) 2 = 1 2σ 2 ( (xi µ 1 ) 2 (x i µ 0 ) 2) = µ 0 µ 1 2σ 2 (µ 1 µ 0 ) (2x i µ 1 µ 0 ) x i k 1, or for some k α, known as the critical value for the test statistic x x k α when µ 0 < µ 1 or x k α when µ 0 > µ 1. To determine k α, note that under the null hypothesis, X is N(µ0, σ 2 /n) and X µ 0 σ/ n is a standard normal. Set z α so that P {Z z α } = α. Then, for µ 0 < µ 1, X µ 0 + σ n z α = k α. For µ 1 < µ 0, we have X k α. Equivalently, we can use the standardized score Z as our test statistic and z α as the critical value. The power should increase as a function of µ 1 µ 0, decrease as a function of σ 2, and increase as a function of n. In this situation, the type II error probability, β = P µ1 {X / C} = P µ1 { X < µ 0 + σ 0 z α } n { X µ1 = P µ1 σ 0 / n < z α µ } ( 1 µ 0 σ 0 / = Φ z α µ ) 1 µ 0 n σ 0 / n For µ 0 = 10 and µ 1 = 5 and σ = 3. Consider the 16 observations and choose a level α = 0.05 test, then 96

dnorm(x, y 0, 0.25) 0.0 0.5 1.0 1.5 1.5 1.0 0.5 0.0 0.5 1.0 1.5 2.0 x dnorm(x, 0.75, y 0.25) 0.0 0.5 1.0 1.5 1.5 1.0 0.5 0.0 0.5 1.0 1.5 2.0 x Figure 1: Top graph: Density of X for normal data under the null hypothesis - µ = 0 and σ/ n = 0.25. With an α = 0.05 level test, the critical value k α = 0.4112. The area to the right of the red line and below the density function is α. Bottom graph: Density of X for normal data under the alternative hypothesis. µ = 3/4 and σ/ n = 0.25. The probability of a type II error is β = 0.0877. The area to the left of the red line and below the density function is β. 97

> qnorm(0.05) [1] -1.644854 Thus the critical value is z α = 1.645 for the test statistic Z. Not let s look at the data. > x [1] 8.887753 2.353184 12.123175 10.020566 9.247956 3.711350 [7] 13.907150 9.079790 8.826202 6.288765 12.120783 10.994228 [13] 12.522522 4.529421 8.191806 10.195854 > mean(x) [1] 8.937532 Then 8.937 10 3/ = 1.417. 16 z α = 1.645 > 1.417 and we fail to reject the null hypothesis. To compute the probability of a type II error, note that for α = 0.05, >> pnorm(-5.022) [1] 2.556809e-07 z α µ 1 µ 0 σ 0 / n = 1.645 5 3/ 16 = 5.022 This is called the z-test. If n is sufficiently large, the even if the data are not normally distributed, X is well approximated by a normal distribution and, as long as the variance σ 2 is known, the z-test is used in this case. In addition, the z-test can be used when g( X 1,..., X n ) can be approximated by a normal distribution using the delta method. Example 3 (Bernoulli trials). Here X = (X 1,..., X n ) is a sequence of Bernoulli trials with unknown success probability θ, the likelihood ( ) x1+ +x θ n L(θ x) = (1 θ) n. 1 θ For the test the likelihood ratio L(θ 0 x) = H 0 : θ = θ 0 versus H 1 : θ = θ 1 ( ) n (( 1 θ1 θ1 1 θ 0 Consequently, the test is to reject H 0 whenever 1 θ 1 ) / ( θ0 1 θ 0 )) x1+ +x n x i k α when θ 0 < θ 1 or x i k α when θ 0 > θ 1. Note that under H 0, n X i has a Bin(n, θ) distribution. Thus, in the case θ 0 < θ 1, we choose k α so that k=k α ( ) n θ k k 0(1 θ 0 ) n k α. (6) In genreal, we cannot choose k α to obtain the sum α. Thus, we take the minimum value of k α to achieve the inequality in (6). 98

If nθ 0 is sufficiently large, then, by the central limit theorem, n X i has a normal distribution. If we standardize X θ 0 θ0 (1 θ 0 )/n is approximately a standard normal random variable and we perform the z-test as in the previous exercise. For example, if we take θ 0 = 1/2 and θ 1 > 1/2 and α = 0.05, then with 60 heads in 100 coin tosses > qnorm(0.95) [1] 1.644854 0.60 0.50 0.05 = 2. Thus, z 0.05 = 1.645 < 2 and we reject the null hypothesis. Example 4. Now consider the hypotheses H 0 : p = 0.7 versus H 1 : p = 0.8. for a test of the probability that a feral bee hive survives a winter. The test statistic is X p p(1 p)/n and for an α level test, the critical value is z α where α is the probability that a standard normal is at least z α For this study, 112 colonies have been chosen and 88 survive. Thus X = 0.7875 and 1.979. If the significance level is α = 0.05, then we will reject H 0. If, instead, we collect our data over two years, and use g( X) = X as our test statistic, then using the delta method, we have g( X) g(q) g (q) q(1 q)/n = X q 1/(2 q) q(1 q)/n = X q (1 q)/4n with q = p 2 = 0.49 under the null hypothesis. Thus, if 61 hives survive two years, 1.1262 and we fail to reject H 0. 99