Hypothesis Testing. Concept of Hypothesis Testing

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

Hypothesis Testing --- One Mean

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

Regression Analysis: A Complete Example

Introduction to Hypothesis Testing OPRE 6301

Chapter 7 TEST OF HYPOTHESIS

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

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

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

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

LAB 4 INSTRUCTIONS CONFIDENCE INTERVALS AND HYPOTHESIS TESTING

HYPOTHESIS TESTING: POWER OF THE TEST

22. HYPOTHESIS TESTING

Introduction to Hypothesis Testing

A POPULATION MEAN, CONFIDENCE INTERVALS AND HYPOTHESIS TESTING

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

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

Hypothesis Testing: Two Means, Paired Data, Two Proportions

Math 251, Review Questions for Test 3 Rough Answers

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

Chapter 2. Hypothesis testing in one population

Need for Sampling. Very large populations Destructive testing Continuous production process

Mind on Statistics. Chapter 12

Hypothesis Testing. Hypothesis Testing

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

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

Unit 26 Estimation with Confidence Intervals

HYPOTHESIS TESTING WITH SPSS:

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

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

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

2 Sample t-test (unequal sample sizes and unequal variances)

Lecture Notes Module 1

Online 12 - Sections 9.1 and 9.2-Doug Ensley

6: Introduction to Hypothesis Testing

Sample Size and Power in Clinical Trials

In the past, the increase in the price of gasoline could be attributed to major national or global

Independent t- Test (Comparing Two Means)

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

8 6 X 2 Test for a Variance or Standard Deviation

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

Descriptive Statistics

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

3.4 Statistical inference for 2 populations based on two samples

Hypothesis testing. c 2014, Jeffrey S. Simonoff 1

SCHOOL OF HEALTH AND HUMAN SCIENCES DON T FORGET TO RECODE YOUR MISSING VALUES

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

How To Test For Significance On A Data Set

UNDERSTANDING THE DEPENDENT-SAMPLES t TEST

MONT 107N Understanding Randomness Solutions For Final Examination May 11, 2010

Study Guide for the Final Exam

Paired 2 Sample t-test

5.1 Identifying the Target Parameter

II. DISTRIBUTIONS distribution normal distribution. standard scores

Chapter 2 Probability Topics SPSS T tests

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

Normal distributions in SPSS

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

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

Introduction. Statistics Toolbox

Simple Regression Theory II 2010 Samuel L. Baker

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.

Crosstabulation & Chi Square

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

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

Chapter 7 Section 7.1: Inference for the Mean of a Population

Week 4: Standard Error and Confidence Intervals

Having a coin come up heads or tails is a variable on a nominal scale. Heads is a different category from tails.

Two Related Samples t Test

4. Continuous Random Variables, the Pareto and Normal Distributions

SAMPLING & INFERENTIAL STATISTICS. Sampling is necessary to make inferences about a population.

Hypothesis Testing. Reminder of Inferential Statistics. Hypothesis Testing: Introduction

Understand the role that hypothesis testing plays in an improvement project. Know how to perform a two sample hypothesis test.

