Testing Specification testing Michel Bierlaire Introduction to - - PowerPoint PPT Presentation

testing
SMART_READER_LITE
LIVE PREVIEW

Testing Specification testing Michel Bierlaire Introduction to - - PowerPoint PPT Presentation

Testing Specification testing Michel Bierlaire Introduction to choice models Differences from classical hypothesis testing Classical hypothesis testing: example Null hypothesis ( H 0 ) A simple hypothesis contradicting a theoretical


slide-1
SLIDE 1

Testing

Specification testing Michel Bierlaire Introduction to choice models

slide-2
SLIDE 2

Differences from classical hypothesis testing

slide-3
SLIDE 3

Classical hypothesis testing: example

Null hypothesis (H0)

A simple hypothesis contradicting a theoretical assumption.

Lady testing tea

◮ Theory: a lady is able to tell if the milk has been

poured before of after the tea in a cup.

◮ H0: the outcome of the taste is purely random.

slide-4
SLIDE 4

Specification testing: example

Null hypothesis (H0)

A simple hypothesis contradicting a theoretical assumption.

Explanatory variable

◮ Theory: a variable explains the choice behavior. ◮ H0: the coefficient of the variable is zero.

slide-5
SLIDE 5

Errors in hypothesis testing

slide-6
SLIDE 6

Errors in hypothesis testing

Type I error

slide-7
SLIDE 7

Errors in hypothesis testing

Type I error Type II error

slide-8
SLIDE 8

Errors in hypothesis testing

Type I error

◮ H0 rejected and H0 true.

Type II error

slide-9
SLIDE 9

Errors in hypothesis testing

Type I error

◮ H0 rejected and H0 true.

Type II error

◮ H0 accepted and H0 false.

slide-10
SLIDE 10

Errors in hypothesis testing

Type I error

◮ H0 rejected and H0 true. ◮ Include an irrelevant variable.

Type II error

◮ H0 accepted and H0 false.

slide-11
SLIDE 11

Errors in hypothesis testing

Type I error

◮ H0 rejected and H0 true. ◮ Include an irrelevant variable.

Type II error

◮ H0 accepted and H0 false. ◮ Omit a relevant variable.

slide-12
SLIDE 12

Errors in hypothesis testing

Type I error

◮ H0 rejected and H0 true. ◮ Include an irrelevant variable. ◮ Loss of efficiency.

Type II error

◮ H0 accepted and H0 false. ◮ Omit a relevant variable.

slide-13
SLIDE 13

Errors in hypothesis testing

Type I error

◮ H0 rejected and H0 true. ◮ Include an irrelevant variable. ◮ Loss of efficiency.

Type II error

◮ H0 accepted and H0 false. ◮ Omit a relevant variable. ◮ Specification error.

slide-14
SLIDE 14

Errors in hypothesis testing

Type I error

◮ H0 rejected and H0 true. ◮ Include an irrelevant variable. ◮ Loss of efficiency. ◮ Cost: CI.

Type II error

◮ H0 accepted and H0 false. ◮ Omit a relevant variable. ◮ Specification error.

slide-15
SLIDE 15

Errors in hypothesis testing

Type I error

◮ H0 rejected and H0 true. ◮ Include an irrelevant variable. ◮ Loss of efficiency. ◮ Cost: CI.

Type II error

◮ H0 accepted and H0 false. ◮ Omit a relevant variable. ◮ Specification error. ◮ Cost: CII >> CI.

slide-16
SLIDE 16

Errors in hypothesis testing

Type I error

◮ H0 rejected and H0 true. ◮ Include an irrelevant variable. ◮ Loss of efficiency. ◮ Cost: CI.

Type II error

◮ H0 accepted and H0 false. ◮ Omit a relevant variable. ◮ Specification error. ◮ Cost: CII >> CI.

Note

In classical hypothesis testing, CI ≈ CII

slide-17
SLIDE 17

Impact of an error

slide-18
SLIDE 18

Impact of an error

Probability of an error

P(Type I) =

slide-19
SLIDE 19

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true)

slide-20
SLIDE 20

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true)

slide-21
SLIDE 21

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true) α

slide-22
SLIDE 22

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true) α λ

slide-23
SLIDE 23

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true) α λ P(Type II) =

slide-24
SLIDE 24

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true) α λ P(Type II) = P(H0 accepted|H0 false)

slide-25
SLIDE 25

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true) α λ P(Type II) = P(H0 accepted|H0 false) P(H0 false)

slide-26
SLIDE 26

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true) α λ P(Type II) = P(H0 accepted|H0 false) P(H0 false) β

slide-27
SLIDE 27

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true) α λ P(Type II) = P(H0 accepted|H0 false) P(H0 false) β (1 − λ)

slide-28
SLIDE 28

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true) α λ P(Type II) = P(H0 accepted|H0 false) P(H0 false) β (1 − λ)

Expected cost

Expected cost =

slide-29
SLIDE 29

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true) α λ P(Type II) = P(H0 accepted|H0 false) P(H0 false) β (1 − λ)

Expected cost

Expected cost = P(Type I) CI + P(Type II) CII

slide-30
SLIDE 30

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true) α λ P(Type II) = P(H0 accepted|H0 false) P(H0 false) β (1 − λ)

Expected cost

Expected cost = P(Type I) CI + P(Type II) CII = αλ CI + β(1 − λ) CII

slide-31
SLIDE 31

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true) α λ P(Type II) = P(H0 accepted|H0 false) P(H0 false) β (1 − λ)

Expected cost

Expected cost = P(Type I) CI + P(Type II) CII = αλ CI + β(1 − λ) CII

Classical hypothesis testing

λ ≈ 1, CI ≈ CII

slide-32
SLIDE 32

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true) α λ P(Type II) = P(H0 accepted|H0 false) P(H0 false) β (1 − λ)

Expected cost

Expected cost = P(Type I) CI + P(Type II) CII = αλ CI + β(1 − λ) CII

Classical hypothesis testing

λ ≈ 1, CI ≈ CII: prefer small α.

slide-33
SLIDE 33

Impact of an error

Probability of an error

P(Type I) = P(H0 rejected|H0 true) P(H0 true) α λ P(Type II) = P(H0 accepted|H0 false) P(H0 false) β (1 − λ)

Expected cost

Expected cost = P(Type I) CI + P(Type II) CII = αλ CI + β(1 − λ) CII

Specification testing

λ ≈ 0.5, CII >> CI: larger α can be used.