STAT 515 fa 2016 Lec Statistical inference - hypothesis testing

Similar documents
CH.9 Tests of Hypotheses for a Single Sample

9-7: THE POWER OF A TEST

Statistical Process Control (contd... )

Tests about a population mean

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

Chapter 8 of Devore , H 1 :

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

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

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

STAT Chapter 8: Hypothesis Tests

Chapter 7: Hypothesis Testing

Exam 2 (KEY) July 20, 2009

CHAPTER 9: HYPOTHESIS TESTING

Hypothesis for Means and Proportions

Design of Engineering Experiments Part 2 Basic Statistical Concepts Simple comparative experiments

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

EC2001 Econometrics 1 Dr. Jose Olmo Room D309

Partitioning the Parameter Space. Topic 18 Composite Hypotheses

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

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

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

HYPOTHESIS TESTING. Hypothesis Testing

Hypothesis Testing. ECE 3530 Spring Antonio Paiva

Inferential statistics

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

Single Sample Means. SOCY601 Alan Neustadtl

STAT 513 fa 2018 Lec 02

23. MORE HYPOTHESIS TESTING

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

1; (f) H 0 : = 55 db, H 1 : < 55.

Hypothesis testing I. - In particular, we are talking about statistical hypotheses. [get everyone s finger length!] n =

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

Inferences for Regression

Chapter 9 Inferences from Two Samples

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

Section 9.1 (Part 2) (pp ) Type I and Type II Errors

Difference between means - t-test /25

Hypothesis testing. Data to decisions

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

INTERVAL ESTIMATION AND HYPOTHESES TESTING

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)

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

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

Statistical Inference

CHAPTER 10 Comparing Two Populations or Groups

CHAPTER 10 Comparing Two Populations or Groups

CHAPTER 10 Comparing Two Populations or Groups

Preliminary Statistics. Lecture 5: Hypothesis Testing

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

Review. December 4 th, Review

Relating Graph to Matlab

Chapter Three. Hypothesis Testing

Review: General Approach to Hypothesis Testing. 1. Define the research question and formulate the appropriate null and alternative hypotheses.

This gives us an upper and lower bound that capture our population mean.

Probability and Statistics

Mathematical statistics

Inferential Statistics. Chapter 5

0 0'0 2S ~~ Employment category

EXAM 3 Math 1342 Elementary Statistics 6-7

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

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

BIO5312 Biostatistics Lecture 6: Statistical hypothesis testings

Chapter 7. Inference for Distributions. Introduction to the Practice of STATISTICS SEVENTH. Moore / McCabe / Craig. Lecture Presentation Slides

Chapter 23. Inference About Means

Visual interpretation with normal approximation

8.1-4 Test of Hypotheses Based on a Single Sample

Preliminary Statistics Lecture 5: Hypothesis Testing (Outline)

Chapter 7 Comparison of two independent samples

Inferences About Two Proportions

Answer keys for Assignment 10: Measurement of study variables (The correct answer is underlined in bold text)

MA131 Lecture For a fixed sample size, α and β cannot be lowered simultaneously.

Chapter 5: HYPOTHESIS TESTING

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

Quantitative Analysis and Empirical Methods

STAT 135 Lab 5 Bootstrapping and Hypothesis Testing

9/2/2010. Wildlife Management is a very quantitative field of study. throughout this course and throughout your career.

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

Hypothesis Testing: One Sample

Sleep data, two drugs Ch13.xls

Mathematical statistics

their contents. If the sample mean is 15.2 oz. and the sample standard deviation is 0.50 oz., find the 95% confidence interval of the true mean.

The Purpose of Hypothesis Testing

Statistical Inference. Hypothesis Testing

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

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

The Components of a Statistical Hypothesis Testing Problem

Sampling, Confidence Interval and Hypothesis Testing

Wooldridge, Introductory Econometrics, 4th ed. Appendix C: Fundamentals of mathematical statistics

Performance Evaluation and Comparison

(8 One- and Two-Sample Test Of Hypothesis)

Introduction to Statistical Hypothesis Testing

5.2 Tests of Significance

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

STA Module 10 Comparing Two Proportions

