binomial and geometric distributions delta on-time performance at hartsfield- jackson atlanta...

26
Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield-Jackson Atlanta International (June, 2003 - June, 2015) http://www.transtats.bts.gov/OT_Delay/ot_delaycause1.asp? display=data&pn=1

Upload: neal-nelson

Post on 29-Dec-2015

226 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Binomial and Geometric Distributions

Delta On-Time Performance at Hartsfield-Jackson Atlanta International (June, 2003 -

June, 2015)http://www.transtats.bts.gov/OT_Delay/ot_delaycause1.asp?display=data&pn=1

Page 2: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Data / Model

• Total Operations: 2,278,897• On-Time Operations: 1,824,432• Proportion On-Time: 1824432/2278897 = .8006 (.80)• Will consider random samples of various sizes from

this population of operations• Y ≡ # of On-Time operations out of the sample of n• Y ~ Binomial(n , pY = 0.80)• X ≡ # of Flights sampled until the first NOT On-Time

Arrival is selected • X ~ Geometric(pX = 0.20)

Page 3: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Binomial Distribution – Probability Function

2 2 2

3 3 2 2

Binomial Probability Mass Function

!| ~ , 1 1 0,1,..., 0 1

! !

0 since: 0,1,..., 0 1

Binomial Expansion of :

2 : 2

3: 2

n y n yy y

n

n nP Y y Y Bin n p p y p p p p y n p

y y n y

p y y y n p

a b

n a b a ab b

n a b a a b ab

2 2 3 3 2 2 3

0

0 0

2 3 3

General :

1 1 1 1 Thus, a probability distribution

nn n i i

i

n nnn yy n

y y

a b ab b a a b ab b

nn a b a b

i

np y p p p p

y

Page 4: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Geometric Distribution• Used to model the number of Bernoulli trials needed until the

first Success occurs (P(S)=p) First Success on Trial 1 S, y = 1 p(1)=p First Success on Trial 2 FS, y = 2 p(2)=(1-p)p First Success on Trial k F…FS, y = k p(k)=(1-p)k-1 p

1

1 1

1 1 1

* *

*

1 * 0

( ) (1 ) 1,2,...

( ) (1 ) (1 )

Setting 1 and noting that 1, 2,... 0,1,...

1( ) (1 ) 1

1 (1 )

y

y y

y y y

y

y y

p y p p y

p y p p p p

y y y y

pp y p p p

p p

Page 5: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Binomial Distribution – Expected Value

0 0

Binomial Probability Mass Function

!| ~ , 1 1 0,1,..., 0 1

! !

Obtaining the Mean of :

!1 Summand = 0 when 0

! !

!

!

n y n yy y

n nn yy

Yy y

Y

n nP Y y Y Bin n p p y p p p p y n p

y y n y

Y

nE Y yp y y p p y

y n y

nyy n

1

1

1

1 11 1

0 0

1 Pull out ,!

1 !1 Now, set 1 0,1,..., 1 1

1 ! !

1 ! 1 !1 1

! 1 ! ! 1 !

nn yy

y

nn yy

Yy

n nn w n ww w

Yw w

p p n py

nnp p p w y w n y w

y n y

n nnp p p np p p

w n w w n w

0

Now, set 1

!1 1

! !

mmm ww

Yw

m n

mnp p p np p p np

w m w

Page 6: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Geometric Distribution – Expected Value

1

1 1

1

1 1

1

1

Note: 1 and

This interchange is justified due to nature of the convergent series.

y

y y

yy

yy

y y

y

y

E Y yp y y q p

dqq p yq

dq

dq dE Y p p q

dq dq

dE Y p q q

dq

1

1 0

2 2 2

1 since 0 1

1

(1 )(1 )(1) ( 1) 1

1 (1 ) (1 )

y z

y z

q q qq

p q qd q q q pE Y p p

dq q q q p p

Page 7: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Binomial Distribution – Variance and SD

2

0 0

2

Obtaining the Variance of : First obtain 1

!1 1 1 1 Summand = 0 when 0,1

! !

!1 1 1 Pull out

! !

n nn yy

y y

nn yy

y

Y E Y Y E Y E Y

