I'm a noob in statistics but have been watching some videos here: https://creativemaths.net/videos/#inference As a learning excercise, I tried to implement confidence interval calculations for mean and median here: https://github.com/jumarko/clojure-experiments/blob/master/src/clojure_experiments/stats/confidence_intervals.clj#L37-L92 Does the implementation makes any sense? Any good clojure/java libraries that do the same thing? (especially interested in approaches for calculating a confidence interval for a median)
Compare with my implementation here: https://github.com/generateme/fastmath/blob/382ec27d23fbaf8925a088c5d5edc27e4596dd0d/src/fastmath/stats.clj#L407
There are also other intervals/extents like adjacent values or median/quantiles etc.
There is also bootstrap ci https://github.com/generateme/fastmath/blob/382ec27d23fbaf8925a088c5d5edc27e4596dd0d/src/fastmath/stats.clj#L423
@jumar your clojure_experiments
repo looks amazing. What a huge collection of interesting examples! ✨
As @tsulejsuggested, I think Bootstrap-based confidence intervals seem like a good practical approach for confidence intervals for medians, as there isn't any general approximation such as the t
-distribution we have for means.
The intro to bootstrap that is linked to from @tsulej's code is quite nice to read, I think.
Cool, thanks! I’ll check the links later