Numerically stable algorithm to find most likely

26 Views Asked by At

I have $N$ Normal random variables $x_i$, each one with mean and variance $\mu_i$, $\sigma^2_i$. Given a value $L$, is there a numerically stable way to compute which of those has the higher probability of being higher than $L$? More formally, I want to find $k$ such that

$k = \arg\max_{i} P(x_i > L | \mu_i, \sigma^2_i)$

What I'm doing now is computing, for each $x_i$, the cumulative distribution -the probability of $x_i < L$- but if $L$ is high enough the computation of the cdf returns 0 due to loss of precision. What I ideally would like to have is a way to tell which $x_i$ has the highest probability of being higher than L without actually computing that probability (since I'm not interested in it).