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

Similar documents
Lecture 2: CDF and EDF

Asymptotic Statistics-VI. Changliang Zou

Stochastic Simulation

Systems Simulation Chapter 7: Random-Number Generation

Stat 710: Mathematical Statistics Lecture 31

CPSC 531: Random Numbers. Jonathan Hudson Department of Computer Science University of Calgary

TUTORIAL 8 SOLUTIONS #

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

B.N.Bandodkar College of Science, Thane. Random-Number Generation. Mrs M.J.Gholba

14.30 Introduction to Statistical Methods in Economics Spring 2009

Universität Potsdam Institut für Informatik Lehrstuhl Maschinelles Lernen. Hypothesis testing. Anna Wegloop Niels Landwehr/Tobias Scheffer

Chapte The McGraw-Hill Companies, Inc. All rights reserved.

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

Dr. Maddah ENMG 617 EM Statistics 10/15/12. Nonparametric Statistics (2) (Goodness of fit tests)

Independent Events. Two events are independent if knowing that one occurs does not change the probability of the other occurring

Bivariate Paired Numerical Data

Random Number Generation. CS1538: Introduction to simulations

Chapter 9: Hypothesis Testing Sections

Math 475. Jimin Ding. August 29, Department of Mathematics Washington University in St. Louis jmding/math475/index.

Chapter 8: Hypothesis Testing Lecture 9: Likelihood ratio tests

Recall the Basics of Hypothesis Testing

UNIT 5:Random number generation And Variation Generation

Finding Outliers in Monte Carlo Computations

f (1 0.5)/n Z =

One-Sample Numerical Data

Advanced Statistics II: Non Parametric Tests

Institute of Actuaries of India

Math 152. Rumbos Fall Solutions to Exam #2

So far we discussed random number generators that need to have the maximum length period.

Genome Sequencing and Structural Variation (2)

Section 3 : Permutation Inference

Summary of Chapter 7 (Sections ) and Chapter 8 (Section 8.1)

Sequential Analysis & Testing Multiple Hypotheses,

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

1 The Glivenko-Cantelli Theorem

Recognition Performance from SAR Imagery Subject to System Resource Constraints

CH.9 Tests of Hypotheses for a Single Sample

Testing for Poisson Behavior

Computer simulation on homogeneity testing for weighted data sets used in HEP

Signal Time of Arrival based on the Kolmogorov-Smirnov Test

1 Probability theory. 2 Random variables and probability theory.

Hypothesis Testing. 1 Definitions of test statistics. CB: chapter 8; section 10.3

Review. DS GA 1002 Statistical and Mathematical Models. Carlos Fernandez-Granda

STAT 135 Lab 6 Duality of Hypothesis Testing and Confidence Intervals, GLRT, Pearson χ 2 Tests and Q-Q plots. March 8, 2015

Statistical Methods for Astronomy

Asymptotic results for empirical measures of weighted sums of independent random variables

Fall 2012 Analysis of Experimental Measurements B. Eisenstein/rev. S. Errede

Economics 520. Lecture Note 19: Hypothesis Testing via the Neyman-Pearson Lemma CB 8.1,

HYPOTHESIS TESTING. Hypothesis Testing

2.11. The Maximum of n Random Variables 3.4. Hypothesis Testing 5.4. Long Repeats of the Same Nucleotide

Political Science 236 Hypothesis Testing: Review and Bootstrapping

1 Hypothesis testing for a single mean

Adv. App. Stat. Presentation On a paradoxical property of the Kolmogorov Smirnov two-sample test

Distribution-Free Procedures (Devore Chapter Fifteen)

Visual interpretation with normal approximation

Optional Stopping Theorem Let X be a martingale and T be a stopping time such

False Discovery Rate Based Distributed Detection in the Presence of Byzantines

HYPOTHESIS TESTING: FREQUENTIST APPROACH.

INTERVAL ESTIMATION AND HYPOTHESES TESTING

MATH 240. Chapter 8 Outlines of Hypothesis Tests

A Very Brief Summary of Statistical Inference, and Examples

Chapter 7: Hypothesis testing

Statistical Analysis for QBIC Genetics Adapted by Ellen G. Dow 2017

Rank-Based Methods. Lukas Meier

TESTS BASED ON EMPIRICAL DISTRIBUTION FUNCTION. Submitted in partial fulfillment of the requirements for the award of the degree of

