On calculation of Blakers binomial confidence limits Jan Klaschka - - PowerPoint PPT Presentation

on calculation of blaker s binomial confidence limits
SMART_READER_LITE
LIVE PREVIEW

On calculation of Blakers binomial confidence limits Jan Klaschka - - PowerPoint PPT Presentation

On calculation of Blakers binomial confidence limits Jan Klaschka klaschka@cs.cas.cz Inst. of Computer Science, Academy of Sciences, Prague, Czech Republic COMPSTAT 2010, Paris, August 22-27, 2010 Summary Blaker (2000) proposed - a


slide-1
SLIDE 1

On calculation of Blaker’s binomial confidence limits

Jan Klaschka

klaschka@cs.cas.cz

  • Inst. of Computer Science, Academy of Sciences,

Prague, Czech Republic

COMPSTAT 2010, Paris, August 22-27, 2010

slide-2
SLIDE 2

Summary

  • Blaker (2000) proposed
  • a new type of binomial confidence limts
  • a numerical algorithm for their calculation
  • Theoretical work good, but numerics a bit careless
  • My contribution: A better algorithm
slide-3
SLIDE 3

Outline

  • Blaker’s confidence interval – what is it (recap)
  • Original Blaker’s algortithm . . . and what is wrong with it
  • Remedy – new algorithm
  • Concluding remarks
slide-4
SLIDE 4

Blaker’s confidence interval

  • Task: Exact (conservative) two-sided confidence interval (CI)

for binomial parameter p

  • Clopper-Pearson (1934):

Both probabilities P(whole CI below true p) ≤ α/2, P(whole CI above true p) ≤ α/2 controlled

  • Les conservative exact alternatives:

P(. . . below . . . ) + P(. . . above . . . ) ≤ α

  • nly controlled
slide-5
SLIDE 5

Blaker’s confidence interval

  • Proposals of alternatives:
  • Sterne, Crow (1954, 1956)
  • Blyth, Still, Casella (1983, 1986)
  • Blaker (2000)
  • Virtues of Blaker’s CI:
  • Blaker’s CI ⊆ Clopper-Pearson CI
  • Monotonicity w.r.t. α
  • Easy calculation - short R program in Blaker (2000)
slide-6
SLIDE 6

Blaker’s confidence interval

  • Based on confidence function β(·) defined in terms of

binomial tail probabilities (details: Blaker (2000))

0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0

Blaker’s confidence curve n = 10, k= 4

p confidence

slide-7
SLIDE 7

Blaker’s confidence interval

  • Based on confidence function β(·) defined in terms of

binomial tail probabilities (details: Blaker (2000))

0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0

Blaker’s confidence curve n = 10, k= 4

p confidence

slide-8
SLIDE 8

Blaker’s confidence interval

  • Roughly: (1 − α) confidence interval is where β(p) ≥ α

0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0

Blaker’s confidence curve n = 10, k= 4

p confidence

  • Calculation of confidence limits:

Numerical search for points where β(·) crosses α level

slide-9
SLIDE 9

Blaker’s confidence interval

  • More precisely:
  • C = {p; β(p) ≥ α} often not an interval
  • Blaker’s interval defined as conv(C)

(convex hull)

  • Calculation of confidence limits:

Numerical search for the leftmost and rightmost points where β(·) crosses α level

slide-10
SLIDE 10

Original Blaker’s algorithm

  • Short R program in Blaker (2000), correction Blaker (2001)

(to be found at A. Agresti’s web, too)

  • Calculation of pL (lower confidence limit):

1 Start in Clopper-Pearson limit pCP

L

2 Iterate p := p + ∆p

(fixed step ∆p > 0, default 10−4) while β(p) < α

3 Once β(p) ≥ α, set pL := p − ∆p, finish

  • Calculation of pU (upper confidence limit) analogous
slide-11
SLIDE 11

Original Blaker’s algorithm

  • What is wrong?
  • Constant step → drastic slowdown when higher accuracy

required

  • Algorithm may skip short intervals and fail
slide-12
SLIDE 12

Original Blaker’s algorithm

  • Example of failure:

