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

Similar documents
Finansiell Statistik, GN, 15 hp, VT2008 Lecture 12::(1) Analysis of Variance (2) Chi-Square Tests for Independence and for Goodness-of- t

Lösningsförslag till skriftlig tentamen i FINANSIELL STATISTIK, grundnivå, 7,5 hp, torsdagen 15 januari 2009.

Finansiell Statistik, GN, 15 hp, VT2008 Lecture 15: Multiple Linear Regression & Correlation

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

Finansiell Statistik, GN, 15 hp, VT2008 Lecture 17-2: Index Numbers

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

INTERVAL ESTIMATION AND HYPOTHESES TESTING

Finansiell Statistik, GN, 15 hp, VT2008 Lecture 17-1: Regression with dichotomous outcome variable - Logistic Regression

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

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

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

Visual interpretation with normal approximation

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

Statistical Inference. Hypothesis Testing

LECTURE 5 HYPOTHESIS TESTING

Introduction to Statistical Data Analysis III

Chapter 5: HYPOTHESIS TESTING

Econometrics Midterm Examination Answers

Preliminary Statistics. Lecture 5: Hypothesis Testing

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

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

Tests about a population mean

Preliminary Statistics Lecture 5: Hypothesis Testing (Outline)

HYPOTHESIS TESTING. Hypothesis Testing

Inferences About Two Proportions

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

Introduction to Statistical Hypothesis Testing

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

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

Parameter Estimation, Sampling Distributions & Hypothesis Testing

STAT Chapter 8: Hypothesis Tests

An inferential procedure to use sample data to understand a population Procedures

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

CHAPTER 7. Hypothesis Testing

Probability and Statistics

Normal (Gaussian) distribution The normal distribution is often relevant because of the Central Limit Theorem (CLT):

i) the probability of type I error; ii) the 95% con dence interval; iii) the p value; iv) the probability of type II error; v) the power of a test.

Sociology 6Z03 Review II

Mathematical statistics

Hypothesis Testing The basic ingredients of a hypothesis test are

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

COMPARING SEVERAL MEANS: ANOVA

What is a Hypothesis?

Business Statistics. Lecture 10: Course Review

CH.9 Tests of Hypotheses for a Single Sample

Mathematical statistics

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

BIO5312 Biostatistics Lecture 6: Statistical hypothesis testings

Chapter 7 Comparison of two independent samples

Psychology 282 Lecture #4 Outline Inferences in SLR

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

Sample Size and Power I: Binary Outcomes. James Ware, PhD Harvard School of Public Health Boston, MA

Two-Sample Inferential Statistics

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

Statistics 251: Statistical Methods

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

1 Statistical inference for a population mean

Introductory Econometrics

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

Statistics - Lecture 05

Statistical methods for comparing multiple groups. Lecture 7: ANOVA. ANOVA: Definition. ANOVA: Concepts

The problem of base rates

Lecture 7: Hypothesis Testing and ANOVA

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

Quantitative Analysis and Empirical Methods

Lectures 5 & 6: Hypothesis Testing

LECTURE 12 CONFIDENCE INTERVAL AND HYPOTHESIS TESTING

(right tailed) or minus Z α. (left-tailed). For a two-tailed test the critical Z value is going to be.

Probability and Statistics Notes

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

STAT 135 Lab 8 Hypothesis Testing Review, Mann-Whitney Test by Normal Approximation, and Wilcoxon Signed Rank Test.

Econometrics. 4) Statistical inference

Review of Statistics 101

Econ 325: Introduction to Empirical Economics

H 2 : otherwise. that is simply the proportion of the sample points below level x. For any fixed point x the law of large numbers gives that

Introduction to Statistics

Hypothesis Testing. ECE 3530 Spring Antonio Paiva

y ˆ i = ˆ " T u i ( i th fitted value or i th fit)

PSY 307 Statistics for the Behavioral Sciences. Chapter 20 Tests for Ranked Data, Choosing Statistical Tests

