Statistics 251: Statistical Methods

Similar documents
Statistics 301: Probability and Statistics 1-sample Hypothesis Tests Module

Tests about a population mean

STAT Chapter 8: Hypothesis Tests

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

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

Mathematical statistics

8.1-4 Test of Hypotheses Based on a Single Sample

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

Single Sample Means. SOCY601 Alan Neustadtl

T.I.H.E. IT 233 Statistics and Probability: Sem. 1: 2013 ESTIMATION AND HYPOTHESIS TESTING OF TWO POPULATIONS

Chapter 7: Hypothesis Testing - Solutions

Econ 325: Introduction to Empirical Economics

Sampling distribution of t. 2. Sampling distribution of t. 3. Example: Gas mileage investigation. II. Inferential Statistics (8) t =

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

10.4 Hypothesis Testing: Two Independent Samples Proportion

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

Chapter 7 Comparison of two independent samples

SMAM 314 Exam 3d Name

Mathematical statistics

Hypothesis for Means and Proportions

ECO220Y Review and Introduction to Hypothesis Testing Readings: Chapter 12

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

CIVL /8904 T R A F F I C F L O W T H E O R Y L E C T U R E - 8

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

Inference for Single Proportions and Means T.Scofield

Sampling, Confidence Interval and Hypothesis Testing

Chapter 5: HYPOTHESIS TESTING

Section 9.4. Notation. Requirements. Definition. Inferences About Two Means (Matched Pairs) Examples

Exam 2 (KEY) July 20, 2009

CHAPTER 10 Comparing Two Populations or Groups

Chapter 7: Hypothesis Testing

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

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

Chapter 9 Inferences from Two Samples

Unit 19 Formulating Hypotheses and Making Decisions

10.2: The Chi Square Test for Goodness of Fit

Probability and Statistics

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

Probability Methods in Civil Engineering Prof. Dr. Rajib Maity Department of Civil Engineering Indian Institution of Technology, Kharagpur

23. MORE HYPOTHESIS TESTING

Elementary Statistics Triola, Elementary Statistics 11/e Unit 17 The Basics of Hypotheses Testing

The t-test: A z-score for a sample mean tells us where in the distribution the particular mean lies

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

Two-Sample Inferential Statistics

Chapters 4-6: Inference with two samples Read sections 4.2.5, 5.2, 5.3, 6.2

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

Sampling Distributions: Central Limit Theorem

Ch. 7: Estimates and Sample Sizes

Review. December 4 th, Review

EXAM 3 Math 1342 Elementary Statistics 6-7

SMAM 314 Exam 3 Name. F A. A null hypothesis that is rejected at α =.05 will always be rejected at α =.01.

CHAPTER 9: HYPOTHESIS TESTING

MTMS Mathematical Statistics

10.1. Comparing Two Proportions. Section 10.1

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:

Hypothesis Testing. ECE 3530 Spring Antonio Paiva

MAT2377. Rafa l Kulik. Version 2015/November/23. Rafa l Kulik

9.5 t test: one μ, σ unknown

Chapter 23. Inference About Means

hypotheses. P-value Test for a 2 Sample z-test (Large Independent Samples) n > 30 P-value Test for a 2 Sample t-test (Small Samples) n < 30 Identify α

Chapter 24. Comparing Means. Copyright 2010 Pearson Education, Inc.

HYPOTHESIS TESTING. Hypothesis Testing

Statistical Process Control (contd... )

Mathematical Notation Math Introduction to Applied Statistics

Difference Between Pair Differences v. 2 Samples

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

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

Chapter Three. Hypothesis Testing

Inferential statistics

ECO220Y Hypothesis Testing: Type I and Type II Errors and Power Readings: Chapter 12,

STP 226 EXAMPLE EXAM #3 INSTRUCTOR:

CENTRAL LIMIT THEOREM (CLT)

CH.9 Tests of Hypotheses for a Single Sample

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

DETERMINE whether the conditions for performing inference are met. CONSTRUCT and INTERPRET a confidence interval to compare two proportions.

Statistical Inference. Section 9.1 Significance Tests: The Basics. Significance Test. The Reasoning of Significance Tests.

Hypothesis Testing. ) the hypothesis that suggests no change from previous experience

Applied Statistics for the Behavioral Sciences

LAB 2. HYPOTHESIS TESTING IN THE BIOLOGICAL SCIENCES- Part 2

ST Introduction to Statistics for Engineers. Solutions to Sample Midterm for 2002

