add more digits to 90% normal constant

This commit is contained in:
NunoSempere 2023-11-02 21:49:35 +00:00
parent 8547347ac6
commit 08908f9da5
2 changed files with 8 additions and 0 deletions

View File

@ -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()

View File

@ -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. We know that the 90% confidence interval of the unit normal is
// [-1.6448536269514722, 1.6448536269514722] // [-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 // 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 // 2. So if we take a unit normal and multiply it by
// L / 1.6448536269514722, its new 90% confidence interval will be // L / 1.6448536269514722, its new 90% confidence interval will be
// [-L, L], i.e., length 2 * L // [-L, L], i.e., length 2 * L