Basic Elements of a Hypothesis Test. Hypothesis Testing of Proportions and Small Sample Means. Proportions. Proportions

Similar documents
An Introduction to Statistics Course (ECOE 1302) Spring Semester 2011 Chapter 10- TWO-SAMPLE TESTS

Hypothesis testing - Steps

Chapter 8 Hypothesis Testing Chapter 8 Hypothesis Testing 8-1 Overview 8-2 Basics of Hypothesis Testing

Chapter 2. Hypothesis testing in one population

HYPOTHESIS TESTING (ONE SAMPLE) - CHAPTER 7 1. used confidence intervals to answer questions such as...

Introduction to. Hypothesis Testing CHAPTER LEARNING OBJECTIVES. 1 Identify the four steps of hypothesis testing.

Section 7.1. Introduction to Hypothesis Testing. Schrodinger s cat quantum mechanics thought experiment (1935)

Introduction to Hypothesis Testing

HYPOTHESIS TESTING (ONE SAMPLE) - CHAPTER 7 1. used confidence intervals to answer questions such as...

LAB 4 INSTRUCTIONS CONFIDENCE INTERVALS AND HYPOTHESIS TESTING

22. HYPOTHESIS TESTING

HYPOTHESIS TESTING: POWER OF THE TEST

Difference of Means and ANOVA Problems

t Tests in Excel The Excel Statistical Master By Mark Harmon Copyright 2011 Mark Harmon

Chapter 2 Probability Topics SPSS T tests

1. What is the critical value for this 95% confidence interval? CV = z.025 = invnorm(0.025) = 1.96

How To Test For Significance On A Data Set

Hypothesis Testing: Two Means, Paired Data, Two Proportions

Confidence Intervals for Cp

Introduction to Hypothesis Testing. Hypothesis Testing. Step 1: State the Hypotheses

3.4 Statistical inference for 2 populations based on two samples

HYPOTHESIS TESTING WITH SPSS:

WISE Power Tutorial All Exercises

Comparing Two Groups. Standard Error of ȳ 1 ȳ 2. Setting. Two Independent Samples

Name: Date: Use the following to answer questions 3-4:

Confidence Intervals for One Standard Deviation Using Standard Deviation

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Sample Size and Power in Clinical Trials

Lesson 1: Comparison of Population Means Part c: Comparison of Two- Means

Lecture Notes Module 1

Using Stata for One Sample Tests

Independent t- Test (Comparing Two Means)

Simple Regression Theory II 2010 Samuel L. Baker

KSTAT MINI-MANUAL. Decision Sciences 434 Kellogg Graduate School of Management

Two Related Samples t Test

A POPULATION MEAN, CONFIDENCE INTERVALS AND HYPOTHESIS TESTING

Math 251, Review Questions for Test 3 Rough Answers

5/31/2013. Chapter 8 Hypothesis Testing. Hypothesis Testing. Hypothesis Testing. Outline. Objectives. Objectives

C. The null hypothesis is not rejected when the alternative hypothesis is true. A. population parameters.

Recall this chart that showed how most of our course would be organized:

Lesson 9 Hypothesis Testing

Chapter 8: Hypothesis Testing for One Population Mean, Variance, and Proportion

DDBA 8438: Introduction to Hypothesis Testing Video Podcast Transcript

THE FIRST SET OF EXAMPLES USE SUMMARY DATA... EXAMPLE 7.2, PAGE 227 DESCRIBES A PROBLEM AND A HYPOTHESIS TEST IS PERFORMED IN EXAMPLE 7.

UNDERSTANDING THE DEPENDENT-SAMPLES t TEST

Hypothesis testing. c 2014, Jeffrey S. Simonoff 1

Mind on Statistics. Chapter 12

Tests for Two Proportions

"Statistical methods are objective methods by which group trends are abstracted from observations on many separate individuals." 1

Introduction to Analysis of Variance (ANOVA) Limitations of the t-test

Using R for Linear Regression

Unit 26 Estimation with Confidence Intervals

Chapter Study Guide. Chapter 11 Confidence Intervals and Hypothesis Testing for Means

Two-Sample T-Tests Assuming Equal Variance (Enter Means)

CALCULATIONS & STATISTICS

Testing Research and Statistical Hypotheses

Independent samples t-test. Dr. Tom Pierce Radford University

Two-Sample T-Tests Allowing Unequal Variance (Enter Difference)

Business Statistics, 9e (Groebner/Shannon/Fry) Chapter 9 Introduction to Hypothesis Testing

Binomial Random Variables

