How do I solve the following equation for x
\newcommand{\erf}{\operatorname{erf}}\frac{1}{2}\left((f-1)\cdot\erf\left(\dfrac{c-x}{\sqrt2\,b}\right)-f\erf\left(\dfrac{r-x}{\sqrt2\,d}\right)\right)=y
I need this to solve this problem :
I have a distribution, built by the sum of two normal distributions, one multiplied by (1-f) and the other multiplied by f. The sum of both is multiplied by g. like this (where 0 \leq f < 1) :
\left(\frac{(1-f) e^{-\frac{1}{2} \left(\frac{x-c}{b}\right)^2}}{\sqrt{2 \pi } b}+\frac{f e^{-\frac{1}{2} \left(\frac{x-r}{d}\right)^2}}{\sqrt{2 \pi } d}\right)
I need to know the x where P(X < x) = y.
First equation is the cumulative distribution or I did a mistake somewhere?
Answer
If you must do this analytically then you need a convolution. I would not.
If your two normal distributions X_1\sim \mathcal N(a,b^2) and X_2\sim \mathcal N(c,d^2) are independent then an easier approach is to say fX_1\sim \mathcal N\left(fa,f^2 b^2\right) and (1-f)X_2\sim \mathcal N\left((1-f)c,(1-f)^2d^2\right) so X=fX_1+(1-f)X_2 \sim \mathcal N\left(fa+(1-f)c,f^2 b^2+(1-f)^2d^2\right) and given the mean and variance of X you can solve P(X\le x)=y in the usual way for a normal distribution.
No comments:
Post a Comment