Hypothesis Tests and Estimation for Population Variances. Copyright 2014 Pearson Education, Inc.

This is particularly true if you see long tails in your data. What are you testing? That the two distributions are the same!

STAT 515 fa 2016 Lec Statistical inference - hypothesis testing

1 One- and Two-Sample Estimation

8.1-4 Test of Hypotheses Based on a Single Sample

ANOVA TESTING 4STEPS. 1. State the hypothesis. : H 0 : µ 1 =

Statistical Process Control (contd... )

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

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

POLI 443 Applied Political Research

Chapter 15: Nonparametric Statistics Section 15.1: An Overview of Nonparametric Statistics

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

Chapter 7: Hypothesis Testing

CBA4 is live in practice mode this week exam mode from Saturday!

Hypothesis Testing. Hypothesis: conjecture, proposition or statement based on published literature, data, or a theory that may or may not be true

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

WISE Power Tutorial Answer Sheet

Hypotheses Test Procedures. Is the claim wrong?

LECTURE 5. Introduction to Econometrics. Hypothesis testing

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

Introduction to the Analysis of Variance (ANOVA)

Transcription:

Finansiell Statistik, GN, 15 hp, VT008 Lecture 10-11: Statistical Inference: Hypothesis Testing Gebrenegus Ghilagaber, PhD, Associate Professor April 1, 008 1

1 Statistical Inferences: Introduction Recall: Statistics may be grossly devided into: Descriptive Statistics Data Collection Data Presentation Data Analysis and

Inferential Statistics - deals with ways/methods of drawing sound generalizations about a populations based on information contained in a sample. This may be done in two ways: 1. Estimation (complete ignorance) Point Estimation Interval Estimation (Con dence Interval). Hypothesis Testing (partial ignorance)

Basic Concepts in Hypothsis Testing A statistical hypothesis is a temporary statement (an assertion) about a population probability distribution or its parameter The aim in hypothesis-testing is to test the extent of truth of this temporary statement using information contained in a sample The primary hypothesis to be tested is called Null-hypotheis and is denoted by H 0. The hypothesis to be kept (maintained) if the Null-hypothesis is to be rejected (Nulli ed) is called the Alternative-hypothesis and is denoted by H 1 or H A. 4

The signi cance level of a test, denoted by, is a measure of the probability of rejecting a true hypothesis (see details below). It is also called size of the test or level of the test. A test statistic is a function of the sample upon which the statistical decision will be based. 5

.1 One Tailed and Two Tailed Alternatives Two-tailed (two-sided) test: H 0 : = 0 H 1 : 6= 0 One-tailed (one-sided) test: H 0 : = 0 H A : > 0 or H 0 : = 0 H A : < 0 6

. Type I Error and the Probability of Type I Error In any hypothesis testing procedure, one of the following can happen: Decision Null hypotheis (H 0 ) is Reject H 0 Do not reject H 0 True Type I error Correct decision False Correct decision Type II error Thus, We commit Type I error when we reject a true hypothesis. The probability of such error is denoted by and is known as the signifcance level (size of a test, or level of a test) 7

The probability of Not commiting Type I error - the probability of "accepting" a true hypotheis - is given by 1 and is known as the con dence level. P (Re ject H 0 jh 0 is true) = P(Type I error) = (signi cance level) P (Do not Re ject H 0 jh 0 is true) = 1 (con dence level) 8

. Type II Error and the Probability of Type II Error We commit Type II error when we fail to reject a False hypothesis. The probability of such error is denoted by. P (Do not Re ject H 0 jh 0 is False) = P (Re ject H 0 jh 0 is False) = 1 (power of a test) 9

.4 Power of a test The probability of Not commiting type II error - rejecting a false hypotheis - is given by 1 and is known as the Power of the Test. In other words, the Power of the Test is its capacity to detect a False hypothesis. Power of a test = P (Re jct H 0 jh 0 is False) = 1 10

