Section 6.2 Hypothesis Testing

Similar documents
Hypothesis tests

CHAPTER 9: HYPOTHESIS TESTING

The Purpose of Hypothesis Testing

Statistical Inference. Why Use Statistical Inference. Point Estimates. Point Estimates. Greg C Elvers

the amount of the data corresponding to the subinterval the width of the subinterval e x2 to the left by 5 units results in another PDF g(x) = 1 π

CONTINUOUS RANDOM VARIABLES

Relating Graph to Matlab

Single Sample Means. SOCY601 Alan Neustadtl

COSC 341 Human Computer Interaction. Dr. Bowen Hui University of British Columbia Okanagan

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

MTH4451Test#2-Solutions Spring 2009

Review. A Bernoulli Trial is a very simple experiment:

Probability and Probability Distributions. Dr. Mohammed Alahmed

Lecture 26 Section 8.4. Wed, Oct 14, 2009

20 Hypothesis Testing, Part I

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

Math 101: Elementary Statistics Tests of Hypothesis

POLI 443 Applied Political Research

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

Homework Exercises. 1. You want to conduct a test of significance for p the population proportion.

Hypothesis Testing and Confidence Intervals (Part 2): Cohen s d, Logic of Testing, and Confidence Intervals

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

Statistics 100A Homework 5 Solutions

Inferential Statistics

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

41.2. Tests Concerning a Single Sample. Introduction. Prerequisites. Learning Outcomes

Statistics for IT Managers

Statistical Inference: Uses, Abuses, and Misconceptions

Chapter 7: Hypothesis Testing - Solutions

EXAM 3 Math 1342 Elementary Statistics 6-7

THE SAMPLING DISTRIBUTION OF THE MEAN

ACM 116: Lecture 2. Agenda. Independence. Bayes rule. Discrete random variables Bernoulli distribution Binomial distribution

Random Variables. Definition: A random variable (r.v.) X on the probability space (Ω, F, P) is a mapping

PSY 305. Module 3. Page Title. Introduction to Hypothesis Testing Z-tests. Five steps in hypothesis testing

HYPOTHESIS TESTING. Hypothesis Testing

5 Basic Steps in Any Hypothesis Test

Discrete Probability Distributions

How do we compare the relative performance among competing models?

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

Chapter 7: Section 7-1 Probability Theory and Counting Principles

PSY 216. Assignment 9 Answers. Under what circumstances is a t statistic used instead of a z-score for a hypothesis test

We know from STAT.1030 that the relevant test statistic for equality of proportions is:

Discrete probability distributions

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

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

STAT100 Elementary Statistics and Probability

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

Lecture Notes. Here are some handy facts about the probability of various combinations of sets:

CHAPTER 10 HYPOTHESIS TESTING WITH TWO SAMPLES

STAT 515 fa 2016 Lec Statistical inference - hypothesis testing

The Components of a Statistical Hypothesis Testing Problem

Sample Size and Power I: Binary Outcomes. James Ware, PhD Harvard School of Public Health Boston, MA

Chapters 10. Hypothesis Testing

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

Swarthmore Honors Exam 2012: Statistics

Random Variables Example:

Introduction to Statistical Data Analysis Lecture 4: Sampling

Tests about a population mean

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

Stat 2300 International, Fall 2006 Sample Midterm. Friday, October 20, Your Name: A Number:

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

Chapter 3 Probability Distribution

Chapters 10. Hypothesis Testing

DSST Principles of Statistics

Ch. 7: Estimates and Sample Sizes

Lecture 14. Analysis of Variance * Correlation and Regression. The McGraw-Hill Companies, Inc., 2000

Lecture 14. Outline. Outline. Analysis of Variance * Correlation and Regression Analysis of Variance (ANOVA)

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

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 20

Power Analysis. Introduction to Power

The point value of each problem is in the left-hand margin. You must show your work to receive any credit, except in problem 1. Work neatly.

MAT 2379, Introduction to Biostatistics, Sample Calculator Questions 1. MAT 2379, Introduction to Biostatistics

STAT 285 Fall Assignment 1 Solutions

STAT Chapter 13: Categorical Data. Recall we have studied binomial data, in which each trial falls into one of 2 categories (success/failure).

