I was wondering what the counterpart to Pearson product-moment correlation would be in a Bayesian framework. Or if there are many alternatives, what would be the most convenient or conventional method. I know that I could do Bayesian linear regression analysis but then I have to assume that I have one dependent and one independent variable, which I don't do when calculating a correlation.

Any suggestion for how to implement the model in BUGS/JAGS is also appreciated!


My question is what a Pearson product-moment correlation in an Bayesian framework would be as opposed to a classical framework including p-values and confidence intervals of the correlation. Sometimes the transition from classical statistics to Bayesian statistics is not straight forward, for example, some Bayesian ANOVAs that are proposed actually are not analyses of variance. Correlation analysis is a really common statistical analysis but I haven't been able to find any Bayesian example implementation in, for example, JAGS or BUGS.


I now found the following pdf presentation that describes using a multivariate normal distribution with a Wishart distribution as the prior on the precision to calculate the correlation coefficient. This was, sort of, the answer I was looking for.

  • Are you assuming a particular joint distribution for your two variables? – jbowman Nov 26 '12 at 15:19
  • I think the simplest/most convenient way might be to use z scores of both variables as the y and x, and simply regress y~x, but limiting the parameter estimate to between 0 and 1. – Matt Albrecht Nov 26 '12 at 15:39
  • @jbowman Well, I guess I assume the same distribution as I assume when calculating a Pearson product-moment correlation. – Rasmus Bååth Nov 26 '12 at 15:41
  • 1
    You aren't actually making a distributional assumption when calculating a Pearson correlation; it just measures the strength of a linear relationship between two variables. You could have a bivariate Poisson dist'n or a bivariate Normal distribution (or one Poisson, one Normal)... – jbowman Nov 26 '12 at 15:45
  • 1
    @RasmusBååth I guess you've identified ANOVA with an F-test on a particular linear model and perhaps also its traditional tabular presentation. The naming is obviously a matter of expository taste, but if you look at Kruschke's chapter (or other 'Bayesian' ANOVA) all the 'between', 'within', and other variances may be summarised and compared from the MCMC output. He's just skipped the explicit general variance partition and cut straight to the comparisons. However, the underlying statistical model is the one a classical stat person would use. – conjugateprior Nov 28 '12 at 8:37

There is no essential Bayesian / frequentist divide with a correlation any more than there is a Bayesian equivalent of a mean or median. A correlation is just an arithmetic calculation. The need for specific Bayesian techniques only arises when you do inference with it, so the appropriate Bayesian approach would depend on what your actual question is. But there's no fundamental reason why it wouldn't invove Pearson's product-moment correlation.

  • I tried to clarify my question above. – Rasmus Bååth Nov 26 '12 at 19:01
  • @RasmusBååth So you put a prior distribution on the model parameters and the posterior distribution of the correlation is your Bayesian correlation, if you want. – Stéphane Laurent Nov 26 '12 at 19:37

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.