1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.math.distribution;
17
18 import org.apache.commons.math.MathException;
19
20 /**
21 * Interface representing the Poisson Distribution.
22 *
23 * <p>
24 * References:
25 * <ul>
26 * <li><a href="http://mathworld.wolfram.com/PoissonDistribution.html">
27 * Poisson distribution</a></li>
28 * </ul>
29 * </p>
30 *
31 * @version $Revision: 155427 $ $Date: 2005-02-26 06:11:52 -0700 (Sat, 26 Feb 2005) $
32 */
33 public interface PoissonDistribution extends IntegerDistribution {
34
35 /**
36 * Get the mean for the distribution.
37 *
38 * @return the mean for the distribution.
39 */
40 public double getMean();
41
42 /**
43 * Set the mean for the distribution.
44 * The parameter value must be positive; otherwise an
45 * <code>IllegalArgument</code> is thrown.
46 *
47 * @param p the mean
48 * @throws IllegalArgumentException if p ≤ 0
49 */
50 public void setMean(double p);
51
52 /**
53 * Calculates the Poisson distribution function using a normal approximation.
54 *
55 * @param x the upper bound, inclusive
56 * @return the distribution function value calculated using a normal approximation
57 * @throws MathException if an error occurs computing the normal approximation
58 */
59 public double normalApproximateProbability(int x) throws MathException;
60 }