p ˆ (sample mean and sample

Chapter 7: One-Sample Inference

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

Describing Populations Statistically: The Mean, Variance, and Standard Deviation

One-Way Analysis of Variance

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

research/scientific includes the following: statistical hypotheses: you have a null and alternative you accept one and reject the other

Chapter 26: Tests of Significance

Two-sample inference: Continuous data

Introduction. Hypothesis Testing. Hypothesis Testing. Significance Testing

UNDERSTANDING THE TWO-WAY ANOVA

Hypothesis testing - Steps

Tutorial 5: Hypothesis Testing

Getting Started with Statistics. Out of Control! ID: 10137

Odds ratio, Odds ratio test for independence, chi-squared statistic.

Chi-square test Fisher s Exact test

STAT 350 Practice Final Exam Solution (Spring 2015)

Pearson's Correlation Tests

Introduction to Quantitative Methods

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

AP: LAB 8: THE CHI-SQUARE TEST. Probability, Random Chance, and Genetics

Opgaven Onderzoeksmethoden, Onderdeel Statistiek

Using Excel for inferential statistics

BA 275 Review Problems - Week 6 (10/30/06-11/3/06) CD Lessons: 53, 54, 55, 56 Textbook: pp , ,

Statistics 100 Sample Final Questions (Note: These are mostly multiple choice, for extra practice. Your Final Exam will NOT have any multiple choice!

Statistical Functions in Excel

1.5 Oneway Analysis of Variance

Transcription:

Quantitative Methods 2013 Hypothesis Testing with One Sample 1 Concept of Hypothesis Testing Testing Hypotheses is another way to deal with the problem of making a statement about an unknown population parameter, based on a random sample. Instead of finding an estimate for the parameter, we can often find it convenient to hypothesize a value for it and then use the information from the sample to confirm or refute the hypothesized value. 2

A hypothesis is a judgment about the population parameter based simply on an assumption or intuition with no concrete backup information or analysis. For example: population mean The mean monthly cell phone bill in Haifa is μ $42 3 Hypothesis testing Hypothesis testing is the comparison of the analyst's belief or claim about a population parameter to the corresponding sample statistic and deciding whether or not the belief or claim about the population parameter is correct. 4

Example: Filling of soft drink bottles in a bottling plant. Managers have the belief that the machine is filling 1L bottles with 1L of the soft drink. This belief is tested by drawing a sample of filled bottles, measuring the amount of soft drink in each, finding the mean and variance of the amount of soft drink in sample of bottles, comparing this amount with the 1L belief, and finally deciding whether the information from the sample supports or refutes the 1L belief. 5 Stating a Hypothesis The Null Hypothesis, H 0 This is the hypothesis or claim that is initially assumed to be true. It is what is believed to be, presumed to be, or accepted as true and correct without any evidentiary support. In the bottling scenario, managers believe the machine is filling the bottles correctly even though they have no evidence to support that belief. The null hypothesis in that case is that the bottling machine is functioning correctly. 6

The Null Hypothesis, H 0 Example: The average number of TV sets in U.S. homes is equal to three ( H 0 : µ = 3) Always contains =, or sign. Is always about a population parameter, not about a sample statistic H 0 : µ = 3 H 0 : X = 3 7 The Alternative Hypothesis, H 1, (H a ) This is the hypothesis or claim which we initially assume to be false but which we may decide to accept if there is sufficient evidence. In the bottling scenario, managers will not believe the machine is filling the bottles incorrectly unless they have evidence to support that belief. It is the sample which provides this evidence. The alternative hypothesis in that case is that the bottling machine is not functioning correctly. 8

The Alternative Hypothesis, H 1, (H a ) Is the opposite (the complement) of the null hypothesis e.g., The average number of TV sets in U.S. homes is not equal to 3 ( H 1 : μ 3 ) Never contains the =, or sign 9 This procedure is familiar to us already from the legal system: Innocent until proven guilty. The Null Hypothesis (Innocent) is only rejected in favor of the Alternative Hypothesis (Guilty) if there is sufficient evidence of this. 10

Example: A weight loss company claims its product, when used as directed, will lead to at least 10 kilograms of weight loss within 45 days. A consumer protection agency wants to verify the company's claim in order to protect the public from fraud. What is the hypothesis statement the agency director should use? 11 Since the consumer protection agency wants evidence that the weight loss product does not performs as claimed, yields less than 10 kg of weight loss. The entire hypothesis statement is: H 0 : µ 10kg H a : µ < 10kg Complement of the null hypothesis 12

Rejection Regions One way of performing a Hypothesis test is to compute a rejection region. If we find that our sample statistic is in this region then we reject our Null Hypothesis. 13 What is important is the idea that the rejection region is a region far away from our Null hypothesis. And that it is unlikely that we would observe a sample with a value of the sample statistic (for example the sample mean) this far away from the Null Hypothesised value if that Null Hypothesis was true. X 14

For example in a class of 100 people. Suppose our Null Hypothesis is that the average age of the whole class is 31. Ho: the population mean age is 31. H 0 : µ = 31 H a : µ 31 15 If we took a sample from our population and the average age is 33 year we might say that average age of the population is not significantly different from 35. In this case we would accept the Null Hypothesis as being correct. However, suppose we now observe a value of 20 in a sample we have randomly chosen. That s very unlikely to have happened by chance if our Null Hypothesis was true. It s much more likely that our Null Hypothesis is false. 16

So we decide to reject our Null Hypothesis in favour of an alternative, which is that the true average age of the whole class is different from 31 years. = 20 Is X likely if μ = 31? Suppose the sample mean age is 20: X = 20 Random sample If not likely, REJECT Null Hypothesis 17 Sampling Distribution of X If the sample mean falls in this region we accept the null hypothesis 20 μ = 31 If H 0 is true X we reject the null hypothesis that μ = 31 if sample mean falls in either of these regions. 18

Rejection Regions and Critical Values A rejection region (or critical region) of the sampling distribution is the range of values for which the null hypothesis is not probable. A critical value separates the rejection region from the nonrejection region. 19 Level of Significance, α defines the unlikely values of the sample statistic if the null hypothesis is true. Defines rejection region of the sampling distribution α Typical values are 0.01, 0.05, or 0.10 20

Level of Significance, α is selected by the researcher at the beginning α By setting the level of significance at a small value, you are saying that you want the probability of rejecting a true null hypothesis to be small. Provides the critical value(s) of the test. 21 There are three types of hypothesis tests a left-, right-, or two-tailed test. The type of test depends on the region of the sampling distribution that favors a rejection of H 0. This region is indicated by the alternative hypothesis. α /2 α /2 α α 0 22

Level of significance = α Represents critical value. Left tailed Test 1. If the alternative hypothesis contains the less than inequality symbol (<), the hypothesis test is a left tailed test. H 0 : μ k H 1 : μ < k α 0 23 Right-tailed Test 2. If the alternative hypothesis contains the greater than symbol (>), the hypothesis test is a right tailed test. H 0 : μ k H a : μ > k 0 α 24

Two-tailed Test 3. If the alternative hypothesis contains the not equal to symbol ( ), the hypothesis test is a two tailed test. In a two tailed test, each tail has an area of α/2. H 0 : μ = k H 1 : μ k α /2 α /2 25 Statistical Tests After stating the null and alternative hypotheses and specifying the level of significance, a random sample is taken from the population and sample statistics are calculated. The statistic that is compared with the parameter in the null hypothesis is called the test statistic. A test statistic tells us how far, or how many standard deviations, a sample mean is from the population mean. The larger the value of the test statistic, the further the distance, or number of standard deviations, a sample mean is from the population mean stated in the null hypothesis. 26

If the population standard deviation is known, and the population is (approx.) Normally distributed then the test statistic, is, x µ z = σ n μ is the hypothesized population mean. X is the sample mean. σx is the population standard deviation. n is the sample size. σ n is the standard error. z, is how many standard errors, the observed sample mean is from the hypothesized mean. 27 If the population standard deviation is unknown then the only standard deviation we can determine is the sample standard deviation, s. This value of s can be considered an estimate of the population standard deviation. If the sample size is more than 30 we can use Normal Distribution. x µ z = s n Central Limit Theorem 28

Example: Find the critical value and rejection region for a right tailed test with α = 0.5%. 0 2.575 z The rejection region is to the right of z 0 = 2.575. 29 Decision Rule Based on Rejection Region To use a rejection region to conduct a hypothesis test, calculate the test statistic, z. If the test statistic 1. is in the rejection region, then reject H 0. 2. is not in the rejection region, then fail to reject H 0. Fail to reject H o. 0 z 0 Right-Tailed Test Reject H o. z z > z 0 30

Fail to reject H o. Reject H o. Reject H o. z z < z 0 z > z 0 z 0 0 Two-Tailed Test z 0 Fail to reject H o. Reject H o. z z < z 0 z 0 0 Left-Tailed Test 31 Hypothesis Testing Example Test the claim that the true mean # of TV sets in US homes is equal to 3. (Assume σ = 0.8) 1. State the appropriate null and alternative hypotheses H 0 : μ = 3 H 1 : μ 3 (This is a two tail test) 2. Specify the desired level of significance and the sample size Suppose that α = 0.05 and n = 100 are chosen for this test 32

3. Determine the appropriate technique σ is known, so this is a Z test. 4. Determine the critical values At a significance level of 5% for the test of a difference there is 2.5% in each tail. Using function NORMSINV in Excel this gives a critical value of z of 1.96. 33 5. Collect the data and compute the test statistic Suppose the sample results are n = 100, X = 2.84 (σ = 0.8 is assumed known) So the test statistic is: Z = X µ σ n = 2.84 0.8 100 3 =.16.08 = 2.0 34

6. Is the test statistic in the rejection region? α = 0.05/2 α = 0.05/2 Reject H 0 if Z < 1.96 or Z > 1.96; otherwise do not reject H 0 Reject H 0 Do not reject H 0 Z= 1.96 0 Here, Z = 2.0 < 1.96, so the test statistic is in the rejection region +Z= +1.96 Reject H 0 35 Since Z = 2.0 < 1.96, we reject the null hypothesis and conclude that there is sufficient evidence that the mean number of TVs in US homes is not equal to 3. 36

Connection to Confidence Intervals For X = 2.84, σ = 0.8 and n = 100, the 95% confidence interval is: 0.8 2.84 - (1.96) to 2.84 + (1.96) 100 0.8 100 [2.6832, 2.9968] Since this interval does not contain the hypothesized mean (3.0), we reject the null hypothesis at α = 0.05 37 Example: A local telephone company believes that the average length of a phone call is 8 minutes. H 0 : µ = 8 H a : µ 8 In a random sample of 58 phone calls, the sample mean was 7.8 minutes and the standard deviation was 0.5 minutes. Is there enough evidence to reject the Null at α = 0.05? 38

0.025 0.025 z z 0 = 1.96 0 z 0 = 1.96 At a significance level of 5% for the test of a difference there is 2.5% in each tail. Using function NORMSINV in Excel this gives a critical value of z of 1.96. 39 0.025 0.025 z z 0 = 1.96 0 z 0 = 1.96 The standardized test statistic is x µ z = = σ n 7.8 8 0.5 58 3.05. The test statistic falls in the rejection region, so H 0 is rejected. At the 5% level of significance, there is enough evidence to reject the claim that the average length of a phone call is 8 minutes. 40

Example: Right Tail Z Test for Mean A phone industry manager thinks that customer monthly cell phone bills have increased, and now average over $52 per month. The company wishes to test this claim. (Assume σ = 10 is known) Form hypothesis test: H 0 : μ 52 H 1 : μ > 52 the average is not over $52 per month the average is greater than $52 per month (i.e., sufficient evidence exists to support the manager s claim) 41 Suppose that α = 0.10 is chosen for this test Find Rejection Region α = 0.10 1.28 0 For a one tail test, at a significance level of 10% for the test there is 10% in the right tail. The area of the curve for the upper level is 100% 10% or 90.00%. Using [function NORMSINV] in Excel this gives a critical value of z of 1.28. 42

Find Rejection Region Reject H 0 α = 0.10 Do not reject H 0 0 1.28 Reject H 0 Reject H 0 if Z > 1.28 43 Obtain sample and compute the test statistic Suppose a sample is taken with the following results: n = 64, X = 53.1 (σ=10 was assumed known) Then the test statistic is: X µ 53.1 52 Z = = = 0.88 σ 10 n 64 44

Reach a decision and interpret the result: Reject H 0 α = 0.10 Do not reject H 0 0 Z = 0.88 1.28 Reject H 0 Do not reject H 0 since Z = 0.88 1.28 i.e.: there is not sufficient evidence that the mean bill is over $52 45 t-test for a Mean µ (n < 30, σ Unknown) The t-test can be used when the population is normal or nearly normal, σ is unknown, and n < 30. t = x µ s n The degrees of freedom are d.f. = n 1. 46

Example: Find the critical values t 0 and t 0 for a two tailed test given α = 0.10 and n = 12. The degrees of freedom are d.f. = n 1 = 12 1 = 11. Because the test is a two tail test, one critical value is negative and one is positive. t 0 = 1.796 and t 0 = 1.796 47 Example: Find the critical value t 0 for a right tailed test given α = 0.05 and n = 11. The degrees of freedom are d.f. = n 1 = 11 1 = 10. Because the test is a right tail test, the critical value is positive. Using function TINV from Excel the t value is 1.81. t 0 = 1.81 48

TINV function returns the two tailed inverse of the t distribution. A one tailed t value can be returned by replacing probability with 2*probability. For a probability of 0.05 and degrees of freedom of 10, the two tailed value is calculated with TINV(0.05,10), which returns 2.28139. The one tailed value for the same probability and degrees of freedom can be calculated with TINV(2*0.05,10), which returns 1.812462. 49 Example: The average cost of a hotel room in Tel Aviv is said to be $168 per night. A random sample of 25 hotels resulted in X = $172.50 and S = $15.40. Test at the α = 0.05 level. (Assume the population distribution is normal) H 0 : μ = 168 H 1 : μ 168 50

α = 0.05 n= 25 σ is unknown, n<30 so use a t statistic Critical Value: t 24 = ± 2.0639 α/2=.025 α/2=.025 Reject H 0 Reject H t 0 n 1,α/2 Do not reject H 0 t n 1,α/2 0 2.0639 2.0639 51 X µ S 172.50 168 15.40 tn 1 = = = n 25 1.46 α/2=.025 α/2=.025 Reject H 0 Reject H t 0 n 1,α/2 Do not reject H 0 t n 1,α/2 0 2.0639 2.0639 Do not reject H 0 : not sufficient evidence that true mean cost is different than $168 52

Connection to Confidence Intervals For X = 172.5, S = 15.40 and n = 25, the 95% confidence interval is: 172.5 (2.0639) 15.4/ 25 to 172.5 + (2.0639) 15.4/ 25 [166.14,178.86] Since this interval contains the Hypothesized mean (168), we do not reject the null hypothesis at α = 0.05 53 Example: A certain country has made its budget on the bases that the average individual average tax payments for the year will be $30,000. The financial controller takes a random sample of annual tax returns and these amounts in dollars are as follows. 34,000 12,000 16,000 10,000 2,000 39,000 7,000 72,000 24,000 15,000 19,000 12,000 23,000 14,000 6,000 43,000 54

At a significance level, α, of 5% is there evidence that the average tax returns of the state will be different than the budget level of $30,000 in this year? The null and alternative hypotheses are as follows: Null hypothesis: H0: μ = $30,000. Alternative hypothesis: H1: μ $30,000. Since we have no information of the population standard deviation, and the sample size is less than 30, we use a t distribution (assuming the population is normally distributed). 55 Sample size, n, is 16. Degrees of freedom, (n 1) are 15. Using [function TINV] from Excel the t value is 2.1315. Therefore, ±2.1315 are the critical values. From Excel, using [function AVERAGE]: Mean value of this sample data is $21,750.00. 56

From [function STDEV] in Excel, the sample standard deviation, s, is $17,815.72 Estimate of the standard error is, s 17,815.72 n = = 4,453.93 16 From equation the test statistic is, x µ t = =-1.8523 s n 57 Since the sample statistic, 1.8523, is not less than the test statistic of 2.1315, there is no reason to reject the null hypothesis and so we accept that there is no evidence that the average of all the tax receipts will be significantly different from $30,000. 58

Example: A local telephone company claims that the average length of a phone call is 8 minutes. In a random sample of 18 phone calls, the sample mean was 7.8 minutes and the standard deviation was 0.5 minutes. Is there enough evidence to reject this claim at α = 0.05? H 0 : µ = 8 H a : µ 8 The level of significance is α = 0.05. The test is a two-tailed test. Degrees of freedom are d.f. = 18 1 = 17. 59 The critical values are t 0 = 2.110 and t 0 = 2.110 z The standardized test statistic is t = x µ 7.8 8 = s n 0.5 18 1.70. t 0 = 2.110 0 t 0 = 2.110 The test statistic falls in the nonrejection region, so H 0 is not rejected. At the 5% level of significance, there is not enough evidence to reject the claim that the average length of a phone call is 8 minutes. 60

6 Steps in Hypothesis Testing 1. State the null hypothesis, H 0 and the alternative hypothesis, H 1 2. Choose the level of significance, α, and the sample size, n 3. Determine the appropriate test statistic and sampling distribution 4. Determine the critical values that divide the rejection and nonrejection regions 61 6 Steps in Hypothesis Testing 5. Collect data and compute the value of the test statistic. 6. Make the statistical decision. If the test statistic falls into the nonrejection region, do not reject the null hypothesis H 0. If the test statistic falls into the rejection region, reject the null hypothesis. 62

APPENDIX 63 Types of Errors No matter which hypothesis represents the claim, always begin the hypothesis test assuming that the null hypothesis is true. At the end of the test, one of two decisions will be made: 1. reject the null hypothesis, or 2. fail to reject the null hypothesis. A Type I error occurs if the null hypothesis is rejected when it is true. A Type II error occurs if the null hypothesis is not rejected when it is false. 64

Decision Do not reject H 0 Reject H 0 Actual Truth of H 0 H 0 is true H 0 is false Correct Decision Type II Error Type I Error Correct Decision The probability of Type I Error is α 65 Example: The Haifa Technion claims that 94% of their graduates find employment within six months of graduation. What will a type I or type II error be? H 0 : p = 0.94 (Claim) H 1 : p 0.94 A Type I error is rejecting the null when it is true. The population proportion is actually 0.94, but is rejected. (We believe it is not 0.94.) A Type II error is failing to reject the null when it is false. The population proportion is not 0.94, but is not rejected. (We believe it is 0.94.) 66