Relationship between Bayesian and Frequentist regression

Bryan Whiting
2 min readJul 17, 2021

What I learned from this:

  • Assumptions are the same (LINE: Linear relationship, independent predictors, normally distributed errors and equal variance of errors)
  • Additionally, the prior assumptions need to be met. And the parameter estimates have to converge.

Relationship Between Correlation and Simple Linear Regression

The standardised regression coefficient is the same as Pearson’s correlation coefficient

The square of Pearson’s correlation coefficient is the same as the 𝑅2 in simple linear regression

Someone should map out how all of these things are the same.

Bayesian Correlation

Because Pearson’s correlation assumes that the data come from a bivariate normal distribution (i.e. that the observations for each of the two variables are normally distributed), it is very sensitive to outliers.

Spearman correlation vs Pearson:

The Spearman correlation between two variables is equal to the Pearson correlation between the rank values of those two variables.

Anova

  • Anova is essentially likelihood ratio tests: f-tests

T.test, anova, and Linear regression

They’re all generally the same thing, or special cases of a GLM.

What can I do with this?

  1. I can measure correlation of two normally distributed variables using simple linear regression.
  2. I can measure confidence intervals on my correlation using bootstrap.
  3. I can use rstanarm to calculate correlations and get posterior predictive distributions (without needing to use rstan).
  4. I can use rstanarm to to do t tests and anova
  5. I can use rstanarm to help calculate posterior predictive intervals for levels of a categorical (get confidence intervals on a group by mean)

--

--

Bryan Whiting

The world is defined by writers | Silicon Valley Data Scientist | Google