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

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

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

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

Agenda: Questions Chapter 4 so far?

Business Statistics: Lecture 8: Introduction to Estimation & Hypothesis Testing

HYPOTHESIS TESTING. Hypothesis Testing

Preliminary Statistics. Lecture 5: Hypothesis Testing

Mathematical statistics

POLI 443 Applied Political Research

Stat 231 Exam 2 Fall 2013

Preliminary Statistics Lecture 5: Hypothesis Testing (Outline)

Econometrics. 4) Statistical inference

Marquette University MATH 1700 Class 5 Copyright 2017 by D.B. Rowe

Quantitative Analysis and Empirical Methods

Lecture Testing Hypotheses: The Neyman-Pearson Paradigm

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

Mathematical statistics

POLI 443 Applied Political Research

MATH 240. Chapter 8 Outlines of Hypothesis Tests

CH.9 Tests of Hypotheses for a Single Sample

Tests about a population mean

Finansiell Statistik, GN, 15 hp, VT2008 Lecture 10-11: Statistical Inference: Hypothesis Testing

hypothesis a claim about the value of some parameter (like p)

Introduction to Statistical Data Analysis III

Sampling Distribution of a Sample Proportion

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

Hypotheses Test Procedures. Is the claim wrong?

Hypothesis testing. Data to decisions

Introductory Econometrics

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

A3. Statistical Inference

Statistical Inference

The Purpose of Hypothesis Testing

STAT 515 fa 2016 Lec Statistical inference - hypothesis testing

Lecture 12 November 3

1 Hypothesis testing for a single mean

ECO220Y Review and Introduction to Hypothesis Testing Readings: Chapter 12

EXAM 3 Math 1342 Elementary Statistics 6-7

The problem of base rates

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

Economics 583: Econometric Theory I A Primer on Asymptotics: Hypothesis Testing

Unit 19 Formulating Hypotheses and Making Decisions

Soc3811 Second Midterm Exam

Paired Samples. Lecture 37 Sections 11.1, 11.2, Robb T. Koether. Hampden-Sydney College. Mon, Apr 2, 2012

Chapter 5: HYPOTHESIS TESTING

Sampling Distribution of a Sample Proportion

Statistics Primer. ORC Staff: Jayme Palka Peter Boedeker Marcus Fagan Trey Dejong

Chapters 10. Hypothesis Testing

Spearman Rho Correlation

MTMS Mathematical Statistics

Chapters 10. Hypothesis Testing

CBA4 is live in practice mode this week exam mode from Saturday!

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

9-6. Testing the difference between proportions /20

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

9.5 t test: one μ, σ unknown

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

Statistical Inference. Hypothesis Testing

Probability theory and inference statistics! Dr. Paola Grosso! SNE research group!! (preferred!)!!

Lecture 27. December 13, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University.

Weldon s dice. Lecture 15 - χ 2 Tests. Labby s dice. Labby s dice (cont.)

Inferences About Two Proportions

INTERVAL ESTIMATION AND HYPOTHESES TESTING

Lectures 5 & 6: Hypothesis Testing

6.4 Type I and Type II Errors

Chapter 9 Inferences from Two Samples

Bios 6649: Clinical Trials - Statistical Design and Monitoring

Quantitative Methods for Economics, Finance and Management (A86050 F86050)

ME3620. Theory of Engineering Experimentation. Spring Chapter IV. Decision Making for a Single Sample. Chapter IV

EC2001 Econometrics 1 Dr. Jose Olmo Room D309

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

Partitioning the Parameter Space. Topic 18 Composite Hypotheses

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

Classroom Activity 7 Math 113 Name : 10 pts Intro to Applied Stats

Lecture 26 Section 8.4. Wed, Oct 14, 2009

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

Lecture 28 Chi-Square Analysis

Practice Problems Section Problems

Normal (Gaussian) distribution The normal distribution is often relevant because of the Central Limit Theorem (CLT):

