forked from personal/squiggle.c
add more digits to 90% normal constant
This commit is contained in:
parent
8547347ac6
commit
08908f9da5
7
examples/15_plotting-scratchpad/.Rhistory
Normal file
7
examples/15_plotting-scratchpad/.Rhistory
Normal 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()
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user