Computes the inverse Cumulative Density Function (CDF -1 ) at the given point. It takes in a value in the range of [0, 1] and returns the value x, such that CDF(x) = p @param p the probability value @return the value such that the CDF would return p
(double p)
| 51 | * @return the value such that the CDF would return <tt>p</tt> |
| 52 | */ |
| 53 | public double invCdf(double p) |
| 54 | { |
| 55 | return invCdf(p, new FunctionBase() |
| 56 | { |
| 57 | @Override |
| 58 | public double f(Vec x) |
| 59 | { |
| 60 | return cdf(x.get(0)); |
| 61 | } |
| 62 | }); |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * This method is provided as a quick helper function, as any CDF has a 1 to |