STAT 513 fa 2018 Lec 05

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

6.4 Type I and Type II Errors

Math 101: Elementary Statistics Tests of Hypothesis

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

Transcription:

STAT 515 fa 2016 Lec 20-21 Statistical inference - hypothesis testing Karl B. Gregory Wednesday, Oct 12th Contents 1 Statistical inference 1 1.1 Forms of the null and alternate hypothesis for µ and p.................... 2 1.2 Type I and Type II errors.................................... 2 2 Hypothesis testing 3 2.1 A test statistic for hypotheses about µ (σ known)....................... 3 2.2 A test statistic for hypotheses about µ (σ unknown)...................... 6 2.3 Equivalence of confidence intervals and two-sided hypothesis tests.............. 7 1 Statistical inference A statistical inference is a conclusion about a population based on a random sample. More specifically, given a statement about the population, a statistical inference is a decision to reject or not to reject the statement in light of the sample data. The statement subject to our rejection or non-rejection is called the null hypothesis. The statement which conveys the opposite about the population is called the alternate hypothesis. We typically denote the null and alternate hypotheses as H 0 and H 1. We read H 0 as H naught. For example, suppose X is a random variable with unknown mean µ. It could represent a draw from a population with an unknown mean µ. A null hypothesis could be to which the alternate hypothesis would be H 0 : µ 5, H 1 : µ 5. To reach a decision regarding H 0 and H 1, we consider the evidence contained in a random sample X 1,..., X n of X values. Our statistical inference that is our decision regarding H 0 and H 1 must be one of the following: 1. We reject H 0 and therefore conclude that H 1 is true. 2. We do not reject H 0. For number 2 people also like to say, We fail to reject H 0. It is important to note that if we do not reject H 0, we do not conclude that H 0 is true. We simply say, We do not reject H 0, or, Our data do not lead us to reject H 0. 1

1.1 Forms of the null and alternate hypothesis for µ and p The null and alternate hypotheses are mathematical expressions involving population parameters. As a convention, the null hypothesis H 0 always contains an equality. In this course, for statistical inference about the mean µ, the hypotheses H 0 and H 1 will always be one of the following: H 0 : µ µ 0 or H 0 : µ µ 0 or H 0 : µ µ 0 H 1 : µ < µ 0 H 1 : µ µ 0 H 1 : µ > µ 0, where µ 0 is a specific value of the unknown parameter µ used to define the null hypothesis. Sometimes we call µ 0 the null value of µ. Note that the book will write H 0 : µ µ 0 or H 0 : µ µ 0 or H 0 : µ µ 0 H 1 : µ < µ 0 H 1 : µ µ 0 H 1 : µ > µ 0. For statistical inference about a proportion p, the hypotheses H 0 and H 1 in this course will always be one of the following: H 0 : p p 0 or H 0 : p p 0 or H 0 : p p 0 H 1 : p < p 0 H 1 : p p 0 H 1 : p > p 0, where p 0 is a specific value of the unknown parameter p used to define the null hypothesis. Sometimes we call p 0 the null value of p. Note that the book will write H 0 : p p 0 or H 0 : p p 0 or H 0 : p p 0 H 1 : p < p 0 H 1 : p p 0 H 1 : p > p 0. More complex hypotheses could be constructed, but hypotheses of these forms are the most common in practice. Example 1 Consider 6.45 from the text. What are the relevant hypotheses H 0 and H 1? What logic led everyone to reject H 0? 1.2 Type I and Type II errors Since we are using data from a random sample to make conclusions about a population, there is always a chance that our conclusions will be false. If we were to repeat our experiment or gather our data many many times, we would sometimes draw a sample leading us to reject H 0 and would sometimes draw a sample leading us to not reject H 0. We would like to test hypotheses in such a way that we control the probability of reaching a false conclusion. There are two ways in which our conclusion can be false: 1. To reject H 0 when H 0 is true is to commit a Type I error. 2. To fail to reject H 0 when H 0 is false is to commit a Type II error. We approach hypothesis testing with a view to controlling the probability of a Type I error. We denote the maximum allowable Type I error rate (or probability of a Type I error) by α. We would like to test hypotheses in such a way that we do not make Type I errors more than a proportion α of the time. The value α is also called the significance level. We denote by β the rate at which we commit Type II errors, i.e., β is the probability with which we fail to reject H 0 when H 0 is false. It turns out that this probability is not directly under our control, so we approach hypothesis testing with the Type I error probability α in mind. More on α and β will be said later. 2

