Content deleted Content added
m link confidence band using Find link |
|||
Line 5:
==Method==
Given ''M'' intervals of the form ''c'' ± ''r'' (which means [''c''−''r'',''c''+''r'']), the algorithm seeks to find an interval with ''M''−''f'' sources. The value ''f'' is referred to as the number of falsetickers, those sources which are in error (the actual value is outside the [[confidence band]]). The best estimate is that which assumes the least number of falsetickers, ''f''. The results will be considered valid if ''f'' < ''
The intersection algorithm begins by creating a table of tuples <offset,type>. For each interval there are three entries: the lower endpoint, the midpoint and the upper endpoint, labelled with types −1, 0 and +1 respectively. Thus the interval ''c'' ± ''r'' results in the entries <''c''−''r'',−1>, <''c'',0> and <''c''+''r'',+1>. These entries are then sorted by offset.
Line 11:
Variables: This algorithm uses ''f'' as number of false tickers, ''endcount'' and ''midcount'' are integers. ''Lower'' and ''upper'' are values of offsets.
0) [initialize best f] Start with ''f''=0, assuming all input intervals are valid. Each time no interval is found f will be incremented until either an interval is found or ''f'' ≥ ''
1) [initialize] ''endcount''=0 and ''midcount''=0.
2) [find lower endpoint] Start at beginning of the list (lowest offset) consider each tuple in order. ''endcount'' = ''endcount''−''type''. If ''endcount'' ≥ ''
3) [tentative lower endpoint found, initialize to find upper endpoint] set ''endcount''=0.
4) [determine number of midpoints] Start from end of list and work towards lower offsets. ''endcount'' = ''endcount''+''type''. If ''endcount'' ≥ ''
5) if ''lower'' ≤ ''upper'' and ''midcount'' ≤ ''f'' then return interval [''lowerendpoint'',''upperendpoint''] as resulting confidence interval.
6) [increment number of falsetickers] ''f'' = ''f''+1. If ''f'' ≥ ''
{{Unreferenced|date=July 2007}}
|