Fixed 95->90

Value: [1e-4 to 3e-3]
This commit is contained in:
Quinn Dougherty 2022-04-27 16:51:23 -04:00
parent 98bc2ddd58
commit 6bd8aecb31
3 changed files with 6 additions and 7 deletions

View File

@ -22,7 +22,7 @@ argument allows you to pass an environment previously created by another `run`
call. Passing this environment will mean that all previously declared variables call. Passing this environment will mean that all previously declared variables
in the previous environment will be made available. in the previous environment will be made available.
The return type of `run` is a bit complicated, and comes from auto generated js The return type of `run` is a bit complicated, and comes from auto generated `js`
code that comes from rescript. We highly recommend using typescript when using code that comes from rescript. We highly recommend using typescript when using
this library to help navigate the return type. this library to help navigate the return type.

View File

@ -1,8 +1,9 @@
--- ---
title: Processing Confidence Intervals title: Processing Confidence Intervals
author: Nuño Sempere
--- ---
This page explains what we are doing when we take a 95% confidence interval, and we get a mean and a standard deviation from it. This page explains what we are doing when we take a 90% confidence interval, and we get a mean and a standard deviation from it.
## For normals ## For normals
@ -21,13 +22,10 @@ module Normal = {
We know that for a normal with mean $\mu$ and standard deviation $\sigma$, We know that for a normal with mean $\mu$ and standard deviation $\sigma$,
$$ $$
a \cdot Normal(\mu, \sigma) = Normal(a \cdot \mu, |a| \cdot \sigma)
a \cdot Normal(\mu, \sigma) = Normal(a\cdot \mu, |a|\cdot \sigma)
$$ $$
We can now look at the inverse cdf of a $Normal(0,1)$. We find that the 95% point is reached at $1.6448536269514722$. ([source](https://stackoverflow.com/questions/20626994/how-to-calculate-the-inverse-of-the-normal-cumulative-distribution-function-in-p)) This means that the 90% confidence interval is $[-1.6448536269514722, 1.6448536269514722]$, which has a width of $2 \cdot 1.6448536269514722$. We can now look at the inverse cdf of a $Normal(0,1)$. We find that the 90% point is reached at $1.6448536269514722$. ([source](https://stackoverflow.com/questions/20626994/how-to-calculate-the-inverse-of-the-normal-cumulative-distribution-function-in-p)) This means that the 90% confidence interval is $[-1.6448536269514722, 1.6448536269514722]$, which has a width of $2 \cdot 1.6448536269514722$.
So then, if we take a $Normal(0,1)$ and we multiply it by $\frac{(high -. low)}{(2. *. 1.6448536269514722)}$, it's 90% confidence interval will be multiplied by the same amount. Then we just have to shift it by the mean to get our target normal. So then, if we take a $Normal(0,1)$ and we multiply it by $\frac{(high -. low)}{(2. *. 1.6448536269514722)}$, it's 90% confidence interval will be multiplied by the same amount. Then we just have to shift it by the mean to get our target normal.

View File

@ -13,3 +13,4 @@ Squiggle is an _estimation language_, and a syntax for _calculating and expressi
- [Squiggle functions source of truth](https://www.squiggle-language.com/docs/Features/Functions) - [Squiggle functions source of truth](https://www.squiggle-language.com/docs/Features/Functions)
- [Known bugs](https://www.squiggle-language.com/docs/Discussions/Bugs) - [Known bugs](https://www.squiggle-language.com/docs/Discussions/Bugs)
- [Original lesswrong sequence](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3) - [Original lesswrong sequence](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3)
- [Author your squiggle models as Observable notebooks](https://observablehq.com/@hazelfire/squiggle)