2 Hypothesis testing Deciding from the sample data whether to reject or not to reject the null hypothesis is referred to as testing the null hypothesis. In order the test the null hypothesis, we will compute from our random sample a quantity called a test statistic. From the test statistic we will judge the plausibility of the null hypothesis in light of the data. 2.1 A test statistic for hypotheses about µ (σ known) Suppose that X 1,..., X n are a random sample of X values, where X has unknown mean µ and known variance σ 2. Our best guess of µ from the sample is X, so in order to test a hypothesis concerning µ, we should start by looking at the value of X. Let s consider each possible set of hypotheses about µ in turn: 3

Values of X which are far away from µ0 in the direction of the alternative hypothesis cast doubt on the null hypothesis. When there is enough doubt, we will reject H 0. To be precise about how much doubt is enough doubt we specify for each set of hypotheses a region such that if X falls within this region we reject H 0. Moreover, we choose this region such that the Type I error probability does not exceed α. We can depict our choices of rejection region as follows: To summarize, we have the following criteria for rejecting H 0 at significance level α when σ is known: H 0 : µ µ 0 H 0 : µ µ 0 H 0 : µ µ 0 H 1 : µ < µ 0 H 1 : µ µ 0 H 1 : µ > µ 0 < z α > z α/2 > z α 4

The quantity is called the test statistic. It is the quantity upon which our decision to reject or not to reject the null hypothesis depends. Example 2 Refer to 6.92 of the textbook. Suppose a bottler of soft-drinks claims that its bottling process results in an internal pressure of 157 psi with a standard deviation σ 3 psi. You are interested in contracting with the bottler, but you will not do so if the mean internal pressure is less than what the producer stated. 1. Question: What are the relevant hypotheses? Answer: Look for the strict inequality. This goes in the alternate hypothesis. So H 1 : µ < 157 and thus H 0 : µ 157. If we reject H 0, we conclude H 1 and we do not purchase from this bottler. 2. Suppose you collect a sample of size n 40 and get a sample mean of X 155.7. Suppose σ 3. Question: Do you reject or not reject the null hypothesis at the α.05 significance level? Answer: We have a sample mean which is below the mean claimed by the bottler, but is it low enough for us to reject the bottler s claim? To find out, we must compute the test statistic: 155.7 157 3/ 40 2.741. This value is less than z.05 1.645, so we reject the null hypothesis, concluding that the bottler s claim is false. Example 3 Refer to 6.84 of the textbook. A machine should produce ball bearings such that the standard deviation of the diameters is σ.001 inches. The mean diameter should be.5 inches. You would like to know whether the mean diameter of the ball bearings is different from the targeted diameter of.5 inches. 1. Question: What are the relevant hypotheses? Answer: Put the strict inequality in the alternative: The key word is different from, which is. So we have H 1 : µ.5 and H 0 : µ.5. If we reject H 0, we conclude that the machine is not producing ball bearings with the targeted mean diameter. 2. Suppose that the diameters are Normally distributed. You take a random sample of 5 ball bearings and compute a mean diameter of.499. Question: Make a decision to reject or not to reject the H 0 at the α.05 significance level. Answer: We will reject H 0 if the sample mean is sufficiently far away from.5. In order to know if the X.499 is far enough away from.5 for us to reject H 0 : µ 5, we must compute the test statistic:.499.5.001/ 5 2.24. We compare the absolute value of this with z.025 1.96. Since 2.24 > 1.96, we reject H 0 and conclude at the.05 significance level that the machine is not producing ball bearings with mean diameter.5. Example 4 Suppose you have a random sample of size n 35 with sample mean X 25 from a rightskewed population with unknown mean µ and variance σ 2 10. 5