Table of z values and probabilities for the standard normal distribution. z is the first column plus the top row. Each cell shows P(X z).

Each trial has only two possible outcomes success and failure. The possible outcomes are exactly the same for each trial.

Chapter 10. Correlation and Regression. McGraw-Hill, Bluman, 7th ed., Chapter 10 1

Business Statistics. Chapter 6 Review of Normal Probability Distribution QMIS 220. Dr. Mohammad Zainal

A proportion is the fraction of individuals having a particular attribute. Can range from 0 to 1!

Discrete distribution. Fitting probability models to frequency data. Hypotheses for! 2 test. ! 2 Goodness-of-fit test

Interpret Standard Deviation. Outlier Rule. Describe the Distribution OR Compare the Distributions. Linear Transformations SOCS. Interpret a z score

Dover- Sherborn High School Mathematics Curriculum Probability and Statistics

Two Sample Problems. Two sample problems

Chapter 9 Inferences from Two Samples

Chapter 12: Inference about One Population

Hypothesis Testing. ECE 3530 Spring Antonio Paiva

AIM HIGH SCHOOL. Curriculum Map W. 12 Mile Road Farmington Hills, MI (248)

PhysicsAndMathsTutor.com

INTERVAL ESTIMATION AND HYPOTHESES 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:

Lab #12: Exam 3 Review Key

Chapter 7: Hypothesis Testing

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

Chapter # classifications of unlikely, likely, or very likely to describe possible buying of a product?

Inferential statistics

Multiple t Tests. Introduction to Analysis of Variance. Experiments with More than 2 Conditions

Chapter IR:VIII. VIII. Evaluation. Laboratory Experiments Performance Measures Training and Testing Logging


Chi-Squared Tests. Semester 1. Chi-Squared Tests

MAE Probability and Statistical Methods for Engineers - Spring 2016 Final Exam, June 8

Transcription:

Section 6.2 Hypothesis Testing GIVEN: an unknown parameter, and two mutually exclusive statements H 0 and H 1 about. The Statistician must decide either to accept H 0 or to accept H 1. This kind of problem is a problem of Hypothesis Testing. A procedure for making a decision is called a test procedure or simply a test. H 0 =Null Hypothesis H 1 = Alternative Hypothesis. 102

Example To study effectiveness of a gasoline additive on fuel efficiency, 30 cars are sent on a road trip from Boston to LA. Without the additive, the fuel efficiency average is = 25.0 mpg with a standard deviation =2.4. The test cars averaged y=26.3 mpg with the additive. What should the company conclude? ANSWER: Consider the hypotheses H 0 : = 25:0 Additive is not effective. H 1 : > 25:0 Additive is effective. It is reasonable to consider a value y to compare with the sample mean y, so that H 0 is accepted or not depending on whether y < y or not. 103

For sake of discussion, suppose y = 25:25 is s.t. H 0 rejected if y > y is Question: P ( reject H 0 j H 0 is true ) =? We have, P ( reject H 0 j H 0 is true ) = P (Y 25:25 j = 25:0) = P ( Y 25:0 2:4= p 30 ) 25:25 25:0 2:4= p 30 = P (Z 0:57) = 0:2843 104

FIGURE 6.2.2 105

Let us make y larger,say Y = 26:25 Question: P ( reject H 0 j H 0 is true ) =? We have, P ( reject H 0 j H 0 is true ) = P (Y 26:25 j = 25:0) = P ( Y 25:0 2:4= p 30 ) 26:25 25:0 2:4= p 30 = P (Z 2:85) = 0:0022 106

FIGURE 6.2.3 107

WHAT TO USE FOR y? In practice, people often use In our case, we may write P ( reject H 0 j H 0 is true ) = 0:05 P (Y y j H 0 is true ) = 0:05 ( ) Y 25:0 =) P 2:4= p 30 y 25:0 2:4= p 30 ( =) P Z y ) 25:0 2:4= p = 0:05 30 = 0:05 From the Std. Normal table: P (Z 1:64) = 0:05. Then, y 25:0 2:4= p 30 = 0:05 =) y = 25:718 108

