Overflow and underflow of a probability value

732 Views Asked by At

I am evaluating the probability that the minimum of a process is a above a a barrier $\log(H)$. The probability is given by $$P_i=1-\exp\left(-2\frac{(\log(H)-x)(\log(H)-x_b)}{\tau\sigma^2}\right).$$ So $x,x_b$ are the two end point value for the interval of length $\tau$.

The problem is that $P_i$ may negative during a simulation in which $x,x_b,\tau$ change which doesn't make sense. How can this calculated to avoid this problem?

1

There are 1 best solutions below

0
On

Your problem is that the exponential can become greater than $1$, which happens when the argument is greater than $0$. As long as both $x, x_b \gt \log H$ you don't have a problem. The problem is when one of them is less than $\log H$, which shouldn't happen if that is a barrier. Maybe it is roundoff error in assessing the barrier?