# Math Help - cdf ratio and mean estimation

1. ## cdf ratio and mean estimation

Dear all,
I need to know if is it possible to find the mean of a normal distribution knowing the ratio of the area under the "bell" curve on the left and on the right of a given point.
To be more precise I need to solve the following equation
$\frac{1}{\sigma \sqrt{2\pi }}\int_{x=\bar{X}}^{+\infty }\exp \left( \frac{\left( x-\mu \right) ^{2}}{2\sigma ^{2}}\right) dx=\frac{k}{\sigma \sqrt{2\pi }}\int_{x=-\infty}^{\bar{X} }\exp \left( \frac{\left( x-\mu \right) ^{2}}{2\sigma ^{2}}\right) dx$
where I know the ratio $k$, the variance $\sigma ^{2}$ and the point $\bar{X}$ is fixed. i need to find the mean of the distribution $\mu$ that achieve the ratio of $k$ between the two portion of area.

thanks in advance.

2. Originally Posted by Simo
Dear all,
I need to know if is it possible to find the mean of a normal distribution knowing the ratio of the area under the "bell" curve on the left and on the right of a given point.
To be more precise I need to solve the following equation
$\frac{1}{\sigma \sqrt{2\pi }}\int_{x=\bar{X}}^{+\infty }\exp \left( \frac{\left( x-\mu \right) ^{2}}{2\sigma ^{2}}\right) dx=\frac{k}{\sigma \sqrt{2\pi }}\int_{x=-\infty}^{\bar{X} }\exp \left( \frac{\left( x-\mu \right) ^{2}}{2\sigma ^{2}}\right) dx$
where I know the ratio $k$, the variance $\sigma ^{2}$ and the point $\bar{X}$ is fixed. i need to find the mean of the distribution $\mu$ that achieve the ratio of $k$ between the two portion of area.

thanks in advance.
hey mate, just so Im reading your your question correctly, you have an integral equation of the form

int(f(x)) = k*inf(g(x)) and you want to solve for k?

Regards,

David

3. David,
my problem is in the form

$\int_{x=\bar{X}}^{+\infty }f(\mu,x) dx=k\int_{x=-\infty}^{\bar{X} }f(\mu,x) dx$

and I want to solve it for $\mu$. I already know $k$ and $\bar{X}$.

4. Hey Simo,

are you sure the integrand in both integrals is exp( ( (x - mu)/(sqrt(2)*sigma) )^2 ), should it be exp( - ( (x - mu)/(sqrt(2)*sigma) )^2 ) ?

Cheers,

David

5. you are right...
typo and cut-&-past error!

the correct equation is

$\frac{1}{\sigma \sqrt{2\pi }}\int_{x=\bar{X}}^{+\infty }\exp \left( -\frac{\left( x-\mu \right) ^{2}}{2\sigma ^{2}}\right) dx=\frac{k}{\sigma \sqrt{2\pi }}\int_{x=-\infty}^{\bar{X} }\exp \left( -\frac{\left( x-\mu \right) ^{2}}{2\sigma ^{2}}\right) dx$

of course, it is the pdf of a normal distribution.
sorry!

6. ## solved

I have already solved the problem...
thanks!

7. how did you get it out?

Regards,

David

8. actually...solving the integral equation...

$\frac{1}{\sigma \sqrt{2\pi }}\int_{x=\bar{X}}^{+\infty }\exp \left( -\frac{\left( x-\mu \right) ^{2}}{2\sigma ^{2}}\right) dx=\frac{K}{\sigma \sqrt{2\pi }}\int_{-\infty }^{x=\bar{X}}\exp \left( -\frac{\left( x-\mu \right)
^{2}}{2\sigma ^{2}}\right) dx$

with the new variable
$y=\frac{x-\mu }{\sigma \sqrt{2}}$

the former become
$\int_{y=-\infty }^{\frac{\bar{X}-\mu }{\sigma \sqrt{2}}}\exp
(-y^{2})dy=K\int_{y=\frac{\bar{X}-\mu }{\sigma \sqrt{2}}}^{+\infty }\exp(-y^{2})dy$

(note that in the previous the constant terms that appear on both sides are omitted)
solving the integrals become

${erf}(\frac{\bar{X}-\mu }{\sigma \sqrt{2}})-(-1)=K\left( (+1)-{erf}(\frac{\bar{X}-\mu }{\sigma \sqrt{2}})\right)$

${erf}(\frac{\bar{X}-\mu }{\sigma \sqrt{2}})=\frac{K-1}{K+1}$

$\mu =\bar{X}-{erf}^{-1}\left( \frac{K-1}{K+1}\right) \sigma \sqrt{2}$

at the end, it was quite straightforward.
i've tested it numerically...works.

regards
simo

9. hey mate,

exact solution I had, however I was trying to find an analytical expression for inv_erf(x), do you think it exists? I'm gonna keep working at it!

great problem through, I'm consider a Laplace transform technique... hopefully it will point me in the right direction

i.e. you have

erf( (x-mu/(sqrt(2)*sigma) ) = (K- 1)/(K + 1)

this is obviously an integral equation which when utilising Laplace (or Fourier transforms) may yield an analytical solution.

Cheers again for the problem, really enjoyed working on it!

David

ps - I do have one discrepency with you solution,

I have erf(...) = (1-K)/(1+K)

on your second line, are you sure you have the K on the correct side?

10. to the best of my knowledge, there is no closed form for the inverse error function. i've look in some texts but the only representation was the same you can find in wikipedia
Error function - Wikipedia, the free encyclopedia
...a series expansion...

at the moment, for my work it's fine, but if you go ahead with the work...good luck1

11. Originally Posted by Simo
to the best of my knowledge, there is no closed form for the inverse error function. i've look in some texts but the only representation was the same you can find in wikipedia
Error function - Wikipedia, the free encyclopedia
...a series expansion...

at the moment, for my work it's fine, but if you go ahead with the work...good luck1
Cool no worries, Ive played around with it a bit and Ive gotten to the point of not caring, just one other thing are you sure about the K-1 as opposed to 1-K? following your original problem and your solution I think you may have the K on the wrong side of the equation (line after 'introduce new variable (x-mu)/(sqrt(2)*sigma)

I hope you dont take offence, Ive just played with the algebra a few times and always end up with 1 - K.

Keep posts like this coming!

Regards,

David

12. doh...
ok, I've made another mistake...
the equation that I've actually solved is

$\frac{1}{\sigma \sqrt{2\pi }}\int_{-\infty }^{x=\bar{X}}\exp \left( -\frac{\left( x-\mu \right)^{2}}{2\sigma ^{2}}\right) dx = \frac{K}{\sigma \sqrt{2\pi }}\int_{x=\bar{X}}^{+\infty }\exp \left( -\frac{\left( x-\mu \right) ^{2}}{2\sigma ^{2}}\right) dx
$

instead of

$\frac{1}{\sigma \sqrt{2\pi }}\int_{x=\bar{X}}^{+\infty }\exp \left( -\frac{\left( x-\mu \right) ^{2}}{2\sigma ^{2}}\right) dx=\frac{K}{\sigma \sqrt{2\pi }}\int_{-\infty }^{x=\bar{X}}\exp \left( -\frac{\left( x-\mu \right)
^{2}}{2\sigma ^{2}}\right) dx$

that was the first one posted and pasted in the post with the scratch of the solution...I've switched the integrals

sorry