Online Bayesian Learning in Probabilistic Graphical Models using Moment Matching with Applications