STAT 350 Practice Final Exam Solution (Spring 2015)

Point and Interval Estimates

CONTINGENCY TABLES ARE NOT ALL THE SAME David C. Howell University of Vermont

Statistics 2014 Scoring Guidelines

Using Excel for inferential statistics

Estimation of σ 2, the variance of ɛ

Introduction. Hypothesis Testing. Hypothesis Testing. Significance Testing

Tests for One Proportion

ANOVA ANOVA. Two-Way ANOVA. One-Way ANOVA. When to use ANOVA ANOVA. Analysis of Variance. Chapter 16. A procedure for comparing more than two groups

Good luck! BUSINESS STATISTICS FINAL EXAM INSTRUCTIONS. Name:

Unit 31 A Hypothesis Test about Correlation and Slope in a Simple Linear Regression

Study Guide for the Final Exam

8 6 X 2 Test for a Variance or Standard Deviation

" Y. Notation and Equations for Regression Lecture 11/4. Notation:

Non-Inferiority Tests for Two Means using Differences

Comparison of frequentist and Bayesian inference. Class 20, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

Hypothesis Testing. Hypothesis Testing

Stat 411/511 THE RANDOMIZATION TEST. Charlotte Wickham. stat511.cwick.co.nz. Oct

Stat 5102 Notes: Nonparametric Tests and. confidence interval

Non-Inferiority Tests for Two Proportions

Confidence Intervals for Cpk

Introduction to Hypothesis Testing OPRE 6301

1 Hypothesis Testing. H 0 : population parameter = hypothesized value:

6.4 Normal Distribution

1.5 Oneway Analysis of Variance

Permutation Tests for Comparing Two Populations

Hypothesis Testing for Beginners

Regression Analysis: A Complete Example

6: Introduction to Hypothesis Testing

Non-Inferiority Tests for One Mean

5.1 Identifying the Target Parameter