Review. December 4 th, Review

Hypothesis Testing: One Sample

Two Sample Hypothesis Tests

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

5 Basic Steps in Any Hypothesis Test

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

Exam 2 (KEY) July 20, 2009

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

High-Throughput Sequencing Course. Introduction. Introduction. Multiple Testing. Biostatistics and Bioinformatics. Summer 2018

y ˆ i = ˆ " T u i ( i th fitted value or i th fit)

Lab #11. Variable B. Variable A Y a b a+b N c d c+d a+c b+d N = a+b+c+d

Survey on Population Mean

Chapter Three. Hypothesis Testing

Chapter 7: Hypothesis Testing

Political Science 236 Hypothesis Testing: Review and Bootstrapping

CHAPTER 6: SPECIFICATION VARIABLES

Soc 3811 Basic Social Statistics Second Midterm Exam Spring Your Name [50 points]: ID #: ANSWERS

10.2 Hypothesis Testing with Two-Way Tables

Math 2000 Practice Final Exam: Homework problems to review. Problem numbers

STAT Chapter 8: Hypothesis Tests

LECTURE 5. Introduction to Econometrics. Hypothesis testing

Transcription:

Class 19 Daniel B. Rowe, Ph.D. Department of Mathematics, Statistics, and Computer Science Copyright 2017 by D.B. Rowe 1

Agenda: Recap Chapter 8.3-8.4 Lecture Chapter 8.5 Go over Exam. Problem Solving Session. 2

Recap Chapter 8.4 8.5 3

8.4 The Nature of Hypothesis Testing Example 1: Friend s Party. H 0 : The party will be a dud vs. H a : The Party will be a great time Example 2: Math 1700 Students Height H 0 : The mean height of Math 1700 students is 69, μ = 69. vs. H a : The mean height of Math 1700 students is not 69, μ 69. 4

8.4 The Nature of Hypothesis Testing Example 1: Friend s Party H 0 : The party will be a dud vs. H a : The Party will be a great time Four outcomes from a hypothesis test. We go. Party Great Correct Decision Party a dud. Type II Error If do not go to party and it s great, we made an error in judgment. We do not go. Type I Error Correct Decision If go to party and it s a dud, we made in error in judgment. 5

8.4 The Nature of Hypothesis Testing Example 2: Math 1700 Height H 0 : μ = 69 vs. H a : μ 69 Four outcomes from a hypothesis test. Fail to reject H 0. μ = 69 μ 69 Correct Decision Type II Error If we reject H 0 and it is true, we made in error in judgment. Reject H 0. Type I Error Correct Decision If we do not reject H 0 and it is false, we have made an error in judgment. 6

8.4 The Nature of Hypothesis Testing Type I Error: true null hypothesis H 0 is rejected. Level of Significance (α): The probability of committing a type I error. (Sometimes α is called the false positive rate.) Type II Error: favor null hypothesis that is actually false. Type II Probability (β): The probability of committing a type II error. Do Not Reject H 0 Reject H 0 H 0 True Type A Correct Decision (1-α) Type I Error (α) H 0 False Type II Error (β) Type B Correct Decision (1-β) 7

8.4 The Nature of Hypothesis Testing We need to determine a measure that will quantify what we should believe. Test Statistic: A random variable whose value is calculated from the sample data and is used in making the decision reject H 0 : or fail to reject H 0. Example: Friend s Party Fraction of parties that were good. Example: Math 1700 Heights Sample mean height. 8

8.4 The Nature of Hypothesis Testing HYPOTHESIS TESTING PAIRS Figure from Johnson & Kuby, 2012. 9

8.5 Hypothesis Test of Mean (σ Known): Probability Approach HYPOTHESIS TESTING PAIRS H 0 : μ = 69 vs. H a : μ 69 Figure from Johnson & Kuby, 2012. 10