Visual interpretation with normal approximation

Introduction to the Analysis of Variance (ANOVA)

PhysicsAndMathsTutor.com

What is a Hypothesis?

CHAPTER 10 Comparing Two Populations or Groups

CHAPTER 10 Comparing Two Populations or Groups

POLI 443 Applied Political Research

Chapter 12: Inference about One Population

Ch18 links / ch18 pdf links Ch18 image t-dist table

5.2 Tests of Significance

Statistics for IT Managers

MONT 105Q Mathematical Journeys Lecture Notes on Statistical Inference and Hypothesis Testing March-April, 2016

Hypothesis tests

Chapter 23: Inferences About Means

Statistical Inference. Hypothesis Testing

Study Ch. 9.3, #47 53 (45 51), 55 61, (55 59)

Multiple Regression Analysis

1 Hypothesis testing for a single mean

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

LECTURE 12 CONFIDENCE INTERVAL AND HYPOTHESIS TESTING

Transcription:

Statistics 251: Statistical Methods 1-sample Hypothesis Tests Module 9 2018

Introduction We have learned about estimating parameters by point estimation and interval estimation (specifically confidence intervals). More often than not, the objective of an investigation is not to estimate a parameter but to decide which of two (or more) contradictory claims about the parameter is correct. This part of statistics is called hypothesis testing

Terms I Statistical hypotheses is a claim or assertion about 1. The value of a single parameter 2. The values of several parameters 3. The form of an entire probability distribution Hypotheses 1. Null hypothesis, denoted by H 0, is the claim that is initially assumed to be true (the prior belief or historical claim) 2. Alternative hypothesis, denoted by H a, is the assertion that is contradictory to H 0 ; it is a researcher s claim, what they are trying to prove (thus the reason behind the study)

Terms II Test of hypotheses: is a method for using sample data to decide whether the null hypothesis should be rejected Test conclusions are either rejecting H 0, or failing to reject H 0 When we fail to reject H 0, sometimes we dont know for certain whether or not the null hypothesis is actually true

Hypothesis Testing Checklist All tests include the following four steps: 1. State hypotheses, check assumptions 2. Calculate the test statistic 3. Find the rejection region 4. Results and conclusion of the test

Results and conclusion Results, we either: 1. Reject H 0 (rejecting the null hypothesis in favor of the alternative) 2. Fail to reject H 0 (we are not rejecting the null hypothesis so that means that the null hypothesis could give a reasonable explanation of the question at hand) Conclusion: explain what the results did in relation to the actual data

Hypotheses When stating the hypotheses, the notation used is always population parameter notation; inferences upon populations need population notation (the Greek letters) µ for the mean and p for the proportion

Hypotheses for µ Hypotheses for inferences concerning means (regardless of whether or not σ is known H 0 : µ = µ 0 vs. H a : µ µ 0 H 0 : µ µ 0 vs. H a : µ < µ 0 H 0 : µ µ 0 vs. H a : µ > µ 0 Most often the null hypothesis will have = while the alternative will be one of either, >, or <. µ 0 is a specified value (a number that is given in the problem)

Hypotheses fpr p Hypotheses for inferences concerning proportions: H 0 : p = p 0 vs. H a : p p 0 H 0 : p p 0 vs. H a : p < p 0 H 0 : p p 0 vs. H a : p > p 0 Most often the null hypothesis will have = while the alternative will be one of either, >, or <. p 0 is a specified value (a number that is given in the problem)

Assumptions 1. Independence: observations are independent from one another 2. Randomization: proper randomization was used 3. Normality Takes care of independence issue if there is one 3.1 Means need an approximate normal distribution (n 30 should take care of it) 3.2 Proportions need to meet the S/F condition which is np 5 and nq 5 If assumptions are violated, the results from the analyses are not valid nor reliable

Test Statistic 1-sample test of the mean µ when σ is known: Use Z z = X µ 0 se mean ; se mean = σ n 1-sample test of the proportion p: Use Z z = ˆp p 0 p0 q 0 ; se p = se p n 1-sample test of the mean µ when σ is unknown: Use t t = X µ 0 se mean ; se mean = s n

Rejection Region Is based on significance level α. α = 1 CL where CL is the confidence level Always assume α = 0.05 unless specified otherwise) Two methods for rejection: 1. Critical value approach 2. pvalue approach The alternative hypothesis (H a ) determines rejection based on where you are at on the curve

