$X \sim N(12, \sigma^2)$ and $P(3<X<15) = 0.3$. Find $\sigma$

69 Views Asked by At

$X \sim N(12, \sigma^2)$ and $P(3<X<15) = 0.3$. Find the standard deviation $\sigma$.

If the question was: find $P(9<X<15) = 0.3$, then this would be easy using the inverse normal function. But I don't see how to use the inverse normal function for $P(3<X<15)$. I'm fairly sure the value of $\sigma$ is unique. If I were to guess, I would say $\sigma \approx 15$ or $20$.

It's not a book question: it's a question I came up with. And I don't see how to do it without maths I'm not familiar with, but I may just be lacking imagination for how to solve this.

3

There are 3 best solutions below

1
On BEST ANSWER

You're solving the equation $$ \begin{aligned} 0.3 &= P\left( 3<X<15\right)\\ &=P\left(\frac{3-12}\sigma < \frac {X-12}\sigma<\frac{15-12}\sigma\right)\\ &=P\left(\frac{-9}\sigma<Z<\frac3\sigma\right)\\ &=\Phi\left(\frac3\sigma\right)-\Phi\left(\frac{-9}\sigma\right) \end{aligned} $$ for $\sigma$, where $\Phi$ denotes the distribution function for the standard normal. This has to be solved numerically. For example, you can use Newton's method $$ s_{\rm new} = s-\frac{f(s)}{f'(s)} $$ to solve $f(s)=0$ where $$ f(s):=\Phi\left(\frac3s\right)-\Phi\left(\frac{-9}s\right)-0.3 $$ with derivative $$ f'(s)=-\frac3{s^2}\phi\left(\frac3s\right)-\frac9{s^2}\phi\left(\frac{-9}s\right); $$ as usual $\phi$ denotes the standard normal density.

Here is an R script to carry out the iteration. The solution is approximately $s=15$, as you've guessed.

f <- function(s) pnorm(3/s) - pnorm(-9/s) - 0.3
df <- function(s) (-3 * dnorm(3/s) -9 * dnorm(-9/s)) / (s*s)

s <- 10
for (i in 1:10)
{
    print(s)
    s <- s - f(s) / df(s)
}

with output

[1] 10
[1] 13.78225
[1] 15.14899
[1] 15.27338
[1] 15.27428
[1] 15.27428
[1] 15.27428
[1] 15.27428
[1] 15.27428
[1] 15.27428
0
On

It can be shown that for random variable $X \sim N(\mu,\sigma^2)$

$$P(a < X < b)= \frac{1}{2} \left[\text{Erf} \left( \frac{b - \mu}{\sigma \sqrt 2} \right) - \text{Erf} \left( \frac{a - \mu}{\sigma \sqrt 2} \right) \right]. $$ Then it is just a classic root finding problem.

2
On

This is one case where we can do much without numerical methods.

For the normal distribution, you are looging for the zero of function $$f(\sigma)=\Phi\left(\frac3\sigma\right)-\Phi\left(-\frac{9}\sigma\right)-\frac 3{10}$$ Using the error function, this means $$f(\sigma)=\frac{1}{2} \text{erf}\left(\frac{3}{\sqrt{2} \sigma}\right)+\frac{1}{2} \text{erf}\left(\frac{9}{\sqrt{2} \sigma}\right)-\frac{3}{10}$$ Let $\sigma=\frac{3}{x\sqrt{2} }$ and, after simplication, we need to find the root of $$g(x)=5 \,\text{erf}(x)+5\, \text{erf}(3 x)-3$$ Using Taylor expansions around $x=0$, ths gives $$g(x)=-3+\frac{40 }{\sqrt{\pi }}x-\frac{280 }{3 \sqrt{\pi }}x^3+\frac{244 }{\sqrt{\pi }}x^5+O\left(x^7\right)$$

Using now series reversion $$x=t+\frac{7}{3} t^3+\frac{307 }{30}t^5+O\left(t^7\right) \quad \text{where} \quad t=\frac{\sqrt{\pi }}{40}\,\, (g(x)+3)$$ Making $g(x)=0$ as desired, this gives as an estimate $$x=0.13884 \implies \sigma=15.2789$$ which is not too bad.