Simulation p. 369, TABLE 6.2.1 109

Some Definitions The random variable Y 25:0 2:4= p 30 has a standard normal distribution. The observed z-value is what you get when a particular y is substituted for Y : y 25:0 2:4= p 30 = observed z-value A Test Statistic is any function of the observed data that dictates whether H 0 is accepted or rejected. The Critical Region is the set of values for the test statistic that result in H 0 being rejected. The Critical Value is a number that separates the rejection region from the acceptance region. 110

Example In our gas mileage example, both Y and Y 25:0 2:4= p 30 are test statistics, with corresponding critical regions (respectively) C = fy : y 25:718g and C = fz : z 1:64g and critical values 25:718 and 1:64. Definition 6.2.2 The Level of Significance is the probability that the test statistic lies in the critical region when H 0 is true. In previous slide we used 0:05 as level of significance. 111

One Sided vs. Two Sided Alternatives In our fuel efficiency example, we had a one sided alternative, specifically, one sided to the right (H 1 : > 0 ). In some situations the alternative hypothesis could be taken as one-sided to the left (H 1 : < 0 ) or as two sided (H 1 : 6= 0 ). Note that, in two sided alternative hypothesis, the level of significance must be split into two parts corresponding to each one of the two pieces of the critical region. In our fuel example, if we had used a two sided H 1, then each half of the critical region has 0.025 associated probability, with P (Z 1:96) = 0:025. This leads to H 0 : = 0 to be rejected if the observed z satisfies z 1:96 or z 1:96. 112

Testing 0 with known : Theorem 6.2.1 Let Y 1 ; Y 2 ; : : : ; Y n be a random sample of size n taken from a normal distribution where is known, and let z = Y 0 = p n Test Signif. level Action H 0 : = 0 H 1 : > 0 Reject H 0 if z z H 0 : = 0 H 1 : < 0 Reject H 0 if z z H 0 : = 0 H 1 : 6= 0 Reject H 0 if z z =2 or z z =2 113

FIGURE 6.2.4 114

Example 6.2.1 Bayview HS has a new Algebra curriculum. In the past, Bayview students would be considered typical, earning SAT scores consistent with past and current national averages (national averages are mean = 494 and standard deviation 124). Two years ago a cohort of 86 student were assigned to classes with the new curriculum. Those students averaged 502 points on the SAT. Can it be claimed that at the = 0:05 level of significance that the new curriculum had an effect? 115

ANSWER: we have the hypotheses H 0 : = 494 Since z =2 = z 0:025 = 1:96, and H 1 : 6= 494 z = 502 494 124= p 86 = 0:60; the conclusion is FAIL TO REJECT H 0. 116

FIGURE 6.2.5 117

The P-Value, Definition 6.2.3. Two methods to quantify evidence against H 0 : (a) The statistician selects a value for before any data is collected, and a critical region is identified. If the test statistic falls in the critical region, H 0 is rejected at the level of significance. (b) The statistician reports a P -value, which is the probability of getting a value of that test statistic as extreme or more extreme than what was actually observed (relative to H 1 ), given that H 0 is true. 118

Example 6.2.2 Recall Example 6.2.1. Given that H 0 : = 494 is being tested against H 1 : 6= 494, what P -value is associated with the calculated test statistic, z = 0:60, and how should it be interpreted? ANSWER: If H 0 : = 494 is true, then Z = has a standard normal pdf. Relative to the two sided H 1, any value of Z 0.60 or -0.60 is as extreme or more extreme than the observed z, Then, P value = P (Z 0:60) + P (Z 0:60) = 0:2743 + 0:2743 = 0:5486 119

FIGURE 6.2.4 120

Section 6.3: Testing Binomial Data Suppose X 1 ; : : : X n are outcomes in independent trials, with P (X` = 1) = p and P (X` = 0) = 1 p, with p unknown. A test with null hypothesis H 0 : hypothesis test. p = p 0 is called binomial We consider two cases: large n and small n. To decide if n is considered small or large, we use the relation 0 < np 0 3 np 0 (1 p 0 ) < np 0 + 3 np 0 (1 p 0 ) < n 121