.5 Some Remarks A statistical hypothesis can never be accepted (unless n = N) - the poorman example and are inversely related - show graphically Thus, we cannot minimize them simultaneously as one of them will increase when we decrease the other. Thus, we often x the type I error and then look for the most powerful tests (tests with smallest possible values of ) for a given value of : Which error is more "serious"? 11

.6 Large sample Tests on the mean (one-tailed and twotailed) Case 1: Two-tailed test: H 0 : = 0 H A : 6= 0 Test statistic when sample size (n) is large (when we can make use of CLT) is given by 1

Z = X 0 = p n = X 0 s= p n and we reject H 0 if Z > Z or Z Z 1

Case : One-tailed test (to the right): H 0 : = 0 H A : > 0 Test statistic when sample size (n) is large (when we can make use of CLT) is given by Z = X 0 = p n = X 0 s= p n and we reject H 0 if Z > Z 14

Case : One-tailed test (to the left): H 0 : = 0 H A : < 0 Test statistic when sample size (n) is large (when we can make use of CLT) is given by Z = X 0 = p n = X 0 s= p n and we reject H 0 if Z Z 15

.7 Small sample Tests on the mean with unknown standard devation (one-tailed and two-tailed) Case 1: Two-tailed test: H 0 : = 0 H A : 6= 0 Test statistic when sample size (n) is small (when we can t make use of CLT) is given by t = X 0 s= p n 16

and we reject H 0 if t > t n 1; or t t n 1; 17

Case : One-tailed test (to the right): H 0 : = 0 H A : > 0 Test statistic when sample size (n) is small (when we can t make use of CLT) is given by t = X 0 s= p n and we reject H 0 if t > t (n 1;) 18

Case : One-tailed test (to the left): H 0 : = 0 H A : < 0 Test statistic when sample size (n) is small (when we can t make use of CLT) is given by and we reject H 0 if t t (n 1;) t = X 0 s= p n 19

.8 Tests of di erences between two means (one-tailed and two-tailed).8.1 Large sample cases The above procedures may be extended to the case of comparing means from two populations. Thus, we have Case 1: Two-tailed test: H 0 : 1 = =) 1 = 0 H A : 1 6= =) 1 6= 0 0

Test statistic when sample sizes (n 1 and n ) are large (when we can make use of CLT) is given by where z = = X1 X1 X ( 1 ) 0 SE(X 1 X ) X SE(X 1 X ) q SE(X 1 X ) = V ar(x 1 ) + V ar(x ) s V ar(x1 ) = + V ar(x ) n 1 n if the two samples are independent, or (in the case of paired samples), 1

where SE(X 1 X ) = v u t Sp 1 n 1 + 1 n! is the pooled variance. S p = (n 1 1) S 1 + (n 1) S n 1 + n In any case, we reject H 0 if Z > Z or Z Z :

Case : One-tailed test (to the right): H 0 : 1 = =) 1 = 0 H A : 1 > =) 1 > 0 Test statistic when sample sizes (n 1 and n ) are large (when we can make use of CLT) is given by Z = X1 X SE(X 1 X ) and we reject H 0 if Z > Z

Case : One-tailed test (to the left): H 0 : 1 = =) 1 = 0 H A : 1 < =) 1 < 0 Test statistic when sample sizes (n 1 and n ) are large (when we can make use of CLT) is given by Z = and we reject H 0 if Z Z. X1 X SE(X 1 X ) 4

.8. Small sample cases The appropriate test statistic when sample sizes (n 1 or n or both) are small (when we can t make use of CLT) is given by t = X1 X SE(X 1 X ) and it is compared with t (n1+n tests for a single mean. ) in the same way as we did for the case in 5

.9 Determining the sample size based on Z, Z, 0, and A. Recall, = P (Reject H 0 jh 0 is true) = P (X > kj = 0 ) so that = P X 0 s= p n > k 0 s= p n j = 0 = P (Z > Z )! 6

Z = k 0 s= p n s =) k = 0 + Z p n (1) 7

