CONFIDENCE INTERVALS FOR THE MEDIAN
Two sided Symmetric -- 95% or Better

Nonparametric two sided confidence intervals for the median of a continuous distribution based on order statistics. Shown are the narrowest symmetric intervals whose confidence coefficient is 95% or better.
Key
   N       Sample size
   L U     Order statistics defining the Lower and Upper endpoints
   P{miss} Probability the interval does not cover the true median
           (never exceeds 0.05)
  N  L  U  P{miss} 
  1  .  .   .
  2  .  .   .
  3  .  .   .
  4  .  .   .
  5  .  .   .
  6  1  6  0.03125
  7  1  7  0.01563
  8  1  8  0.00781
  9  2  8  0.03906
 10  2  9  0.02148
 11  2 10  0.01172
 12  3 10  0.03857
 13  3 11  0.02246
 14  3 12  0.01294
 15  4 12  0.03516
 16  4 13  0.02127
 17  5 13  0.04904
 18  5 14  0.03088
 19  5 15  0.01921
 20  6 15  0.04139
 21  6 16  0.02660
 22  6 17  0.01690
 23  7 17  0.03469
 24  7 18  0.02266
 25  8 18  0.04329
 26  8 19  0.02896
 27  8 20  0.01916
 28  9 20  0.03570
 29  9 21  0.02412
 30 10 21  0.04277
 31 10 22  0.02945
 32 10 23  0.02006
 33 11 23  0.03508
 34 11 24  0.02431
 35 12 24  0.04096
 36 12 25  0.02882
 37 13 25  0.04703
 38 13 26  0.03355
 39 13 27  0.02370
 40 14 27  0.03848
  N  L  U  P{miss} 
 41 14 28  0.02753
 42 15 28  0.04356
 43 15 29  0.03154
 44 16 29  0.04877
 45 16 30  0.03570
 46 16 31  0.02590
 47 17 31  0.03999
 48 17 32  0.02930
 49 18 32  0.04438
 50 18 33  0.03284
 51 19 33  0.04887
 52 19 34  0.03648
 53 19 35  0.02701
 54 20 35  0.04022
 55 20 36  0.03003
 56 21 36  0.04405
 57 21 37  0.03314
 58 22 37  0.04794
 59 22 38  0.03634
 60 22 39  0.02734
 61 23 39  0.03962
 62 23 40  0.03002
 63 24 40  0.04296
 64 24 41  0.03277
 65 25 41  0.04635
 66 25 42  0.03558
 67 26 42  0.04980
 68 26 43  0.03846
 69 26 44  0.02949
 70 27 44  0.04139
 71 27 45  0.03193
 72 28 45  0.04437
 73 28 46  0.03442
 74 29 46  0.04739
 75 29 47  0.03695
 76 29 48  0.02863
 77 30 48  0.03954
 78 30 49  0.03079
 79 31 49  0.04217
 80 31 50  0.03299
    N  L  U  P{miss} 
   81 32 50  0.04483
   82 32 51  0.03524
   83 33 51  0.04752
   84 33 52  0.03753
   85 33 53  0.02946
   86 34 53  0.03985
   87 34 54  0.03142
   88 35 54  0.04221
   89 35 55  0.03342
   90 36 55  0.04460
   91 36 56  0.03545
   92 37 56  0.04701
   93 37 57  0.03751
   94 38 57  0.04945
   95 38 58  0.03961
   96 38 59  0.03155
   97 39 59  0.04173
   98 39 60  0.03336
   99 40 60  0.04388
  100 40 61  0.03520
  101 41 61  0.04604
  102 41 62  0.03707
  103 42 62  0.04823
  104 42 63  0.03896
  105 42 64  0.03130
  106 43 64  0.04087
  107 43 65  0.03295
  108 44 65  0.04281
  109 44 66  0.03462
  110 45 66  0.04476
  111 45 67  0.03631
  112 46 67  0.04674
  113 46 68  0.03802
  114 47 68  0.04872
  115 47 69  0.03975
  116 47 70  0.03227
  117 48 70  0.04150
  118 48 71  0.03379
  119 49 71  0.04327
  120 49 72  0.03532

          Table Entries Can (usually) Be Calculated 

With only TWO exceptions, the table entries agree with this formula:
          L = floor[ (N+1)/2 - 0.9789 sqrt(N) ]

These two exceptions are --
      N = 17     L =  5   U = 13    the formula obtains L= 4 (U=14)
      N = 67     L = 26   U = 42    the formula obtains L=25 (U=43)
In both cases the formula is conservative.

Beyond table, the formula works from N=6 through N=283 save for the
two execeptions listed above.

For 284 and beyond this formula suffices for practical purposes:
          L = floor[ (N+1)/2 - 0.9800 sqrt(N) ]               

Example:
For a random sample of      53 67 85 98 30 37 69 77 79 45 49 106

First order the sample      30 37 45 49 53 67 69 77 79 85 98 106
         (order number)      1  2  3  4  5  6  7  8  9 10 11  12

For N=12, the table shows   L=3, U=10,  P{miss}=0.03857
45 to 85 is a 96.142%  confidence interval for the median.

This table is public domain.
Entries of this table were calculated with
APL programs written by William Knight
University of New Brunswick, Canada.
knight@unb.ca