A large sample test for binomial parameter Let Y 1 ; Y 2 ; : : : ; Y n be a random sample of n Bernoulli RVs for which 0 < np 0 3 np 0 (1 p 0 ) < np 0 + 3 np 0 (1 p 0 ) < n. Let p np0 (1 p 0 ) X = X 1 + + X n, and set z := x np 0 Test Signif. level Action H 0 : p = p 0 H 1 : p > p 0 Reject H 0 if z z H 0 : p = p 0 H 1 : p < p 0 Reject H 0 if z z H 0 : p = p 0 H 1 : p 6= p 0 Reject H 0 if z z =2 or z z =2 122

Case Study 6.3.1 A point spread is a hypothetical increment added to the score of the weaker of two teams to make them even. A study examined records of 124 NFL games; it was found that in 67 of them (or 54% ) the favored team beat the spread. Is 54% due to chance, or was the spread set incorrectly? ANSWER: Set p = P(favored team beats the spread). We have the hypotheses H 0 : p = 0:50 versus H 1 : p 6= 0:50 We shall use the 0.05 level of significance. 123

We have n = 124; p 0 = 0:50 and X` = 1 if favored team beats spread in `-th game. Thus the number of times the favored team beats the spread is X = X 1 + + X n. We compute z as follows: z := x np 0 np0 (1 p 0 ) 67 1240:50 = p = 0:90 124 0:50 0:50 With = 0:05, we have z =2 = 1:92. So z does not fall in the critical region. The null hypothesis is not rejected, that is, 54% is consistent with the statement that the spread was chosen correctly. 124

Case Study 6.3.2 Do people postpone death until birthday? Among 747 obituaries in the newspaper, 60 (or 8% ) corresponded to people that died in the three months preceding their birthday. If people die randomly with respect to their b-days, we would expect 25% of them to die in the three months preceding their b-day. Is the postponement theory valid? 125

ANSWER: Let X` =1 if `-th person died during 3 months before b-day, and X` = 0 if not. Then X = X 1 + + X n = # of people that died during 3 months before b-day. Let p = P (X = 1), p 0 = 1=4 = 0:25, and n = 747. A one sided test is H 0 : p = 0:25 versus H 1 : p < 0:25 We have, z = x np 0 np0 (1 p 0 ) = 60 747(0:25) 747(0:25)(1 (0:25)) = 10:7 With = 0:05, H 0 should be rejected if z z = 1:64 Since the last inequality holds, we must reject H 0. The evidence is overwhelming that the reduction from 25% to 8% is due to something other than chance. 126

What to do for binomial p with small n? Suppose that for ` = 1; : : : ; 19, 1 with probability p X` = 0 with probability 1 p Let X = X 1 + + X n with independent X` s. Find the Critical Region for the Test with 0:10. H 0 : p = 0:85 versus H 1 : p 6= 0:85 127

ANSWER: first we must check the inequality 0 < np 0 3 np 0 (1 p 0 ) < np 0 + 3 np 0 (1 p 0 ) < n With n = 19, p 0 = 0:85 we get 19(0:85) + 3 19(0:85)(0:15) = 20:8 6< 19 that is, Theorem 6.3.1 DOES NOT APPLY. We will use the binomial distribution region. to define the critical If the null hypothesis is true, the expected value fo X is 19(0.85) = 16.2. Thus values to the extreme left or right of 16.2 constitute the critical region. 128

Here is a plot of p X (k) = ( ) 19 k (0:85) k (0:15) 19 k : 0.2 0.15 0.1 0.05 0 1 2 3 4 5 6 7 8 910111213141516171819 129

From the table below we get the critical region C: k p X (k) total probability 0 2.21684 10 16 1 2.3868 10 14 2 1.21727 10 12 3 3.90878 10 11 4 8.85989 10 10 5 1.50618 10 8 6 1.99151 10 7 7 2.09582 10 6 P (X 13) = 0:0536 8 0.0000178145 9 0.000123382 10 0.000699164 11 0.00324158 12 0.012246 13 0.0373659 14 0.0907457 15 0.171409 16 0.242829 17 0.242829 18 0.152892 19 0.0455994 P (X = 19) = 0:0455994 C = fx : x 13 or x = 19g 130