ABSTRACT

This chapter discusses the fundamental calculations and formulas used in descriptive and inferential statistics. It develops a minimal set of routines that solve common statistical formulas. The formulas relate to basic data manipulations, measures of central tendency, measures of dispersion, probability, normal distribution, and linear regression analysis. Computer data used in statistical calculations can originate from many conceivable sources, and be formatted in virtually unlimited ways. Raw data can come directly from sensors and instruments. Primary data can be stored in any type of device and in multiple file formats. Processed data can be in standard or in proprietary formats and data types. To a certain degree, type flexibility can be achieved by means of C++ templates. The template mechanism allows creating generic functions that operate with any compatible data type. In C and C++ the same purpose can be achieved with pointers to void, but templates are easier to develop and use.