1. Question: Test the hypotheses H 0 : µ 27 versus H 1 : µ < 27 Answer: The null value µ 0 of µ is µ 0 27. We will reject H 0 : µ 27 if the sample mean X is far enough below µ 0 27. To determine whether X is far enough below µ 0 27, we compute the test statistic 25 27 10/ 35 1.18. We now compare the value of the test statistic to the value z α z.05 1.645. Since 1.18 > 1.645, we fail to reject H 0 : µ 27 at the.05 significance level; X is not far enough below µ0 27 for us to reject the claim that µ 27. 2. Question: Test the hypotheses H 0 : µ 27 versus H 1 : µ 27 Answer: The value of the test statistic is the same, but now we compare its absolute value to z α/2 z.025 1.96. We see that 1.18 < 1.96, so we fail to reject H 0 : µ 27 at the.05 significance level; the sample mean X is not far enough away from µ 0 27 in order for us to reject the claim that µ 27. 3. Question: Test the hypotheses H 0 : µ 27 versus H 1 : µ > 27 Answer: We note that the value of the sample mean X 25 is in support of the null hypothesis. The data cannot lead us to reject it. We fail to reject H 0. 2.2 A test statistic for hypotheses about µ (σ unknown) We just replace σ with s in the above as well as z α with t n 1,α and z α/2 with t n 1,α/2. We can draw pictures in this setting which are analogous to those in the previous section. To summarize, we have the following criteria for rejecting H 0 at significance level α when σ is unknown: The quantity H 0 : µ µ 0 H 0 : µ µ 0 H 0 : µ µ 0 H 1 : µ < µ 0 H 1 : µ µ 0 H 1 : µ > µ 0 s/ n < t n 1,α s/ n s/ n > t n 1,α/2 s/ n > t n 1,α is called the test statistic. It is the quantity upon which our decision to reject or not to reject the null hypothesis depends. Example 5 The average height of 14 randomly selected 10-yr-old Loblolly pine trees was X 27.44 and the sample standard deviation was s 1.54. Assume that the heights of 10-yr-old Loblolly pine trees are Normally distributed. 6

1. Question: Test the hypotheses H 0 : µ 26 versus H 1 : µ > 26 Answer: The null value µ 0 of µ is µ 0 26. We will reject H 0 if X is far enough above µ0 26. To see whether X is far enough above µ 0 26, we compute the test statistic s/ n 27.44214 26 1.537887/ 14 3.5. The value to which we must compare the test statistic is t n 1,α t 13,.05 1.77. Since the value of our test statistic exceeds the α.05 critical value, we reject H 0 : µ 26 at the.05 significance level. 2. Question: Test the hypotheses H 0 : µ 26 versus H 1 : µ 26 Answer: We compute the same test statistic: Its value is 3.5. Now, however, we check whether it is greater that t 13,α/2 in absolute value. We have t 13,.025 2.16. Since 3.5 > 2.16, we reject H 0 : µ 26 at the.05 significance level. 3. Question: Test the hypotheses H 0 : µ 26 versus H 1 : µ < 26 Answer: The value of X exceeds µ0 26, so it lies in region specified by H 0. The sample contains no evidence against H 0, so we fail to reject H 0 : µ 26. 2.3 Equivalence of confidence intervals and two-sided hypothesis tests Whenever we have hypotheses of the form H 0 : µ µ 0 versus H 1 : µ µ 0 we can perform a test at significance level α by simply checking whether the (1 α)100% confidence interval contains µ 0. If the confidence interval contains µ 0, we fail to reject H 0. If the confidence interval does not contain µ 0, we reject H 0. Example 6 The average height of 14 randomly selected 10-yr-old Loblolly pine trees was X 27.44 and the sample standard deviation was s 1.54. Assume that the heights of 10-yr-old Loblolly pine trees are Normally distributed. Question: Test the hypotheses H 0 : µ 26 versus H 1 : µ 26 Answer: We can build a 95% confidence interval and see if it contains 26. The 95% confidence interval is s X ± t 13,α/2 27.44 ± 2.160 1.54 (26.55, 28.33) n 14 The 95% confidence interval does not contain 26, so we reject H 0 : µ 26 at the α.05 significance level. 7