Preliminary Statistics Lecture 5: Hypothesis Testing (Outline)

Similar documents
Preliminary Statistics. Lecture 5: Hypothesis Testing

Lectures 5 & 6: Hypothesis Testing

ECO220Y Review and Introduction to Hypothesis Testing Readings: Chapter 12

Mathematical Statistics

Hypothesis Testing The basic ingredients of a hypothesis test are

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

Hypothesis Testing. ECE 3530 Spring Antonio Paiva

INTERVAL ESTIMATION AND HYPOTHESES TESTING

Econ 325: Introduction to Empirical Economics

Preliminary Statistics Lecture 2: Probability Theory (Outline) prelimsoas.webs.com

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

LECTURE 5. Introduction to Econometrics. Hypothesis testing

Statistical Process Control (contd... )

MTMS Mathematical Statistics

14.30 Introduction to Statistical Methods in Economics Spring 2009

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

Introductory Econometrics

8: Hypothesis Testing

Bias Variance Trade-off

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

Hypotheses and Errors

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

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:

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

Ch. 5 Hypothesis Testing

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

EC2001 Econometrics 1 Dr. Jose Olmo Room D309

Mathematical statistics

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

23. MORE HYPOTHESIS TESTING

Hypothesis tests

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

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

With our knowledge of interval estimation, we can consider hypothesis tests

Testing Hypothesis. Maura Mezzetti. Department of Economics and Finance Università Tor Vergata

Probability and Statistics Notes

HYPOTHESIS TESTING. Hypothesis Testing

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

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

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

Review of probability and statistics 1 / 31

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

Topic 17 Simple Hypotheses

Chapter Three. Hypothesis Testing

Chapter 5: HYPOTHESIS TESTING

Estimating the accuracy of a hypothesis Setting. Assume a binary classification setting

Population Variance. Concepts from previous lectures. HUMBEHV 3HB3 one-sample t-tests. Week 8

F79SM STATISTICAL METHODS

Chapter 5 Confidence Intervals

Statistics for Managers Using Microsoft Excel/SPSS Chapter 8 Fundamentals of Hypothesis Testing: One-Sample Tests

Null Hypothesis Significance Testing p-values, significance level, power, t-tests Spring 2017

4 Hypothesis testing. 4.1 Types of hypothesis and types of error 4 HYPOTHESIS TESTING 49

Basic Concepts of Inference

Null Hypothesis Significance Testing p-values, significance level, power, t-tests

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

ECON Introductory Econometrics. Lecture 2: Review of Statistics

Two-Sample Inferential Statistics

What is a Hypothesis?

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

Partitioning the Parameter Space. Topic 18 Composite Hypotheses

Review of Statistics 101

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

M(t) = 1 t. (1 t), 6 M (0) = 20 P (95. X i 110) i=1

Chapter 8 of Devore , H 1 :

EXAMINERS REPORT & SOLUTIONS STATISTICS 1 (MATH 11400) May-June 2009

Introduction to Statistical Inference

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

Quantitative Analysis and Empirical Methods

Lecture 2: Basic Concepts and Simple Comparative Experiments Montgomery: Chapter 2

Math 101: Elementary Statistics Tests of Hypothesis

Section 5.4: Hypothesis testing for μ

The t-statistic. Student s t Test

6.4 Type I and Type II Errors

7 Estimation. 7.1 Population and Sample (P.91-92)

Hypothesis Testing Problem. TMS-062: Lecture 5 Hypotheses Testing. Alternative Hypotheses. Test Statistic

STAT 515 fa 2016 Lec Statistical inference - hypothesis testing

Visual interpretation with normal approximation

Statistical inference

Chapter 27 Summary Inferences for Regression

Hypothesis Testing One Sample Tests

Chapter 9. Hypothesis testing. 9.1 Introduction

Testing and Model Selection

Lecture 5: ANOVA and Correlation

Unit 19 Formulating Hypotheses and Making Decisions

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

Introduction to Statistics

Sociology 6Z03 Review II

Definition 3.1 A statistical hypothesis is a statement about the unknown values of the parameters of the population distribution.

Chapter IR:VIII. VIII. Evaluation. Laboratory Experiments Performance Measures Training and Testing Logging

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

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

Topic 22 Analysis of Variance

Introduction to Business Statistics QM 220 Chapter 12

POLI 443 Applied Political Research

The regression model with one fixed regressor cont d

Summary: the confidence interval for the mean (σ 2 known) with gaussian assumption

STAT Chapter 8: Hypothesis Tests

Formal Statement of Simple Linear Regression Model

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

Multivariate Statistical Analysis

Transcription:

