[R] Quantiles of sums of independent discrete random variables

2024-01-25 Thread Michael Meyer via R-help
Greetings, Minimal reproducible example as requested by the technical expert Jeff Newmiller: library(bayesmeta) # density of $(1/10)*\sum_{j=1}{10}N(j,0.01$ # (convex sum of normal distributions) # f <- Vectorize(function(s) sum(vapply(1:10,    FUN = function(j) dnorm(s,mean=j,sd=0.01)/10, FUN.V

[R] Use of geometric mean .. in good data analysis

2024-01-25 Thread Michael Meyer via R-help
By the Strong Law of Large Numbers applied to log(X) the geometric mean of X_1,...,X_n > 0 and IID like X converges toexp(E[log(X)]] which, by Jensen's inequality, is always  <= E[X] and is strictly less than E[X] except in trivial extreme cases. In short: by using the geometric mean all asymp