Similarly, = P ("Accept H 0 jh 0 is False) = P (X < kj = A ) = P X A s= p n < k A s= p n j = A = P Z < Z! so that Z = k A s= p n s =) k = A Z p n () 8

Equating (1) and (), we get, so that 0 + Z s p n = A Z s p n n = S Z + Z ( A 0 ) In other words, the minimum sample size required to test a hypothesis on the population mean is a function of four factors: 1. The variance, S (the larger the variance the larger the value of n). The di erence between the values of under the null and alternative hypotheses, A 0 ; (the larger the di erence the smaller the value of n) 9

. The size of type I error, (the smaller the value of the larger the value of n) 4. The size of type II error, (the smaller the value of the larger the value of n) 0

.10 Tests on Proportions (one-tailed and two-tailed) The procedures used for tests on population means and di erences between two population means may also be applied to make tests on proportions or di erences between proportions of two populations: H 0 : P = P 0 H A : P 6= P 0 The test statistic is given by z = bp P b 0 SE( P b ) = P P 0 r P 0 (1 P 0 ) n 1

or t = bp P b 0 SE( P b ) = P P 0 r P 0 (1 P 0 ) n depending on whether our sample size is large or small.

Similar procedure applies in testing H 0 : P 1 = P H A : P 1 6= P The test statistic is given by z = bp 1 b P SE( b P 1 b P ) = b P 1 r bp1 (1 b P1 ) bp n 1 + b P (1 b P ) n

in the case of independent samples, or z = bp b 1 P b SE( P b b 1 P ) = P 1 bp r bp (1 P b ) 1 n1 + n 1 in the case of paired samples, where bp = X 1 + X n 1 + n is the proportion of "successes" in the mixed sample. 4

.11 Chi-square tests on the variance of normal population Suppose, x 1 ; x ; :::; x n is a random sample from a normal population with unknown variance ; and we want to test H 0 : = 0 We recall that, H A : > 0 (n 1)S s (n 1) Thus, an appropriate test statistic to test the above hypothesis would be: = (n 1)S 0 5

and reject H 0 if > (n 1;) 6

.1 Tests on the equality of variances of two normal populations Suppose, x 1 ; x ; :::; x n is a random sample from a normal population with unknown variance 1 ; and y 1; y ; :::; y n is a random sample from a normal population with unknown variance : Our goal is to test the hypothesis We recall that, H 0 : 1 = H A : 1 > (n 1 1)S 1 1 s (n 1 1) 7

and that (n1 1)S1 1 (n 1)S (n 1)S = (n 1 1) = (n 1) s (n 1) s F (n1 1; n 1) Thus, an appropriate test statistic to test the above hypothesis would be: F = (n1 1)S1 1 (n 1)S and reject H 0 if F > F (n1 1; n 1;) = (n 1 1) = (n 1) = S 1 S Remark: Formulate the hypothesis in such a way that the larger variance appears as a numerator - in order to get a value of F that is at least 1 (and not 8

a fraction) ready to be compared with table values. 9

Relatioship between con dence interval and hypothesis testing Recall that a two-sided 100(1 mean is given by the interval )% con dence interval for the population! s s X Z p ; X + Z p n n () Similarly, a two-tailed test on is formulated as H 0 : = 0 H 1 : 6= 0 40

and we reject H 0 if Z > Z or Z < Z ; where Z = X 0 s= p n : 41

In other words, we don t reject H 0 if Z < Z < Z =) Z < X 0 s= p n < Z =) Z s p n < X 0 < Z s p n =) X Z s p n < 0 < X + Z s p n =) X + Z s p n > 0 > X Z s p n =) X Z s p n < 0 < X + Z s p n 4

To sum up, in testing H 0 : = 0 H 1 : 6= 0 the null hypothesis will not be rejected if 0 lies within the interval! s s X Z p ; X + Z p n n which is just the Recall that a two-sided 100(1 )% con dence interval for the population mean is given by the interval given in (). Similar argument applies for other parameters such as di erence between means, 1 or population variances P: 4

