Generating Functions in the Theory of Statistics