Skip to main content
Log in

Algorithms for frequency distributions: efficiency and generality comparisons

  • Papers
  • Published:
Statistics and Computing Aims and scope Submit manuscript

Abstract

Five methods for forming empirical frequency distributions are outlined. A specific implementation of each is described, and theoretical comparison of their speed and storage is supplemented by simulation data to give a series of recommendations about the appropriateness of each for different situations. The index method is the fastest of those considered, but often uses excessive space. A method based on height-balanced trees is economical of space, and still has good speed. A method based on Quicksort is faster than the tree method, but uses more space.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  • Agresti, A. and Wackerly, D. (1977) Some exact conditional tests of independence forR×C cross classification tables.Psychometrika,42, 111–125.

    Google Scholar 

  • Baker, R. J. (1977) Exact distributions derived from two way tables.Applied Statistics,26, 199–206.

    Google Scholar 

  • Dewey, M. E. (1986) Height balanced trees.Applied Statistics,35, 220–226.

    Google Scholar 

  • Dewey, M. E. (1989) A remark on AS131: Tabulating frequency distributions for variables with structured code sets.Applied Statistics,38, 582.

    Google Scholar 

  • Freeman, P. R. (1970) Ranking an array of numbers.Applied Statistics,19, 111–113.

    Google Scholar 

  • Kernighan, B. W. and Plauger, P. J. (1976)Software Tools, Addison-Wesley, Reading, MA.

    Google Scholar 

  • Knuth, D. E. (1973)The Art of Computer Programming: Volume 3: Sorting and Searching, Addison-Wesley, Reading, MA.

    Google Scholar 

  • Leathers, B. L. (1977) Tabulating sparse frequency distributions.Applied Statistics,26, 364–368.

    Google Scholar 

  • Leathers, B. L. (1978) Tabulating frequency distributions for variables with structured code sets.Applied Statistics,27, 359–362.

    Google Scholar 

  • Royston, J. P. and Altman, D. G. (1988) Number tally.Applied Statistics,37, 285–290.

    Google Scholar 

  • Wichman, B. A. and Hill, I. D. (1982) An efficient and portable pseudo-random number generator.Applied Statistics,31, 188–190.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Dewey, M.E. Algorithms for frequency distributions: efficiency and generality comparisons. Stat Comput 2, 213–220 (1992). https://doi.org/10.1007/BF01889681

Download citation

  • Received:

  • Accepted:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01889681

Keywords

Navigation