1 School of Oriental and African Studies September 2015 Department of Economics Preliminary Statistics Lecture 5: Hypothesis Testing (Outline) Gujarati D. Basic Econometrics, Appendix A.8 Barrow M. Statistics for Economics, Accounting and Business Studies Ch. 5 1 Introduction In testing we want to make inferences about the unknown population parameters in the form of tests of some hypotheses about the value of the population parameters. The elements of a statistical test are: Null Hypothesis, H 0 : θ = θ 0 Alternative Hypothesis, H 1 : Two-sided alternative θ θ 0 One-sided alternative θ < θ 0 or θ > θ 0 Test Statistic, a function of the sample measurements upon which the statistical decision will be based Decision Rule, rule which specifies for which values of the test statistic the null hypothesis will be rejected and for which it will not Statistical testing is analogous to a criminal trial. There is a null hypothesis and an alternative hypothesis (innocent vs guilty), a test statistic (evidence against/in favour of the initial hypothesis), and a decision rule (the jury rejects the null if the evidence presented indicates the defendant guilty beyond reasonable doubt ). Similarly, in hypothesis testing H 0 is rejected if the evidence from the sample seems inconsistent with the hypothesis made, that is if H 0 has a very low probability of occurring if it were true. The problem is, we can never know with certainty which of the hypotheses is true, hence two mistakes can happen. Type I error: reject H 0, though it is true (convict an innocent person) or Type II error: accept H 0 though it is false (set a guilty person free). Table 1: Hypothesis Testing: Decision Rule H 0 true H 0 false Accept H 0 Type II error Reject H 0 Type I error We can avoid Type I error completely by always accepting the null hypothesis, but we would be making a lot of type II errors, and vice versa. Statistical tests design the test procedure so that there is a fixed risk of Type I error. This probability is known as the significance level and is usually fixed at 5%.

2 2 Procedure of Testing Suppose we have a random variable Y with mean µ and variance σ 2. We want to test the hypothesis that the true mean takes a particular value µ 0, using a random sample Y i, i = 1, 2,...n. 1. State the Null Hypothesis H 0 : µ = µ 0 2. State the Alternative (2-sides) Hypothesis H 1 : µ µ 0 3. Construct the Test Statistic under the null (i.e. if H 0 were true) τ = ˆµ µ 0 SE(ˆµ) 4. Find how the Test Statistic is distributed under H 0 (a) For large samples (n > 30), the test statistic is standard normally distributed τ SN(0, 1) (b) For small samples (n < 30) and if the true variance (σ 2 ) is unknown, the test statistic is distributed as a student-t with n 1 degrees of freedom τ t n 1 5. Find the critical values in the tails of the distribution of the test statistic that give (conventionally) the 95% of the distribution. That is, specify the critical values so the probability that ˆµ being outside the critical values is small, typically α = 5%. This is the significance level of the test. Other common values for α include 0.1 (10%) and 0.01 (1%). For a two-sided test (µ µ 0 ), the level of significance is equally split between the two tails in order to find the critical values. If α = 0.05, the critical values would be found so that 0.025 is left in each side of the distribution For a one-sided test (µ > µ 0 or µ < µ 0 ), the entire level of significance will be located in one tail (0.05). 6. Apply the decision rule: if the Test statistic value (in absolute value) is greater than the critical value, reject H 0. That is, if the test statistic is greater than the critical value or it is less than minus the critical value, we reject the null. Otherwise, we do not. An alternative method of applying the decision rule is to quote the probability of obtaining the test statistic assuming the null hypothesis is true. This is known as the p-value approach. It has the advantage of avoiding arbitrary selection of a cut-off point. In the same lines as with the critical values, if we are testing a one-side test (e.g. H 1 : µ > µ 0 ) we find the probability of the test statistic being greater than the standardised value and compare it with 0.05. If we are doing a 2-sided test, we find the probability, multiply it with 2 and then compare it with the significance level (5%).

3 Note that statistical significance and substantive significance can be very different. An effect may be very small of no importance, but statistically very significant, because we have a very large sample and a small standard error. Alternatively, an effect may be large, but not statistically significant because we have a small sample and it is imprecisely estimated. Statistical significance asks: could the difference have arisen by chance in a sample of this size? not is the difference important? 3 Type I and Type II errors, and the Power of a Test As we said earlier, in statistical test we fix the probability of making a type one error to the significance level, α (conventionally to 5%). Prob ( z α/2 Z z α/2 ) = (1 α) Prob ( z 2.5 Z z 2.5 ) = 1 5% = 95% ( ) Prob 1.96 ˆθ θ 0 SE(ˆθ) 1.96 = 95% if H 0 is true So, the way we actually apply the decision rule, says that if the H 0 is true, and we find a Test Statistic value in the extreme 5% (2.5% from both sides) of the distribution of the test statistic we reject the H 0 (though it is true), which is the probability of making a type I error. The power of a test is the probability of rejecting a false hypothesis. If we denote by β the probability of committing a Type II error, then the power of the test is (1 β), the probability of not committing a Type II error, i.e. probability of rejecting a false null hypothesis. This is one of the correct decisions identified before. Essentially, the power of a test shows the ability of a test to detect an effect, if it actually exists. Unfortunately, decreasing the probability of error type, increases the probability of the other. Only by increasing the sample size can the probability of one error be improved without an adverse effect on the other error. 4 Confidence Interval Approach to Hypothesis Testing There is also the confidence interval approach to hypothesis testing. According to this approach we construct a confidence interval around the point estimate, and if the hypothesised value falls outside of the interval, we reject the null hypothesis. The values within the confidence interval are the set of all acceptable hypotheses. The confidence coefficient (1 α) corresponds to the probability of accepting the null hypothesis while being true. 5 An Example - Basketball Players Height 5.1 Reminder Assume the random variable height of basketball players, Y, is normally distributed with mean µ and variance σ 2. Y N(µ, σ 2 ) We have a random sample of n basketball players height, Y i, i = 1, 2...n drawn from the population. To estimate the true parameters (µ, σ 2 ) we use the sample

