Latent variable models, Statistical inference