4 Computing and plotting the power of a test Consider testing the hypothesis: H 0 : = 0 H 1 : 6= 0 at = 5%: Then, the Null hypothesis will be rejected if the calculated test statistic, Z cal is greater than 1:96 or less than 1:96; that is if Z cal = X 0 s= p n > 1:96 or Z cal = X 0 s= p n < 1:96 which, in turn, means we reject H 0 if! s X > 0 + 1:96 p or X < 0 n 1:96! s p n 44

In other words, we don t reject H 0 if 0 1:96 s p n! < X < 0 + 1:96! s p n Thus, the probability of type II error, ; may be computed as = P (we don0t reject H 0 jh 0 is false) ; and the corresponding power, ; may be obtained as = 1 : Suppose now that 0 = 15 and that a sample of 6 observations gave X = 17 and S = 9: Then, H 0 is false means that 6= 15 which, in turn, means that the true value of can be any value except 15. 45

Consider one possible value, say 16. Then, = P (we don0t reject H 0 jh 0 is false) "! s = P 1:96 p < X < 0 + 1:96 n 0! # s p = 16 n = P 15 1:96 < X < 15 + 1:96 = 16 6 6 = P h 14:0 < X < 15:98 = 16 i 14:0 16 = P 4 < X 16 6 6 < 15:98 16 = P [ :96 < Z < 0:04] = ( 0:04) ( :96) = 0:48405 0:00004 = 0:4840 so the power at = 16 is given by (16) = P (Reject H 0 : = 15j = 16) = 1 = 1 0:48401 = 0:5160 6 5 46

Similarly, at = 17; we have = P h 14:0 < X < 15:98 = 17 i = P 4 14:0 17 6 < X 17 6 < 15:98 17 = P [ 5:96 < Z < :04] = ( :04) ( 5:96) = 0:0068 0:0000 = 0:0068 and the corresponding power is given by (17) = P (Reject H 0 : = 15j = 17) = 1 = 1 0:0068 = 0:979 6 5 47

At = 15:5; we have so that = P h 14:0 < X < 15:98 = 15:5 i = P 4 14:0 15:5 6 < X 15:5 6 < 15:98 15:5 = P [ :96 < Z < 0:96] = (0:96) ( :96) = 0:8147 0:00158 = 0:899 (15:5) = P (Reject H 0 : = 15j = 15:5) = 1 = 1 0:899 = 0:17007 6 5 48

while at = 15 (when H 0 is true) we have = P h 14:0 < X < 15:98 = 15 i so that = P 4 14:0 15 6 < X 15 6 < 15:98 15 = P [ 1:96 < Z < 1:96] = (1:96) ( 1:96) = 0:9750 0:04998 = 0:95 (15) = P (Reject H 0 : = 15j = 15) = 1 = 1 0:95 = 0:05 Note: This is the value of which is the probability of type I error (probability of rejecting H 0 is true) and that was chosen to be 0:05 at the begining. 6 5 49

We also get similar values on the left of = 15. For instance, at = 14:5; we have = P h 14:0 < X < 15:98 = 14:5 i so that = P 4 14:0 14:5 6 < X 14:5 6 < 15:98 14:5 = P [ 0:96 < Z < :96] = (:96) ( 0:96) = 0:899 (14:5) = P (Reject H 0 : = 15j = 14:5) = 1 = 1 0:899 = 0:17007 = (15:5) 6 5 50

while at at = 1; we have so that = P h 14:0 < X < 15:98 = 1 i = P 4 14:0 1 6 < X 14:5 6 < 15:98 1 = P [:04 < Z < 5:96] = (5:96) (:04) = 0:0068 (1) = P (Reject H 0 : = 15j = 1) = 1 = 1 0:0068 = 0:979 = (17) 6 5 51

If we plot these values of power, we get the power curve below: 1 Plot of the power function 0.9 Probability of rejecting the Null hypothesis 0.8 0.7 0.6 0.5 0.4 0. 0. 0.1 0 1 1.5 14 14.5 15 15.5 16 16.5 17 Values under the alternative hypothesis (H1) 5