Docsity

Estimating CDFs: Empirical Distribution Function & Kolmogorov-Smirnov Test, Exams of Statistics

Toggle sidebar
bg1
1
STAT 703/J703 B.Habing Univ. of SC 1
STAT 703/J703
April 4
th
, 2005
-
Lecture 23-
Instructor: Brian Habing
Department of Statistics
LeConte 203
Telephone: 803-777-3578
STAT 703/J703 B.Habing Univ. of SC 2
Today
Methods Based on the CDF
• The Empirical Distribution Function
• Some Statistical Properties
• Kolmogorov-Smirnov Test
• The Nonparametric Bootstrap
• Relation to Survival Functions
STAT 703/J703 B.Habing Univ. of SC 3
Recall that the definition of the
cumulative distribution function
(CDF) is:
F
X
(
x
)=P(X≤
x
)
Note that:
•F
X
(
x
) is non-decreasing
•F
X
(
x
) →1 as
x
→∞
•F
X
(
x
) →0 as
x
→-∞
pf3
pf4
pf5

Partial preview of the text

Download Estimating CDFs: Empirical Distribution Function & Kolmogorov-Smirnov Test and more Exams Statistics in PDF only on Docsity!

STAT 703/J703 B.Habing Univ. of SC (^1)

STAT 703/J

April 4 th^ , 2005

- Lecture 23-

Instructor: Brian Habing

Department of Statistics

LeConte 203

Telephone: 803-777-

E-mail: [email protected]

STAT 703/J703 B.Habing Univ. of SC (^2)

Today

Methods Based on the CDF

• The Empirical Distribution Function

• Some Statistical Properties

• Kolmogorov-Smirnov Test

• The Nonparametric Bootstrap

• Relation to Survival Functions

STAT 703/J703 B.Habing Univ. of SC (^3)

Recall that the definition of the

cumulative distribution function

(CDF) is:

F X (x)=P(X≤x)

Note that:

• F X (x) is non-decreasing

• F X (x) →1 as x→∞

• F X (x) →0 as x→-∞

STAT 703/J703 B.Habing Univ. of SC (^4)

The advantage of the CDF is that

every random variable has one,

and it has the same definition for

both discrete and continuous

random variables.

STAT 703/J703 B.Habing Univ. of SC (^5)

x<-(-500:500)/

plot(x,pnorm(x),type="l")

STAT 703/J703 B.Habing Univ. of SC (^6)

plot(x,pbinom(x,5,.4),type="l")

STAT 703/J703 B.Habing Univ. of SC (^10)

edf(rnorm(10))

lines(x,pnorm(x))

STAT 703/J703 B.Habing Univ. of SC (^11)

Statistical properties of the EDF

Note that we could write the EDF as

= (^) ∑

n

i

n I x Xi n F x

( , ]( ) 1 ( ) STAT 703/J703 B.Habing Univ. of SC (^12)

This leads directly to the fact that

F (^) n(x ) →F(x ) as n→∞ for each x

With more theory we could prove that

supx |F (^) n(x ) →F(x )| → 0 as n→∞

STAT 703/J703 B.Habing Univ. of SC (^13)

The Kolmogorov-Smirnov test uses

this quantity to construct a test of

the null hypothesis that the data is

drawn from a population with cdf F.

The test statistic is

supx |F (^) n(x ) →F(x )| STAT 703/J703 B.Habing Univ. of SC (^14)

The command in R is ks.test

ks.test(x,"pnorm",0,1)

STAT 703/J703 B.Habing Univ. of SC (^15)

It is interesting that the distribution of

the Kolmogorov-Smirnov statistic

does not depend on F !!!