8.5 Hypothesis Test of Mean (σ Known): Probability Approach Step 1 The Set-Up: Null (H 0 ) and alternative (H a ) hypotheses H 0 : μ = 69 vs. H a : μ 69 Step 2 The Hypothesis Test Criteria: Test statistic. x 0 z* σ known, n is large so by CLT x is normal / n z* is normal Step 3 The Sample Evidence: Calculate test statistic. x 0 67.2 69 z* 1.74 n=15, x=67.2, 4 / n 4 / 15 normal Step 4 The Probability Distribution: 0.0409 P( z z* ) p value 0.0819 Step 5 The Results: p value, reject H 0, p value> fail to reject H 0 1.74 1.74 0.0409 α = 0.05 11

8.5 Hypothesis Test of Mean (σ Known): Probability Approach HYPOTHESIS TESTING PAIRS H 0 : μ 69 vs. H a : μ < 69 Figure from Johnson & Kuby, 2012. 12

8.5 Hypothesis Test of Mean (σ Known): Probability Approach Step 1 The Set-Up: Null (H 0 ) and alternative (H a ) hypotheses H 0 : μ 69 vs. H a : μ < 69 Step 2 The Hypothesis Test Criteria: Test statistic. x 0 z* σ known, n is large so by CLT x is normal / n z* is normal Step 3 The Sample Evidence: Calculate test statistic. x 0 67.2 69 z* 1.74 n=15, x =67.2, 4 / n 4 / 15 normal Step 4 The Probability Distribution: 0.0409 P( z z*) p value 0.0409 1.74 Step 5 The Results: p value, reject H 0, p value> fail to reject H α = 0.05 0 13

8.5 Hypothesis Test of Mean (σ Known): Probability Approach HYPOTHESIS TESTING PAIRS H 0 : μ 69 vs. H a : μ > 69 Figure from Johnson & Kuby, 2012. 14

8.5 Hypothesis Test of Mean (σ Known): Probability Approach Step 1 The Set-Up: Null (H 0 ) and alternative (H a ) hypotheses H 0 : μ 69 vs. H a : μ > 69 Step 2 The Hypothesis Test Criteria: Test statistic. x 0 z* σ known, n is large so by CLT x is normal / n z* is normal Step 3 The Sample Evidence: Calculate test statistic. x 0 67.2 69 z* 1.74 n=15, x =67.2, 4 / n 4 / 15 normal 0.9591 Step 4 The Probability Distribution: P( z z*) p value 0.9691 1.74 Step 5 The Results: p value, reject H 0, p value> fail to reject H α = 0.05 0 15

Chapter Questions? Homework: Chapter 8 # 5, 15, 22, 24, 35, 47, 57, 59, 81, 93, 97, 106, 109, 119, 145, 157 16

Lecture Chapter 8.5 17

Chapter 8: Introduction to Statistical Inference (continued) Daniel B. Rowe, Ph.D. Department of Mathematics, Statistics, and Computer Science 18

8.5 Hypothesis Test of Mean μ (σ Known): A Classical Approach THE CLASSICAL HYPOTHESIS TEST: 5 STEPS Step 1 The Set-Up: Step 2 The Hypothesis Test Criteria: Step 3 The Sample Evidence: Step 4 The Probability Distribution: Step 5 The Results: 19

THE CLASSICAL HYPOTHESIS TEST: 5 STEPS Step 1 The Set-Up: a. Describe the population parameter of interest. The population parameter of interest is the mean μ, the height of Math 1700 students. 20

8.5 Hypothesis Test of Mean (σ Known): Probability Approach THE PROBABILITY-VALUE HYPOTHESIS TEST: 5 STEPS Step 1 The Set-Up: b. State the null hypothesis (H 0 ) and the alternative hypotheses (H a ). H 0 : μ = 69 vs. H a : μ 69 Figure from Johnson & Kuby, 2012. 21