Critical Value Approach H a :< Reject H 0 iff (if and only if) z calc z α (z calc will most likely be a negative value and z α must be negative) 0.4 0.3 Density 0.2 criteria retain reject 0.1 0.0 4 2 0 2 4

Critical Value Approach H a :> Reject H 0 iff z calc z α (z calc will most likely be a positive value and z α must be positive) 0.4 0.3 Density 0.2 criteria retain reject 0.1 0.0 4 2 0 2 4

Critical Value Approach H a : Reject H 0 iff z calc z α/2 (z calc and z α can both be either positive or negative, but we will deal with absolute values) (white area is the rejection region, and yes there are two area here that are both the rejection region) 99% CI dnorm(x, 0, 1) 0.0 0.2 0.4 3 1 1 2 3

Results and Conclusion Results: we either Reject H 0 (rejecting the null hypothesis in favor of the alternative) Fail to reject H0 (we are not rejecting the null hypothesis so that means that the null hypothesis gives a reasonable explanation of the question at hand) Conclusion: explain what the results did in relation to the actual data

Errors Type I=α = P(reject H 0 H 0 true), meaning we rejected a true null hypothesis. Type I can only happen when H 0 is rejected Type II=β = P(Fail to reject H 0 H 0 false), meaning we kept a false hypothesis. Type II can only happen when H 0 is not rejected Power=1 β = P(correctly reject H 0 ), meaning the probability that we correctly reject H 0 when H 0 is true. Figure 1: Errors

Example test of µ with known σ A manufacturer of sprinkler systems used for fire protection in office buildings claims that the true average system-activation temperature is 130 F. It is known from previous studies that the temperatures are normally distributed with standard deviation 1.5 F. A sample of n = 9 systems, when tested yields a sample average activation temperature of 131.08 F. Is there sufficient evidence that the true mean activation temperature is more than what the manufacturer claims?

Example test of µ with unknown σ (use s) New York City, NY is known as the city that never sleeps. A random sample of 25 New Yorkers was taken and they were asked how much sleep they get per night. Given the data, is there evidence that New Yorkers sleep is different from the norm ; a full 8 hours of sleep? From the sample, the mean was 7.73 hours with standard deviation 0.77 hours.

Example test of p Ingots are huge pieces of metal often weighing more than 10 tons (20,000 lbs.). They must be cast in one large piece for use in fabricating large structural parts for cars and planes. If they crack while being made, the crack can propagate into the zone required for the part, compromising its integrity; metal manufacturers would like to avoid cracking if at all possible. In one plant, only about 80% of the ingots have been defective-free. In an attempt to reduce the cracking, the plant engineers and chemists have tried some new methods for casting the ingots and from a sample of 500 ingot cast in the new method, 16% of the casts were found to be defective (cracked). Is there sufficient evidence that the defective rate has decreased?

pvalue logistics I The pvalue of a test is the probability that, given the null hypothesis (H 0 ) is true, the results from another random sample will be as or more extreme as the results we observed from our sample. The pvalue of the test is dependent on the type of test you are doing, as in one-tail upper, one-tail lower, or two-tail. The sign of the alternative hypothesis is the determining factor in calculation of the pvalue.

pvalue logistics II The pvalue approach; the null hypothesis can be rejected iff (if and only if) pvalue α (with α = 0.05 most often). This does not change, regardless of the sign of the alternative hypothesis. However, the calculation of the pvalue is dependent on the sign of the alternative hypothesis. The pvalue will be the P( the results of the test H 0 is correct), in other words, it is the probability that the results would occur by random chance if the null hypothesis is actually correct. Assume that α = 0.05 unless specified; any rejection of H 0 means that the results (of experiment, survey, etc.) are significant. pvalue α Reject H 0

H a : > upper tail test Note that while all examples are with z, it is interchangeable with t (df is needed) In this case, pvalue represents the rejection region in the right tail of the distribution. pvalue = P(Z z calc ) = 1 P(Z z calc ) pvalue for upper tail test dnorm(x).0 0.2 0.4

H a : < lower tail test pvalue = P(Z z calc ) pvalue for lower tail test dnorm(x) 0.0 0.2 0.4 3 1 1 2 3 Test Statistic

H a : two tail test pvalue = 2[P(Z z calc )] or 2[1 P(Z z calc )] = 2[1 P(Z z calc )] pvalue for 2 tailed test Probability Density 0.0 0.2 0.4 4 2 0 2 4 Test statistic

