commit 08908f9da56268747822f13122a0a61dbd0ae515
parent 8547347ac628a94da82d66dfa97c294100e38f57
Author: NunoSempere <nuno.sempere@protonmail.com>
Date: Thu, 2 Nov 2023 21:49:35 +0000
add more digits to 90% normal constant
Diffstat:
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/examples/15_plotting-scratchpad/.Rhistory b/examples/15_plotting-scratchpad/.Rhistory
@@ -0,0 +1,7 @@
+library(ggplot2)
+data <- read.csv("samples.txt", header = FALSE)
+data <- as.data.frame(data)
+ggplot(data = data, aes(x = V1)) +
+geom_bar()
+ggplot(data = data, aes(x = V1)) +
+geom_freqpoly()
diff --git a/squiggle.c b/squiggle.c
@@ -85,6 +85,7 @@ inline double sample_normal_from_90_confidence_interval(double low, double high,
// 1. We know that the 90% confidence interval of the unit normal is
// [-1.6448536269514722, 1.6448536269514722]
// see e.g.: https://stackoverflow.com/questions/20626994/how-to-calculate-the-inverse-of-the-normal-cumulative-distribution-function-in-p
+ // or https://www.wolframalpha.com/input?i=N%5BInverseCDF%28normal%280%2C1%29%2C+0.05%29%2C%7B%E2%88%9E%2C100%7D%5D
// 2. So if we take a unit normal and multiply it by
// L / 1.6448536269514722, its new 90% confidence interval will be
// [-L, L], i.e., length 2 * L