You can use the error function available in , as discussed here and here . org.apache.commons.math.special.Erf
: , @Brent Worden answer, . , examples, . , cumulativeProbability(), Erf.erf. , inverseCumulativeProbability() .
import org.apache.commons.math.MathException;
import org.apache.commons.math.distribution.NormalDistribution;
import org.apache.commons.math.distribution.NormalDistributionImpl;
public class CumulativeProbability {
private static NormalDistribution d;
public static void main(String[] args) throws MathException {
d = new NormalDistributionImpl(1000, 100);
System.out.println(d.cumulativeProbability(1200));
d = new NormalDistributionImpl(50, 10);
System.out.println(d.inverseCumulativeProbability(0.9));
}
}
:
0.9772498680518208
62.81551565546365
:
1. , , 1000 100 , ~ 97,7% 1200 .
2. , , 50 10 , 90% 63 .