Estimation of Distributions Using Orthogonal Expansions