nE Y Y y y p y y y p p y

y n y

nE Y Y y y p p n n

y n y

2

2 2

2

222

0

222

0

2

1 ,

2 !1 1 1

2 ! !

Now, set 2 0,1,..., 2 2

2 !1 1 1

! 2 !

2 !1 1 Now, set 2

! 2 !

!1 1

!

nn yy

y

nn ww

w

nn ww

w

p

nE Y Y n n p p p

y n y

w y w n y w

nE Y Y n n p p p

w n w

nn n p p p m n

w n w

mE Y Y n n p

w m

2 2

0

2 2 2 2 2 2

2 22 2 2 2

1 1 1 1!

1 1

1 1 1

mmm ww

w

Y Y

p p n n p p p n n pw

E Y E Y Y E Y n p np np n p np p

V Y E Y E Y n p np p np np p np p

Page 8: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Geometric Distribution – Variance and SD

21

21 1

2 21

2 21 1

23

32 2 3 2

22 2 2

( 1) ( 1)

1 2 2 22(1 ) ( 1)

1 (1 ) 1

2 1 2(1 ) 2( 1) ( )

( )

yy

y y

y y

y y

d qE Y Y y y q p pq

dq

d dpq q pq q qdq dq

d q d pq pq qpq pq pq qdq q dq q p pq

q p p pE Y E Y Y E Y

p p p p

V Y E Y

2

222 2 2 2

2

2 1 2 1 1( )

p p p qE Y

p p p p p

q

p

Page 9: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Binomial Distribution for On-Time Flights

1 0 1 0 1 1 1

2

0 2 0 1 2 1

1 (Bernoulli Distribution):

10.8 1 0.8 0,1 0 1 0.8 0.2 0.2 1 1 0.8 0.2 0.8

1 0.8 0.8 1 0.8 0.2 0.16 0.40

2

20.8 1 0.8 0,1,2

0 1 0.8 0.2 0.04 1 2 0.8 0.2 0.32

yy

Y

yy

n

p y y p py

E Y V Y

n

p y yy

p p p

2 2 22 1 0.8 0.2 0.64

2 0.8 1.6 2 0.8 0.2 0.32 0.566

In general, what needs to happen for 1 ?

For what value of does that occur for .8?

YE Y V Y

p n p n

n p

Page 10: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Binomial Distributions for n=1,2,3,4,10,25

• In EXCEL: Create a column of values 0,1,2,…,n (Say 0 is in cell

A2) In Cell B2, Type: =BINOM.DIST(A2,n,p,0) Copy and paste that cell alongside 1 (A3),…,n Note that the 0 at the end gives P(Y = y) = p(y) If you use 1 instead, you get P(Y ≤ y) = F(y)

Page 11: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

n n n n n n1 2 3 4 10 25

p p p p p p0.8 0.8 0.8 0.8 0.8 0.8

y p(y) y p(y) y p(y) y p(y) y p(y) y p(y)0 0.2 0 0.04 0 0.008 0 0.0016 0 1.02E-07 0 3.36E-181 0.8 1 0.32 1 0.096 1 0.0256 1 4.1E-06 1 3.36E-16

2 0.64 2 0.384 2 0.1536 2 7.37E-05 2 1.61E-143 0.512 3 0.4096 3 0.000786 3 4.94E-13

4 0.4096 4 0.005505 4 1.09E-115 0.026424 5 1.83E-106 0.08808 6 2.43E-097 0.201327 7 2.64E-088 0.30199 8 2.38E-079 0.268435 9 1.8E-06

10 0.107374 10 1.15E-0511 6.27E-0512 0.00029313 0.00117114 0.004015

1 15 0.01177716 0.02944217 0.06234918 0.11084219 0.16334620 0.19601521 0.18668122 0.13576823 0.07083524 0.02361225 0.003778

0.8 0.4 1.6 0.565685 2.4 0.69282 3.2 0.8 8 1.264911 20 2

Several Binomial Distributions with p=0.8

Page 12: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

0 1-2.22044604925031E-16

0.0499999999999998

0.0999999999999998

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

0.55

0.6

0.65

0.7

0.75

0.8

0.85

0.9

0.95

1