Chapter 7. Comparing Means in SPSS (t-tests) Compare Means analyses. Specifically, we demonstrate procedures for running Dependent-Sample (or

Review #2. Statistics

1. How different is the t distribution from the normal?

Association Between Variables

Class 19: Two Way Tables, Conditional Distributions, Chi-Square (Text: Sections 2.5; 9.1)

INTERPRETING THE ONE-WAY ANALYSIS OF VARIANCE (ANOVA)

Comparing Means in Two Populations

Transcription:

Hypothesis Testing of Proportions and Small Sample Means Dr. Tom Ilvento FREC 408 Basic Elements of a Hypothesis Test H 0 : H a : : : Proportions The Pepsi Challenge asked soda drinkers to compare Diet Coke and Diet Pepsi in a blind taste test. Pepsi claimed that more than ½ of Diet Coke drinkers said they preferred Diet Pepsi Suppose we take a random sample of 100 Diet Coke Drinkers and we found that 56 preferred Diet Pepsi. Use " =.05 level to test if we have enough evidence to conclude that more than half of Diet Coke Drinkers will prefer Pepsi. Proportions Hypothesis test for proportions is the same It must be based on a large sample We have an estimate of the population parameter, p, from a sample - p We use the same strategy of comparing our sample estimate to the theoretical sampling distribution And the same formulas But, with one slight twist Remember, we should use information if we have it. With proportions we have a slightly different approach to the standard error Remember, the variance, std dev, and standard error of a proportion is tied to p F 2 = pq F p = (pq/n).5 If we hypothesize that p =.5 under a null hypothesis Then we ought to use the hypothesized p and q as the components for the standard error of the sampling distribution σ p Proportion Standard Error H 0 : p =.5 So, I use p 0 for the standard error = (.5.5) /100 = 0.25 /100 1

Diet Coke versus Pepsi Diet Coke Versus Pepsi Null hypothesis H 0 : p =.5 Alternative H a : p >.5 one-tailed test,upper Large sample, binomial = normal z* = (.56.5)/(.25/100).5 z "=.05. = 1.645 z* = 1.20 z* = 1.20 z* < z "=.05 1.2 < 1.645 Cannot reject H 0 : p =.5 p=.50 z=1.645 An alternative approach to specifying " Instead of specifying " a priori, we could simply calculate the observed significance level associated with z* or (t*) Called p-value (p415-18) This is the probability of observing the test statistic or greater (or less than on the negative side) It reflects the probability in the tail(s) of the distribution based on our test statistic p-value We calculate the p-value for our test statistic by looking up the z* (t*) in the table Reading the probability associated with up to that point in the table Subtract the table probability from.5 Multiply by 2 if the test was a twotailed test p-value Using P-value to measure the disagreement between the observed data and H 0 : (p416) Upper-tailed test: p-value = P (z z*) Lower-tailed test: p-value = P (z z*) Two-tailed test: p-value =2P (z z* ) p-value For example z* = 2.05 for a one-tailed test 2.05 corresponds with.4798 p =.5 -.4798 =.0202 z* = -1.78 for a two-tailed test -1.78 corresponds with.4625 p = 2*(.5 -.4625) = 2*.0375 =.075 2

What is the p-value for the Pepsi Challenge? z* = 1.20 Look 1.20 up in the table z= 1.20 is associated with.3849.5 -.3849 =.1151 So, p =.1151 Diet Coke Versus Pepsi p-value =.1151 reflects the probability in the yellow area in the tail If I were looking for an "=.05 for this test, and was given p=.1151, I would know that I would fail to reject the null hypothesis p=.50 z* = 1.20 Small sample problems Another problem When n is small I can use the student t- distribution in my hypothesis test Provided I can assume that the variable is normally distributed in the population Everything else in the hypothesis test is the same At issue is the water quality in the Everglades National Park in Florida, with a focus on the phosphorous level Suppose we took 12 random water samples and measured the phosphorus level as parts per billion (ppb) They want to know if the mean level is less than 15 ppb, an impact threshold. Use " =.05 Everglades water quality problem Sample Statistics n= 12 0 = 12.3 ppb s= 5.4 ppb Everglades and phosphorous The sample size is small n = 12 If I can assume an approximately normal distribution I can use the t-distribution to help with my test statistic, rejection region, and p- value 3

Set up the Hypothesis Test Here s how it looks in pictures Null hypothesis H 0 : : = 15 Alternative H a : : < 15 one-tailed test, lower Small sample, normal t* = (12.3 15)/(5.4//12) -t "=.05, 11d.f. = -1.796 t* = -1.732 t* > -t "=.05, 11d.f. -1.732 > -1.796 Cannot reject H 0 : : = 15 t* = -1.732 t=-1.796 :=15 p-values and the t- distribution Finding the p-value associated with our test statistic is difficult for us because we rely on a limited table But it is relatively easy for statistical computer programs The p-value associated with a test will routinely be given in the computer output From Excel I calculated the p =.05559 This brings up important questions What if you are really close to the rejection region? What is " really? s and Consequences for a Hypothesis Test s and Consequences for a Hypothesis Test True State of Nature True State of Nature H 0 H a H 0 H a H 0 H 0 H a H a Type I error (probability of ") 4

s and Consequences for a Hypothesis Test Type I and Type II Error True State of Nature " Is represented by the yellow section in the tail H 0 H a t* = -1.732 H 0 Type II error (probability of $) H a Type I error (probability of ") t=-1.796 :=15 Type I Error Type I error (probability of ") is the probability of rejecting the null hypothesis when in fact it is true (Def8.6 p393) "=P ( Type I Error ) =P ( Reject H 0 when H 0 is true ) Type I and Type II Error t* = -1.732 " Is represented by the yellow section in the tail $ Is represented by the blue section to the right of the left tail :=15 t=-1.796 Note: the distribution to the left is one of many other possible sampling distributions that the sample could have come from Type II Error Type II error (probability of $) is the probability of failing to reject the Null Hypothesis when in fact it is wrong (Def8.6 p393) $ =P ( Type II Error ) =P ( Accept H 0 when H 0 is false ) 1 - $ is called the Power of the Test and reflects the probability of correctly rejecting the null hypothesis for a particular value of : Type I and Type II Errors Type II error ($) is difficult to determine precisely So we generally don t accept H 0 as true. When we fail to reject H 0, we say: The sample evidence is insufficient to reject H 0 at " =.05 5

Type I and Type II Error " is generally easier to deal with because we can set it a priori It is the level at which we are comfortable being wrong when we reject H 0 Note: decreasing " increases $ Factors that influence a Hypothesis test n, the sample size As n gets larger, the standard error error gets smaller thus the denominator of the test statistic gets smaller So z* or t* will get larger Factors that influence the hypothesis test ", the probability of a Type I error The larger the level of alpha, the smaller the z or t value at the rejection region " =.05 (two-tailed) 1.96 " =.01 (two-tailed) 2.575 Factors that influence the Hypothesis Test The nature of the alternative hypothesis For a two-tailed test I must split " in each of the tails, thereby making " smaller, and the critical value of z or t larger " =.05 (two-tailed) 1.96 " =.05 (one-tailed) 1.645 It is easier to reject the null hypothesis on a one-tailed test Factors that influence the Hypothesis Test Rejection regions for common levels of " The level of variability in the population The larger the level of F, the larger the level of s for my sample the larger the standard error for the test statistic And the smaller the test statistic " =.10 " =.05 " =.01 Lower Tail z < -1.28 z < -1.645 z < -2.33 Alternative Hypothesis Upper Tail z > 1.28 z > 1.645 z > 2.33 Two-Tailed z< -1.645 or z> 1.645 z< -1.96 or z> 1.96 z< -2.575 or z> 2.575 6

Relationship Between Hypothesis tests and confidence intervals As with confidence intervals, we state our conclusion in reference to the process, which is tied to: The notion of repeated random samples A sampling distribution for our estimator The two-tailed test at " is analogous to the 100(1- ")% C.I. If the C.I. contains the H o value then you would fail to reject H o Peanut Company problem A peanut company sells a package product of 16 oz of salted peanuts through an automated process Not all packages contain exactly 16 oz of peanuts they shoot for an average of 16 oz with a standard deviation of.8 oz. They routinely take random samples of 40 packages and weigh them They want to see if each sample is different from the package claim at "=.1 Peanut package problem If the manufacturing process overfills the packages, even by a little, they lose profit If the manufacturing process under-fills the packages they risk angry customers and fines from government They are interested in a two-tailed test, a priori Peanut package problem Let s say they take a sample of 40 packages and get a mean value of 16.42 Does this sample result warrant checking the manufacturing process? Note: this is a problem where we can view F as being known: F =.8 Peanut package problem Null hypothesis Alternative Peanut package problem Calculate the 90% confidence interval for this problem 16.42 ± 1.645[.8/(40).5 ] 16.42 ±.208 16.212 to 16.628 Note that 16 is NOT in the 90% C.I. 7

Peanut package company Another way to use a confidence interval: Calculate the C.I. Around 16 oz 16 ± 1.645[.8/(40).5 ] 16 ±.208 15.792 to 16.208 Any sample that falls outside of this interval will cause them to reject the null hypothesis (based on two-tailed test and " =.1) Note: Type I Error =.1 They can expect to wrongly reject H o : 10 of 100 times Problem The current pain reliever in a hospital brings relief in 3.5 minutes on average A new pain reliever is tried on a sample of 20 people Mean time is 2.8 minutes with s=1.14 minutes Do the data provide sufficient evident that the new pain reliever was effective in reducing the mean time to relief? Use "=.01 Pain Relief Null hypothesis Alternative Problem Support for Preserving Agricultural Lands States have started programs to help preserve agricultural lands and keep them from being developed One strategy is to think of the value of agricultural land as having a Value as its use for agriculture Value as its use for development State programs seek to purchase the development rights from the farmer and pay him/her for these rights Survey of Delaware Households I support the state s efforts to preserve farmland by purchasing development rights from farmers 550 responded to this question 325 said Strongly Agree or Agree Conduct a hypothesis Test to see if the the majority of Delawarean households agree with this statement (i.e., more than half support this program) Use " =.01 level Support for Farmland Preservation Null hypothesis Alternative 8

Golf Course Problem Golf course designers are worried that the new equipment is making old courses obsolete. One designer says that courses need to be built with the expectation that players will be able to drive the ball an average of 250 yards or more. Golf Course Problem A sample of 135 golfers is taken and they measured their driving distance 0 = 256.3 yards s = 43.4 yards Does the sample provide enough evidence to suggest that golfers are already hitting it farther than the 250 mark? Use "=.05 Also, calculate the p-value for this problem Golf Course Problem Null hypothesis H 0 : : = 250 Alternative H a : : > 250 one-tailed test,upper Large sample, normal z* = (256.3-250)/(43.4//135) z "=.05 = 1.645 z* = 1.69 z* > z "=.05 1.69 > 1.645 Reject H 0 : : = 250 p=.0455 Problem 800 number service response time A computer manufacturer seeks to have a good rate of response time to customer calls Their goal is to have better than 90% of the calls answered successfully in 5 minutes A random sample was taken of 70 calls 66 of the calls were successfully completed within 5 minutes Is there evidence to suggest that the company is reaching its goal? Use " =.05 Customer Response time Null hypothesis H 0 : p =.9 Alternative H a : p >.9 one-tailed test,upper Large sample, binomial = normal z* = (.943-.9)/(.09/70).5 z "=.05 = 1.645 z* = 1.199 z* < z "=.05 1.199 < 1.645 Cannot reject H 0 : p =.9 9