# cdf ratio and mean estimation

• Nov 24th 2008, 02:25 AM
Simo
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
$\displaystyle \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 $\displaystyle k$, the variance $\displaystyle \sigma ^{2}$ and the point $\displaystyle \bar{X}$ is fixed. i need to find the mean of the distribution $\displaystyle \mu$ that achieve the ratio of $\displaystyle k$ between the two portion of area.

• Nov 24th 2008, 03:03 AM
David24
Quote:

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
$\displaystyle \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 $\displaystyle k$, the variance $\displaystyle \sigma ^{2}$ and the point $\displaystyle \bar{X}$ is fixed. i need to find the mean of the distribution $\displaystyle \mu$ that achieve the ratio of $\displaystyle k$ between the two portion of area.

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
• Nov 24th 2008, 04:01 AM
Simo
David,
my problem is in the form

$\displaystyle \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 $\displaystyle \mu$. I already know $\displaystyle k$ and $\displaystyle \bar{X}$.
• Nov 24th 2008, 04:18 AM
David24
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
• Nov 24th 2008, 04:26 AM
Simo
you are right...
typo and cut-&-past error!

the correct equation is

$\displaystyle \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!
• Nov 24th 2008, 05:56 AM
Simo
solved
I have already solved the problem...
thanks!
• Nov 24th 2008, 06:39 AM
David24
how did you get it out?

Regards,

David
• Nov 24th 2008, 07:06 AM
Simo
actually...solving the integral equation...

$\displaystyle \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
$\displaystyle y=\frac{x-\mu }{\sigma \sqrt{2}}$

the former become
$\displaystyle \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

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

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

$\displaystyle \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
• Nov 24th 2008, 07:24 AM
David24
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?
• Nov 24th 2008, 07:33 AM
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
• Nov 24th 2008, 07:52 AM
David24
Quote:

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
• Nov 24th 2008, 08:07 AM
Simo
doh...(Thinking)
$\displaystyle \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$
$\displaystyle \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$