Probability Distribution of On-Time Flights Y ~ Bin(n=1,p=0.80)

p(y)

Page 13: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

0 1 2 3

-0.0500000000000001

-6.93889390390723E-17

0.0499999999999999

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

0.55

0.6

0.65

0.7

Probability Distribution of On-Time Flights Y ~ Bin(n=3,p=0.80)

p(y)

Page 14: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

0 1 2 3 40

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

Probability Distribution of On-Time Flights Y ~ Bin(n=4,p=0.80)

p(y)

Page 15: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

0 1 2 3 4 5 6 7 8 9 10

-0.04

-2.77555756156289E-17

0.04

0.08

0.12

0.16

0.2

0.24

0.28

0.32

0.36

0.4

Probability Distribution of On-Time Flights Y ~ Bin(n=10,p=0.80)

p(y)

Page 16: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

-0.025

-3.46944695195361E-17

0.025

0.05

0.075

0.1

0.125

0.15

0.175

0.2

0.225

0.25

Probability Distribution of On-Time Flights Y ~ Bin(n=25,p=0.80)

p(y)

Page 17: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

0 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 75 78 81 84 87 90 93 96 990

0.02

0.04

0.06

0.08

0.1

0.12

Probability Distribution of On-Time Flights Y ~ Bin(n=100,p=0.80)

p(y)

Page 18: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Geometric Distribution Probabilities

1 1

2 1

11

2 2

1 1

1 1 1

1 1 0.20

2 2 0.20 0.80 0.16

0.20 0.80

11 1 1 0.20 .805.00 20.00

0.20 .20 .04

20 4.47

11

1

X X X

X X X X

xxX X

X

X X

X

xx x xi i X

X X X X Xi i i X

P X p p q p

P X p p q p q

P X x p x p q

pE X V X

p p

qF x P X x p x p q p q p

q

1 .80

In general, what is the smallest such that for fixed 0 1

For the Airline data, what is the smallest x such that 0.95

xxXq

x P X x c c

P X x

Page 19: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Geometric Distribution

• In EXCEL: Create a column of values 1,2,…,Y* for some large

value of Y* (Say 1 is in cell A2) In Cell B2, Type: =NEGBINOM.DIST(A2-1,1,p,0) Copy and paste that cell alongside 1 (A3),…,Y* Note that the 0 at the end gives P(Y = y) = p(y) If you use 1 instead, you get P(Y ≤ y) = F(y)

Page 20: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Geometric Distribution Probabilities and CDFGeometric (p=.20)y p(y) F(y)

1 0.2 0.22 0.16 0.363 0.128 0.4884 0.1024 0.59045 0.08192 0.672326 0.065536 0.7378567 0.052429 0.7902858 0.041943 0.8322289 0.033554 0.865782

10 0.026844 0.89262611 0.021475 0.91410112 0.01718 0.93128113 0.013744 0.94502414 0.010995 0.9560215 0.008796 0.96481616 0.007037 0.97185317 0.005629 0.97748218 0.004504 0.98198619 0.003603 0.98558820 0.002882 0.98847121 0.002306 0.99077722 0.001845 0.99262123 0.001476 0.99409724 0.001181 0.99527825 0.000944 0.996222

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 250

0.05

0.1

0.15

0.2

0.25

Geometric Distribution for Probability of y Trials until 1st NON On-Time Flight

p(y)

Page 21: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Moment-Generating Function

2 3 4

2 3 4

2 3 42 3 4

'Define:

1 ...2! 3! 4!

'Assuming for 1,2,3,.... :

1 ...2! 3! 4!

12! 3! 4!

kk

ty

k

tY ty

y y

y y y y

E Y

ty ty tye ty

k

ty ty tym t E e e p y ty p y

t t tp y t yp y y p y y p y y p

2 3 4

1 2 3 4

0

2 3

1 2 3 4 1

2

2 3 4 2

...

' ' ' '1 ...2! 3! 4!

'If exists: 0

2 3 4' ' ' ' 'Note: ' 0 ... ' 02! 3! 4!

6 12' ' ' ''' 0 ... '' 03! 4!

y

kk k

kk

t

y

t t tt

d m tm t m E Y

