Probability of the temperature lying in-between $281K$ and $291K$ for a certain distribution

472 Views Asked by At

Using the following PDF with values of:
enter image description here

The following graph can be formed:
PDF on a histogram graph

The minimum and maximum values are:
minimum = $243.483K$ maximum = $308.05K$

How can I calculate the probability of the temperature lying in-between the values $281K$ and $291K$?

1

There are 1 best solutions below

6
On BEST ANSWER

The given PDF is a composition of two normal distribution functions (Gaussians). For any continuous PDF $f_X(x)$, it is true that the probability that $X\leq x$ is $$ P(X \leq x) = \int_{-\infty}^x f_X(t)\, dt $$ or the CDF. In particular, a normal distribution has the form $$ f_{X|\mu, \sigma}(x) = \frac{1}{\sqrt{2\pi \sigma^2}} e^{-\frac{(x-\mu)^2}{2\sigma^2}} $$ with parameters $\mu$ and $\sigma^2$. In this case, it can be shown that the CDF of this type of function is $$ \tag{1} \int_{-\infty}^x \frac{1}{\sqrt{2\pi \sigma^2}} e^{-\frac{(t-\mu)^2}{2\sigma^2}} \, dt = \Phi \left(\frac{x-\mu}{\sigma} \right) $$ where $\Phi$ is the CFD of the standard normal. $\Phi$ is a special function that can be accessed with a math library or a graphing calculator.

Now we can focus on the problem at hand. We are given a PDF that is the sum of two Gaussians like so $$ P_X(x) = \frac{1}{2} f_{X|\mu_1, \sigma_1}(x) + \frac{1}{2} f_{X|\mu_2, \sigma_2}(x) $$ and we want to calculate the probability that $X$ is between $x_{\text{min}}$ and $x_{\text{max}}$. Clearly, this is equal to $$ \begin{split} P(x_{\text{min}} \leq X \leq x_{\text{max}}) &= \int_{x_{\text{min}}}^{x_{\text{max}}} \left(\frac{1}{2} f_{X|\mu_1, \sigma_1}(x) + \frac{1}{2} f_{X|\mu_2, \sigma_2}(x) \right)\, dx\\ &= \frac{1}{2}\int_{x_{\text{min}}}^{x_{\text{max}}} f_{X|\mu_1, \sigma_1}(x) \, dx + \frac{1}{2}\int_{x_{\text{min}}}^{x_{\text{max}}} f_{X|\mu_2, \sigma_2}(x) \, dx \end{split} \\ = \frac{1}{2} \left[\int_{-\infty}^{x_{\text{max}}} f_{X|\mu_1, \sigma_1}(x) \, dx - \int_{-\infty}^{x_{\text{min}}} f_{X|\mu_1, \sigma_1}(x) \, dx \right] \\ + \frac{1}{2} \left[\int_{-\infty}^{x_{\text{max}}} f_{X|\mu_2, \sigma_2}(x) \, dx - \int_{-\infty}^{x_{\text{min}}} f_{X|\mu_2, \sigma_2}(x) \, dx \right] $$ Now you need only to substitute the result in Equation (1) to this and calculate the values with the $\Phi$-function: $$ P(x_{\text{min}} \leq X \leq x_{\text{max}}) =\\ \frac{1}{2}\left[ \Phi\left( \frac{x_{\max} - \mu_1}{\sigma_1}\right) - \Phi\left( \frac{x_{\min} - \mu_1}{\sigma_1}\right) \right] \\ + \frac{1}{2}\left[ \Phi\left( \frac{x_{\max} - \mu_2}{\sigma_2}\right) - \Phi\left( \frac{x_{\min} - \mu_2}{\sigma_2}\right) \right] $$