Scenario: True μ not likely μ 0 =69. Reject H 0 : μ=μ 0 (do not believe H 0 ) let s say we set a cut-off mean μ critical =71 hypothesized mean μ 0 =69 x=72 x sample mean 22

Scenario: True μ likely μ 0 =69. Fail to reject H 0 : μ=μ 0 (not enough evidence not to believe H 0 ) let s say we set a cut-off mean μ critical =71 hypothesized mean μ 0 =69 x=70 sample mean x 23

We need a better (objective) way to set a cut-off value or cut-off values for which we would either believe H 0 or for which we would not have enough evidence not believe H 0. We need to use the normal distribution and probabilities. 24

THE CLASSICAL HYPOTHESIS TEST: 5 STEPS Step 2 The Hypothesis Test Criteria: a. Check the assumptions. Assume we know from past experience that σ=4. Assume that n is large so that by the CLT x is normally distributed. x, x n by SDSM 25

THE CLASSICAL HYPOTHESIS TEST: 5 STEPS Step 2 The Hypothesis Test Criteria: b. Identify the probability distribution and the test statistic to be used. The standard normal distribution is to be used because x is expected to have a normal distribution. Test Statistic for Mean: x 0 z* / n where σ is assumed to be known (8.4) 26

THE CLASSICAL HYPOTHESIS TEST: 5 STEPS Step 2 The Hypothesis Test Criteria: c. Determine the level of significance, α. After much consideration, we assign a tolerable probability of a Type I error to be α=0.05. Type I Error: When a true null hypothesis H 0 is rejected. 27

THE CLASSICAL HYPOTHESIS TEST: 5 STEPS Step 3 The Sample Evidence: a. Collect a sample of information. Take a random sample from the population with mean μ that being questioned. b. Calculate the value of the test statistic. x 0 67.2 69 z* 1.74 / n 4 / 15 Assuming n=15 and 67.2 is sample mean. With known 4. 28

THE CLASSICAL HYPOTHESIS TEST: 5 STEPS Step 4 The Probability Distribution: a. Determine the critical region and critical value(s). Critical Region: The set of values for the test statistic that will cause us to reject the null hypothesis. Critical value(s): The first or boundary value(s) of the critical region(s). 29

There are three possible hypothesis pairs for the mean. H 0 : μ μ 0 vs. H a : μ < μ 0 Reject H 0 if z* x / 0 n less than z( ) Critical Region Reject Non-Critical Region Fail to Reject data indicates μ < μ 0 because x is a lot smaller than 0 z* CV 0 z 30

There are three possible hypothesis pairs for the mean. H 0 : μ μ 0 vs. H a : μ > μ 0 Reject H 0 if greater then z* x 0 z( ) / n Non-Critical Region Fail to Reject Critical Region Reject data indicates μ > μ 0 because x is a lot larger than 0 0 CV z* 31

There are three possible hypothesis pairs for the mean. H 0 : μ = μ 0 vs. H a : μ μ 0 Reject H 0 if z* x / 0 n or if x 0 z* / n data indicates μ μ 0, less than z( / 2) greater than z( / 2) x far from 0 Critical Region Reject Non-Critical Region Fail to Reject Critical Region Reject z* CV 0 CV z* 32

THE CLASSICAL HYPOTHESIS TEST: 5 STEPS Step 4 The Probability Distribution: a. Determine the critical region and critical value(s). b. Determine whether or not the calculated test statistic is in the critical region. H 0 : μ = 69 vs. H a : μ 69 P( z z( / 2)) / 2 z(.025) 1.96 since two sided test., z*=-1.74 Figure from Johnson & Kuby, 2012. 33

THE CLASSICAL HYPOTHESIS TEST: 5 STEPS Step 5 The Results: a. State the decision about H 0. Need a decision rule. Decision rule: a. If the test statistic falls within the critical region, then the decision must be reject H 0. b. If the test statistic is not in the critical region, then the decision must be fail to reject H 0. 34