0.90 0.92 0.94 0.96 0.98 1.00 0.0 0.2 0.4 0.6 0.8 1.0

Original Blaker’s algorithm, step = 1e−04 n = 134, k = 131, alpha = 0.05

p confidence

slide-13
SLIDE 13

Original Blaker’s algorithm

  • Example of failure:

0.90 0.92 0.94 0.96 0.98 1.00 0.0 0.2 0.4 0.6 0.8 1.0

Original Blaker’s algorithm, step = 1e−04 n = 134, k = 131, alpha = 0.05

p confidence

slide-14
SLIDE 14

Original Blaker’s algorithm

  • Example of failure:

0.934 0.936 0.938 0.940 0.942 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10

Original Blaker’s algorithm, step = 1e−04 n = 134, k = 131, alpha = 0.05

p confidence

slide-15
SLIDE 15

Original Blaker’s algorithm

  • Example of failure:

0.934 0.936 0.938 0.940 0.942 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10

Original Blaker’s algorithm, step = 1e−04 n = 134, k = 131, alpha = 0.05

p confidence

slide-16
SLIDE 16

Original Blaker’s algorithm

  • Example of failure:

0.9360 0.9365 0.9370 0.9375 0.9380 0.9385 0.0497 0.0498 0.0499 0.0500 0.0501 0.0502

Original Blaker’s algorithm, step = 1e−04 n = 134, k = 131, alpha = 0.05

p confidence

slide-17
SLIDE 17

Original Blaker’s algorithm

  • Example of failure:

0.9360 0.9365 0.9370 0.9375 0.9380 0.9385 0.0497 0.0498 0.0499 0.0500 0.0501 0.0502

Original Blaker’s algorithm, step = 1e−04 n = 134, k = 131, alpha = 0.05

p confidence

slide-18
SLIDE 18

Original Blaker’s algorithm

  • Example of failure:

0.93600 0.93605 0.93610 0.93615 0.93620 0.04999 0.05000 0.05001 0.05002 0.05003 0.05004

Original Blaker’s algorithm, step = 1e−04 n = 134, k = 131, alpha = 0.05

p confidence

slide-19
SLIDE 19

Original Blaker’s algorithm

  • Statistics of coverage deficits – n = 1, . . . , 1000:

200 400 600 800 1000 −7 −6 −5 −4

Original Blaker’s algorithm − coverage deficit step = 1e−4, alpha = 0.05

n log(deficit)

slide-20
SLIDE 20

Original Blaker’s algorithm

  • Statistics of coverage deficits – n = 1, . . . , 1000:

200 400 600 800 1000 −7 −6 −5 −4

Original Blaker’s algorithm − coverage deficit step = 1e−5, alpha = 0.05

n log(deficit)

slide-21
SLIDE 21

Original Blaker’s algorithm

  • Statistics of coverage deficits – n = 1, . . . , 1000:

200 400 600 800 1000 −7 −6 −5 −4

Original Blaker’s algorithm − coverage deficit step = 1e−6, alpha = 0.05

n log(deficit)

slide-22
SLIDE 22

New algorithm – lemmas

  • pCP

L

. . . Clopper-Pearson lower limit p∗ . . . first discontinuity point of β(·) to the right

  • Lemma 1: pCP

L

≤ pL ≤ p∗

  • Lemma 2: β(·) crosses α level only once on [pCP

L , p∗]

  • Analogously for pU
slide-23
SLIDE 23

New algorithm – description

  • Search for the lower confidence limit pL:

(For pU analogously)

1 Modify β(·):

β∗(p) = β(p) p < p∗ +∞ p ≥ p∗ Remark: Modification is computationally easy

2 Apply interval halving to β∗(·) between pCP

L

and 1 Remark: With unmodified β(·), halving safe only on [pCP

L , p∗],

naive “global” use fails

slide-24
SLIDE 24

Concluding remarks

  • New algorithm is fast and accurate
  • Implementation: ∼ 50 lines of R code
  • R package to come (hopefully) soon
  • Slightly extended version:

www.cs.cas.cz/~klaschka/c10/417_ext.pdf

slide-25
SLIDE 25

Thank you for your attention