Applied-Longitudinal-Data-Analysis-with-brms-and-the-tidyverse icon indicating copy to clipboard operation
Applied-Longitudinal-Data-Analysis-with-brms-and-the-tidyverse copied to clipboard

variance priors

Open ASKurz opened this issue 3 years ago • 0 comments
trafficstars

Consider referencing Popoviciu's inequality on variances to define the upper limit of the variance for bounded continuous variables. https://en.wikipedia.org/wiki/Popoviciu%27s_inequality_on_variances. Consider the CES-D scale in Chapter 5. The lowest score is 0 and the highest score is 80. Using the formula, we can compute the maximum variance and standard deviation like so.

highest <- 80
lowest <- 0

# max variance
(highest - lowest)^2 / 4

# max sd
sqrt((highest - lowest)^2 / 4)

In this case, the maximum values are 1600 and 40, respectively.

You can confirm the inequality with sample statistics like so.

var(rep(c(0, 80), each = 1e5))
sd(rep(c(0, 80), each = 1e5))

A nice thing about the sample statistic version is it gives an intuition about what the expected standard deviation would be if, say, you expected a flat distribution for the CES-D.

sd(rep(0:80, each = 1e5))

In this case, the standard deviation is about 23.4.

ASKurz avatar Mar 09 '22 21:03 ASKurz