THE CLASSICAL HYPOTHESIS TEST: 5 STEPS Step 5 The Results: b. State the conclusion about H a. With α = 0.05, there is not sufficient evidence to reject H 0. Fail to reject H 0. z*=-1.74 Figure from Johnson & Kuby, 2012. 35

Let s examine the hypothesis test H 0 : μ 69 vs. H a : μ > 69 with α=0.05 for the heights of Math 1700 students. Generate random data values. H 0 : μ μ 0 vs. H a : μ > μ 0 36

Generated 15 10 6 Calculated normal data values 1 10 6 means with n=15. from μ = 69 and σ=4. (Will repeat for μ = 72.) n=15 n=15 15 10 6 1 10 6 xs ' xs ' H 0 : μ μ 0 vs. H a : μ > μ 0 37

H 0 : μ μ 0 vs. H a : μ > μ 0 n=15 1 10 6 xs ' Fail to Reject Reject H 0 : μ 69 vs. H a : μ > 69 α=.05 When the true mean μ=69, we reject H 0 α fraction of the time. 1-α Commit a Type I Error. μ critical α xs ' Given α, we want μ critical. 38

H 0 : μ μ 0 vs. H a : μ > μ 0 n=15 1 10 6 xs ' Fail to Reject Reject Instead of μ critical we find critical z, z critical =z(α ). 1-α Do this by assuming that H 0 : μ=69 is true, then calculate x 69 z 4 / 15 z critical α zs ' 39

H 0 : μ μ 0 vs. H a : μ > μ 0 H 0 : μ 69 vs. H a : μ > 69 α=.05 n=15 1 10 6 xs ' Fail to Reject Reject When the true mean μ=72, we do not reject H 0 β fraction of the time. Commit a Type II Error 1-β β μ critical (same) xs ' 40

H 0 : μ μ 0 vs. H a : μ > μ 0 n=15 1 10 6 xs ' Fail to Reject Reject Fail to Reject H 0 H 0 True (μ=69 ) Correct Decision (1-α) H 0 False (μ=72 ) Type II Error (β) Reject H 0 Type I Error (α) Correct Decision (1-β) 1-α 1-β Power of the test: 1 P( Reject H H False) 0 0 β α μ critical xs ' Discrimination ability. Ability to detect difference. 41

H 0 : μ μ 0 vs. H a : μ > μ 0 n=15 1 10 6 xs ' z Fail to Reject x 69 4 / 15 Reject Fail to Reject H 0 Reject H 0 H 0 True (μ=69 ) Correct Decision (1-α) Type I Error (α) H 0 False (μ=72 ) Type II Error (β) Correct Decision (1-β) 1-α 1-β Power of the test: 1 P( Reject H H False) 0 0 β α zs ' Discrimination ability. Ability to detect difference. z critical 42

H 0 : μ μ 0 vs. H a : μ > μ 0 n=15 1 10 6 xs ' Fail to Reject Reject We want our α, Prob of Type I Error to be small. So why not just decrease α? 1-α 1-β Decreasing α increases β. β α zs ' And vice versa. z critical 43

H 0 : μ μ 0 vs. H a : μ > μ 0 What is the solution? Increase n. n=30 1 10 6 xs ' Fail to Reject Reject Figure shows n increased to n= 30 from n =15. 1-α 1-β Note α and β both smaller with larger n. β α xs ' 44

H 0 : μ μ 0 vs. H a : μ > μ 0 What is the solution? Increase n. Figure shows n increased to n= 30 from n =15. n=30 1 10 6 xs ' x 69 z 4 / 30 Fail to Reject 1-α Reject 1-β Note α and β both smaller with larger n. β α zs ' 45

Chapter Questions? Homework: Chapter 8 # 5, 15, 22, 24, 35, 47, 57, 59, 81, 93, 97, 106, 109, 119, 145, 157 46

Problem Solving Go Over Exam 47