1 Glivenko-Cantelli type theorems

Inferential Statistics

POLI 443 Applied Political Research

INDIAN INSTITUTE OF SCIENCE STOCHASTIC HYDROLOGY. Lecture -27 Course Instructor : Prof. P. P. MUJUMDAR Department of Civil Engg., IISc.

Business Statistics. Lecture 10: Course Review

Lecture 21. Hypothesis Testing II

CHI SQUARE ANALYSIS 8/18/2011 HYPOTHESIS TESTS SO FAR PARAMETRIC VS. NON-PARAMETRIC

STAT 461/561- Assignments, Year 2015

Supplementary Materials for Residuals and Diagnostics for Ordinal Regression Models: A Surrogate Approach

Slides 3: Random Numbers

STATS 200: Introduction to Statistical Inference. Lecture 29: Course review

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

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

Distribution Fitting (Censored Data)

Lecture 11: Probability, Order Statistics and Sampling

Generalized Cramér von Mises goodness-of-fit tests for multivariate distributions

Are Declustered Earthquake Catalogs Poisson?

Direction: This test is worth 250 points and each problem worth points. DO ANY SIX

Part 1.) We know that the probability of any specific x only given p ij = p i p j is just multinomial(n, p) where p k1 k 2

HYPOTHESIS TESTING: THE CHI-SQUARE STATISTIC

STT 843 Key to Homework 1 Spring 2018

Contents Kruskal-Wallis Test Friedman s Two-way Analysis of Variance by Ranks... 47

Nonparametric hypothesis tests and permutation tests

Data Mining. CS57300 Purdue University. March 22, 2018

Asymptotic results for empirical measures of weighted sums of independent random variables

p(z)

Are the Digits in a Mersenne Prime Random? A Probability Model

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

Lecture 16: Sample quantiles and their asymptotic properties

MITOCW watch?v=a66tfldr6oy

Topic 3: Sampling Distributions, Confidence Intervals & Hypothesis Testing. Road Map Sampling Distributions, Confidence Intervals & Hypothesis Testing

Hypothesis testing:power, test statistic CMS:

GOODNESS-OF-FIT TEST FOR RANDOMLY CENSORED DATA BASED ON MAXIMUM CORRELATION. Ewa Strzalkowska-Kominiak and Aurea Grané (1)

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

STAT 830 Hypothesis Testing

Transcription:

Lecture 28 28.1 Kolmogorov-Smirnov test. Suppose that we have an i.i.d. sample X 1,..., X n with some unknown distribution and we would like to test the hypothesis that is equal to a particular distribution 0, i.e. decide between the following hypoheses: H1 : = 0 H 2 : otherwise We considered this problem before when we talked about goodness-of-fit test for continuous distribution but, in order to use Pearson s theorem and chi-square test, we discretized the distribution and considered a weaker derivative hypothesis. We will now consider a different test due to Kolmogorov and Smirnov that avoids this discretization and in a sense is more consistent. Let us denote by F (x) = (X 1 x) a cumulative distribution function and consider what is called an empirical distribution function: F n (x) = n(x x) = 1 I(X i x) n that is simply the proportion of the sample points below level x. For any fixed point x the law of large numbers gives that F n (x) = 1 I(X i x) I(X 1 x) = (X 1 x) = F (x), n i.e. the proportion of the sample in the set (, x] approximates the probability of this set. It is easy to show from here that this approximation holds uniformly over all x : sup F n (x) F (x) 0 110

LECTURE 28. 111 Y 1 y F(X) = Y 0 x X Figure 28.1: C.d.f. and empirical d.f. i.e. the largest difference between F n and F goes to 0 in probability. The key observation in the Kolmogorov-Smirnov test is that the distribution of this supremum does not depend on the distribution of the sample. Theorem 1. The distribution of sup F n (x) F (x) does not depend on F. Proof. For simplicity, let us assume that F is continuous, i.e. the distribution is continuous. Let us define the inverse of F by F 1 (y) = minx : F (x) y}. Then making the change of variables y = F (x) or x = F 1 (y) we can write (sup F n (x) F (x) t) = ( sup F n (F 1 (y)) y t). Using the definition of the empirical d.f. F n we can write F n (F 1 (y)) = 1 n I(X i F 1 (y)) = 1 n I(F (X i ) y) and, therefore, ( sup F n (F 1 (y)) y t) = ( sup 1 n ) I(F (X i ) y) y t. The distribution of F (X i ) is uniform on the interval [0, 1] because the c.d.f. of F (X 1 ) is (F (X 1 ) t) = (X 1 F 1 (t)) = F (F 1 (t)) = t. Therefore, the random variables U i = F (X i ) for i n

