Skip to main content
6 events
when toggle format what by license comment
Sep 19, 2021 at 19:39 comment added whuber Exactly: the idea is that the deviations from the rule on one side of the mean often compensate for deviations on the other side. Your choices of distributions cover a lot of ground and show how much that 68% value might really vary.
Sep 19, 2021 at 19:38 history edited BruceET CC BY-SA 4.0
added 6 characters in body
Sep 19, 2021 at 19:34 comment added BruceET Right. And thanks for code. Edited to make limitation clear. // Behavior is somewhat different on the left side, especially for distributions that don't take negative values.
Sep 19, 2021 at 19:27 comment added whuber This doesn't verify the 68-95-99.7 rule, which is *two sided:" you need to compare abs(x-mean(x)) to sd(x) instead. Here's the intended set of simulations: sapply(list(rnorm, runif, rexp, function(n) rgamma(n, 3), function(n) rbeta(n, 3, 4), function(n) rpois(n, 10), function(n) rbinom(n, 30, 0.3)), function(f) (function(x) mean(abs(x - mean(x)) <= sd(x))) (f(1e3)))
Sep 18, 2021 at 23:02 history edited BruceET CC BY-SA 4.0
edited body
Sep 18, 2021 at 22:51 history answered BruceET CC BY-SA 4.0