# Gaussian random variable(GRV)

$X$ is a Gaussian random variable $N(2,2)$. Also given are values x1=1 and $x=3. i. Write a program to calculate the probability Pr(x1 ≤ X ≤ x2). ii. Write a program to calculate the probability Pr(|X – x1|≤ x2/2). - What have you tried? – Alexander Gruber Feb 24 '13 at 21:50${\bf Hint}\$:- Covert X to standard normal by subtracting Mean from X and by dividing with standard deviation of X. Then use the Standard Normal table to solve it. –  Gold Feb 25 '13 at 12:11
What language is this supposed to be in? –  Chris Mar 2 '13 at 2:18
We need to create in SCILAB –  user63827 Mar 25 '13 at 0:36
add comment

## 1 Answer

The answer depends on what the question is trying to motivate but:

Hint:

\begin{align} f(x)&=\dfrac{1}{\sigma \sqrt{2\pi}}\exp \left( -\dfrac{(x-\mu)^2}{2\sigma^2}\right)\\ P(x_1\leq X\leq x_2)&= \int_{x_1}^{x_2} f(x)\\ P(|X-x_1|\leq\dfrac{x_2}{2}) &= P(x_1-\dfrac{x_2}{2}\leq X\leq x_1+\dfrac{x_2}{2}) \end{align}

-
We have to use SCILAB.Please suggest. –  user63827 Mar 23 '13 at 20:17
add comment