Mathematical methods of statistical quality control