LECTURE 28. 112 are independent and have uniform distribution on [0, 1] and, combining with the above, we proved that (sup F n (x) F (x) t) = which is clearly independent of F. ( sup 1 n ) I(U i y) y t Next, we will formulate the main result on which the KS test is based. First of all, let us note that for a fixed x the CLT implies that ) n(fn (x) F (x)) N( 0, F (x)(1 F (x)) because F (x)(1 F (x)) is the variance of I(X 1 x). If turns out that if we consider n sup F n (x) F (x) it will also converge to some distribution. Theorem 2. We have, ( nsup F n (x) F (x) t) H(t) = 1 2 ( 1) i 1 e 2i2 t where H(t) is the c.d.f. of Kolmogorov-Smirnov distribution. If we formulate our hypotheses in terms of cumulative distribution functions: H1 : F = F 0 for a givenf 0 H 2 : otherwise then based on Theorems 1 and 2 the Kolmogorov-Smirnov test is formulated as follows: H1 : D δ = n c H 2 : D n > c where D n = n sup F n (x) F 0 (x) and the threshold c depends on the level of significance α and can be found from the condition α = (δ H 1 H 1 ) = (D n c H 1 ). In Theorem 1 we showed that the distribution of D n does not depend on the unknown distribution F and, therefore, it can tabulated. However, the distribution of D n

LECTURE 28. 113 depends on n so one needs to use advanced tables that contain the table for the sample size n of interest. Another way to find c, especially when the sample size is large, is to use Theorem 2 which tells that the distribution of D n can be approximated by the Kolmogorov-Smirnov distribution and, therefore, α = (D n c H 1 ) 1 H(c). and we can use the table for H to find c. To explain why Kolmogorov-Smirnov test makes sense let us imagine that the first hypothesis fails and H 2 holds which means that F F 0. F (true) Fn F0 (hypothesis) Figure 28.2: The case when F F 0. Since F is the true c.d.f. of the data, by law of large numbers the empirical d.f. F n will converge to F as shown in figure 28.2 and as a result it will not approximate F 0, i.e. for large n we will have sup F n (x) F 0 (x) > δ x for small enough δ. Multiplying this by n will give that D n = n sup F n (x) F 0 (x) > nδ. If H 1 fails then D n > nδ + as n. Therefore, it seems natural to reject H 1 when D n becomes too large which is exactly what happens in KS test. Example. Let us consider a sample of size 10: 0.58, 0.42, 0.52, 0.33, 0.43, 0.23, 0.58, 0.76, 0.53, 0.64 and let us test the hypothesis that the distribution of the sample is uniform on [0, 1]: H1 : F (x) = F 0 (x) = x H 2 : otherwise

LECTURE 28. 114 10 F(X) = x 2/n = 2/10 = 1/5 5 twice 0.43 0.53 x 0 0.23 0.33 0.42 0.52 0.58 0.69 0.76 10 Figure 28.3: F n and F 0 in the example. The figure 28.3 shows the c.d.f. F 0 and empirical d.f. F n (x). To compute D n we notice that the largest difference between F 0 (x) and F n (x) is achieved either before or after one of the jumps, i.e. sup F n (x) F (x) = max 0 x 1 1 i n Writing these differences for our data we get Fn (X i ) F (X i) - before the ith jump F n (X i ) F (X i ) - after the ith jump before the jump after the jump 0 0.23 0.1 0.23 0.1 0.33 0.2 0.33 0.2 0.42 0.3 0.42 0.3 0.43 0.4 0.43 The largest value will be achieved at 0.9 0.64 = 0.26 and, therefore, D n = n sup F n (x) x = 10 0.26 = 0.82. 0 x 1 If we take the level of significance α = 0.05 then 1 H(c) = 0.05 c = 1.35

LECTURE 28. 115 and according to KS test δ = H1 : D n 1.35 H 2 : D n > 1.35 we accept the null hypothesis H 1 since D n = 0.82 < c = 1.35.