Canonical moments, orthogonal polynomials with application to statistics