“…In fact the method used by Baker also involves many moves of data from one part of the array to another. If we speed up the storage by using a system of height balanced trees (Dewey 1986) we reduce the number of comparisons and moves, and a useful saving in speed can be achieved. For instance using Model 2 with margins of (107 5) and 11 8 3) and computing the Pearson X 2 statistic the time is reduced from 46.4 to 10.5 seconds on a PDP11 running RT11.…”