dt

t t tm t m

t tm t m

Page 22: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Moment-Generating Function – Binomial Distribution

0 0 0

0

1 1

2 2 1

Binomial Distribution:

1 1

1 1

' 1 ' 0 1

'' 1 1 1

n n n yn y n ytY ty ty y t y

y y y

n y nn yt t

y

n nt t

n nt t t t

n nm t E e e p y e p p e p p

y y

npe p p pe

y

m t n p pe pe m n p p p np

m t n n p pe pe n p pe pe

2 2 2

222 2 2 2 2

1 2 2 1

'' 0 1 1

' ' ' '1 1 1

Airline Values:

1 0.80 0.80 0.20 0.80n nt t

m n n p np n p np p

E Y np E Y n p np p V Y n p np p np np p

m t e e

Page 23: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Geometric Distribution – MGF

1

1

1

1 1 1

2 2

2 2

2 2 2

( )

1 1 (1 )

1 (1 ) (1 ) (1 ) (1 )'

1 (1 ) 1 (1 )

1' 0

1 (1 )1 (1 )

tY ty y

y

t t ty yty y t t

t ty y y

t t t t t t t

t t

t

t

m t E e e q p

p p pqe pe pee q qe qe

q q q qe p e

p e pe pe p e pe p p e p p em t

p e p e

pe p pm E Y

p ppp e

m

2

4

2 2 2 2 2 2

4 4

22

4 3 2 2 2

1 (1 ) 2 1 (1 ) (1 )''

1 (1 )

1 2(1 ) (1 ) 2(1 ) 2(1 ) 1 (1 )

1 (1 ) 1 (1 )

1 1 1 1 1 1'' 0

t t t t t

t

t t t t t t t

t t

p e pe pe p e p et

p e

pe p e p e p e p e pe p e

p e p e

p q q q q q qm V Y

p p p p p p

Page 24: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Probability-Generating Functions

0 1 2 3

0

2 3

2

Define: 1 ... 1 where is a positive integer

is a Random Variable that takes on integer values: 0,1,2,...

0 1 2 3 ...

1 1 2 3 ...

' 0 1 2 2 3

k

Y y

y

E Y Y Y k k

Y y

P t E t t p y t p t p t p t p

tp t p t p

P t p tp t

0

0

1

3 ...

' 1 0 1 2 2 3 3 ...

'' 0 0 2 1 2 3 2 3 ...

'' 1 0 0 2 1 2 3 2 3 ...

1 1

1 ... 1

y

y

kk k

kk t

p

P p p p

yp y E Y

P t p tp

P p p

y y p y E Y Y

d P tP t P t E Y Y Y k

dt

Page 25: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Probability-Generating Functions - Binomial

0 0

0

1

1

2 2

2 2

Binomial Distribution:

Note: 1 2 ... 0

1

1 1

' 1

' 1 1

'' 1 1

'' 1 1 1 1

nn yY y y y

y y

nny n y

y

n

n

n

n

p n p n p

nP t E t t p y t p p

y

npt p p pt

y

P t n p pt p

P n p p p np E Y

P t n n p pt p

P n n p p p n n

2 21 1

For Airline Data: 1 0.80 0.80 0.20 0.80

n

n n

p p p E Y Y

P t t t

Page 26: Binomial and Geometric Distributions Delta On-Time Performance at Hartsfield- Jackson Atlanta International (June, 2003 - June, 2015)

Geometric Distribution – PGF

1

1 1 1

1

1

2 2 2

2 2

3

( )

1 1 (1 )

1 (1 ) (1 )1 (1 ) (1 )'

1 (1 ) 1 (1 ) 1 (1 )

1' 1

1 (1 )

2 (1'' 2 1 (1 ) (1 )

yY y y y y

y y y

y

y

p pP t E t t q p t q tq

q q

ptq pt pttq

q tq p t

p p t p tp t p pt p pP t

p t p t p t

p pP E Y

p pp

pP t p p t p

3

3 2

2

2 2 2

)

1 (1 )

2 12 (1 )'' 1 1

2 1 1 1 2 2 1 1

p

p t

pp pP E Y Y

p p

p p p pV Y

p p p p p