pvalue rejection Examples 1. pvalue = 0.4 with α = 0.05. Since pvalue = 0.4 α(0.05), H 0 is not rejected (fail to reject H 0 ). There is a 40% chance that we would see these results due to random chance (dumb luck) if the null hypothesis is correct; results are not significant. 2. pvalue = 0.04 with α = 0.05. Since pvalue = 0.04 α(0.05), H 0 is rejected. There is a 4% chance that we would see these results due to random chance (dumb luck) if the null hypothesis is correct; results are significant. 3. pvalue = 0.04 with α = 0.01. Since pvalue = 0.04 α(0.01), H 0 is not rejected. There is a 4% chance that we would see these results due to random chance (dumb luck) if the null hypothesis is correct; results are not significant.

pvalue Hand calculations I 1. z calc = 1.99, H a :<, pvalue = P(Z z calc ) = 0.0233. Since pvalue = 0.0233 α(0.05), H 0 is rejected. There is a 2.33% chance that we would see these results due to random chance (dumb luck) if the null hypothesis is correct; results are significant. 2. z calc = 1.99, H a :, pvalue = 2P(Z z calc ) = 0.0466. Since pvalue = 0.0466 α(0.05), H 0 is rejected. There is a 4.66% chance that we would see these results due to random chance (dumb luck) if the null hypothesis is correct; results are significant. Note that the pvalue is almost equal to α, but as long as pvalue α Reject H 0.

pvalue Hand calculations II (3) z calc = 1.99, H a :> and α = 0.01. pvalue = P(Z z calc ) = 1 P(Z z calc ) = 1 0.9767 = 0.0233. Since pvalue = 0.0233 α(0.10), H 0 is not rejected. There is a 2.33% chance that we would see these results due to random chance (dumb luck) if the null hypothesis is correct; results are not significant.

Answers: Sprinklers H 0 : µ = 130 H a : µ > 130 (assumptions are met: independent, random sample with normal distribution so the sample size requirement is not needed here use z) Provided information: x = 131.08, σ = 1.5, n = 9, se = σ n = 1.5 9 = 0.5, µ 0 = 130 Test statistic: z = x µ se = 131.08 130 0.5 = 2.16

Answers: Sprinklers con t Rejection region (critical value): Since H a :>, it is an upper-tail test (also called a one-tailed test). α will give the probability (area) and we need to find the z-score that is associated with that area. α = 0.05, so we need to find z 0.05 = 1.645. We can reject H 0 iff z calc z α. Results and conclusion: 2.16 1.645 so we will reject H 0. With H 0 rejected, there is evidence the mean activation temperature is higher than the manufacturer s claim of 130 F (maybe their manufacturing equipment need recalibration?).

Answers: Ingots H 0 : p = 0.2 H a : p < 0.2 (assumptions are met: independent, random sample with large sample n = 500, proportions always use z) Provided information: ˆp = 0.16, n = 500, se = p0 q 0 n = (0.2)(0.8) 500 = 0.0179, p 0 = 0.20 Test statistic: z = ˆp p 0 se = 0.16 0.2 0.0179 = 2.23

Answers: Ingots con t Rejection region (critical value): Since H a :<, it is an lower-tail test (also called a one-tailed test). α will give the probability (area) and we need to find the z-score that is associated with that area. α = 0.05, so we need to find z 0.05 = 1.645. We can reject H 0 iff z calc z α. Results and conclusion: 2.23 1.645 so we will reject H 0. With H 0 rejected, there is evidence the new casting method s defective rate is significantly less than the current method.

Answers: NY sleep H 0 : µ = 8 H a : µ 8 (assumptions are met: independent, random sample with small sample and unknown σ Rightarrow use t). Provided information: x = 7.73, s = 0.77, n = 25, se = s n = 0.77 25 = 0.154, µ 0 = 8 Test statistic: t = x µ se = 7.73 8 0.154 = 2.16

Answers: NY sleep con t Rejection region (critical value): Since H a :, it is an two-tailed test. α/2 will give the probability (area) and we need to find the t-score that is associated with that area and its df (degrees of freedom). α/2 = 0.05/2 = 0.025, so we need to find t 0.025,24 = 2.064. We can reject H 0 iff t calc t α/2,df. Results and conclusion: 1.753 2.064 so we will fail to reject H 0. With H 0 not rejected, there is not enough evidence that New Yorkers get something other than the 8 hours of sleep.