4 mean (ˆµ) as the estimator for µ and the sample variance (s 2 ) as the unbiased estimator for σ 2. n i=1 ˆµ = Y n i, s 2 i=1 = (Y i ˆµ) 2 n n 1 Since Y is normally distributed, ˆµ will be also normally distributed (because ˆµ is a linear function of Y ). Nonetheless, even if Y were not normally distributed, then according to the Central Limit Theorem ˆµ will be normal as the sample size increases. Hence, ˆµ N(µ, σ 2 /n). An estimate for the standard error of the sample mean is provided by, SE(ˆµ) = s/ n. 5.2 Point and Interval Estimates Suppose we got our sample of n basketball players and we used the sample mean, ˆµ, as an estimator for µ. Suppose that we found an estimate for µ, e.g. ˆµ = Ȳ = 2.05m and an estimate for the ŜE(ˆµ)=0.05m (i.e. ŜE(ˆµ) = s/ n = 0.05). Based on our sample statistics, what can we infer about µ, that is, about the average height of all basketball players? Point Estimate: The (true) average height of all basketball players is µ = Ȳ = 2.05m Interval Estimate: Pinpoint how confident we are that the true mean of the height of all basketball players lies within a range around Ȳ = 2.05m. At the 95% confidence interval and assuming that ˆµ = Ȳ = 2.05m and ŜE(ˆµ)=0.05m, we have 95% = P ( 1.96 < Z < 1.96) = P ( 1.96 < µ 2.05 0.05 = P ( 1.96 0.05 < µ 2.05 < 1.96 0.05) < 1.96) = p(2.05 1.96 0.05 < µ < 2.05 + 1.96 0.05) = P (1.952 < µ < 2.148) With 95% confidence, the true average height of all basketball players will lie between 1.952 and 2.148. 5.3 Hypothesis Testing Suppose we want to do a hypothesis test on whether the true average height of all basketball players is µ 0 = 1.99. 1. State the Null Hypothesis H 0 : µ = µ 0 = 1.99 2. State the Alternative Hypothesis H 1 : µ µ 0 1.99 3. Construct the Test Statistic under the null (i.e. if H 0 were true) τ = ˆµ µ 0 2.05 1.99 = = 1.2 SE(ˆµ) 0.05 4. Find how the Test Statistic is distributed under H 0 We assume that despite σ 2 being unknown we have a large sample (n > 30), so that the test statistic (τ) is standard normally distributed τ SN(0, 1)

5 5. Find the critical values in the tails of the distribution of the test statistic that give the 95% of the distribution: z = ±1.96 6. Apply the decision rule: τ = 1.2 < 1.96. So, we don t reject the null hypothesis and conclude that at the 95% confidence level, the true mean height of all basketball players is not statistically different from µ 0 = 1.99. Note 1 (Significance level): P(Type I error)=p(reject H 0 H 0 is true)=5%. If H 0 were true, then any ˆµ (µ 0, σ 2 /n) would be consistent with having µ 0 as mean. If the null hypothesis is true, then ˆµ (µ 0, σ 2 /n) However, whenever we observe a ˆµ that does not lie within 1.96 SE from the true hypothesised mean (or alternatively, τ > 1.96) we reject the null, though it is true. NOTE 2 (Confidence Interval Approach to Hypothesis Testing): The decision rule is saying that whenever ˆµ lies within 1.96 SE from µ 0 (i.e. whenever ˆµ lies within 1.892 and 2.088) we do not reject the null. This is equivalent to µ 0 being included in the 95% confidence interval of ˆµ. The 95% confidence interval was calculated earlier and found to be (1.952, 2.148). The hypothesised value (µ 0 = 1.99) is included in the interval, that that is why we have not rejected the null hypothesis.