aboutsummaryrefslogtreecommitdiff
path: root/commons-math3-3.6.1/docs/apidocs/org/apache/commons/math3/distribution/PoissonDistribution.html
blob: 379a44cb90ecc15e3a7906a2ab06999451c63992 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PoissonDistribution (Apache Commons Math 3.6.1 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="PoissonDistribution (Apache Commons Math 3.6.1 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PoissonDistribution.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/math3/distribution/PascalDistribution.html" title="class in org.apache.commons.math3.distribution"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/math3/distribution/RealDistribution.html" title="interface in org.apache.commons.math3.distribution"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/math3/distribution/PoissonDistribution.html" target="_top">Frames</a></li>
<li><a href="PoissonDistribution.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.math3.distribution</div>
<h2 title="Class PoissonDistribution" class="title">Class PoissonDistribution</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html" title="class in org.apache.commons.math3.distribution">org.apache.commons.math3.distribution.AbstractIntegerDistribution</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.math3.distribution.PoissonDistribution</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html" title="interface in org.apache.commons.math3.distribution">IntegerDistribution</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">PoissonDistribution</span>
extends <a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractIntegerDistribution</a></pre>
<div class="block">Implementation of the Poisson distribution.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="http://en.wikipedia.org/wiki/Poisson_distribution">Poisson distribution (Wikipedia)</a>, 
<a href="http://mathworld.wolfram.com/PoissonDistribution.html">Poisson distribution (MathWorld)</a>, 
<a href="../../../../../serialized-form.html#org.apache.commons.math3.distribution.PoissonDistribution">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#DEFAULT_EPSILON">DEFAULT_EPSILON</a></strong></code>
<div class="block">Default convergence criterion.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#DEFAULT_MAX_ITERATIONS">DEFAULT_MAX_ITERATIONS</a></strong></code>
<div class="block">Default maximum number of iterations for cumulative probability calculations.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_org.apache.commons.math3.distribution.AbstractIntegerDistribution">
<!--   -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.commons.math3.distribution.<a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractIntegerDistribution</a></h3>
<code><a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#random">random</a>, <a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#randomData">randomData</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#PoissonDistribution(double)">PoissonDistribution</a></strong>(double&nbsp;p)</code>
<div class="block">Creates a new Poisson distribution with specified mean.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#PoissonDistribution(double,%20double)">PoissonDistribution</a></strong>(double&nbsp;p,
                   double&nbsp;epsilon)</code>
<div class="block">Creates a new Poisson distribution with the specified mean and
 convergence criterion.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#PoissonDistribution(double,%20double,%20int)">PoissonDistribution</a></strong>(double&nbsp;p,
                   double&nbsp;epsilon,
                   int&nbsp;maxIterations)</code>
<div class="block">Creates a new Poisson distribution with specified mean, convergence
 criterion and maximum number of iterations.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#PoissonDistribution(double,%20int)">PoissonDistribution</a></strong>(double&nbsp;p,
                   int&nbsp;maxIterations)</code>
<div class="block">Creates a new Poisson distribution with the specified mean and maximum
 number of iterations.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#PoissonDistribution(org.apache.commons.math3.random.RandomGenerator,%20double,%20double,%20int)">PoissonDistribution</a></strong>(<a href="../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</a>&nbsp;rng,
                   double&nbsp;p,
                   double&nbsp;epsilon,
                   int&nbsp;maxIterations)</code>
<div class="block">Creates a new Poisson distribution with specified mean, convergence
 criterion and maximum number of iterations.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#cumulativeProbability(int)">cumulativeProbability</a></strong>(int&nbsp;x)</code>
<div class="block">For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X &lt;= x)</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#getMean()">getMean</a></strong>()</code>
<div class="block">Get the mean for the distribution.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#getNumericalMean()">getNumericalMean</a></strong>()</code>
<div class="block">Use this method to get the numerical value of the mean of this
 distribution.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#getNumericalVariance()">getNumericalVariance</a></strong>()</code>
<div class="block">Use this method to get the numerical value of the variance of this
 distribution.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#getSupportLowerBound()">getSupportLowerBound</a></strong>()</code>
<div class="block">Access the lower bound of the support.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#getSupportUpperBound()">getSupportUpperBound</a></strong>()</code>
<div class="block">Access the upper bound of the support.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#isSupportConnected()">isSupportConnected</a></strong>()</code>
<div class="block">Use this method to get information about whether the support is
 connected, i.e.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#logProbability(int)">logProbability</a></strong>(int&nbsp;x)</code>
<div class="block">For a random variable <code>X</code> whose values are distributed according to
 this distribution, this method returns <code>log(P(X = x))</code>, where
 <code>log</code> is the natural logarithm.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#normalApproximateProbability(int)">normalApproximateProbability</a></strong>(int&nbsp;x)</code>
<div class="block">Calculates the Poisson distribution function using a normal
 approximation.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#probability(int)">probability</a></strong>(int&nbsp;x)</code>
<div class="block">For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X = x)</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#sample()">sample</a></strong>()</code>
<div class="block">Generate a random value sampled from this distribution.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.math3.distribution.AbstractIntegerDistribution">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.commons.math3.distribution.<a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractIntegerDistribution</a></h3>
<code><a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#cumulativeProbability(int,%20int)">cumulativeProbability</a>, <a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#inverseCumulativeProbability(double)">inverseCumulativeProbability</a>, <a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#reseedRandomGenerator(long)">reseedRandomGenerator</a>, <a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#sample(int)">sample</a>, <a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#solveInverseCumulativeProbability(double,%20int,%20int)">solveInverseCumulativeProbability</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_MAX_ITERATIONS">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MAX_ITERATIONS</h4>
<pre>public static final&nbsp;int DEFAULT_MAX_ITERATIONS</pre>
<div class="block">Default maximum number of iterations for cumulative probability calculations.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.math3.distribution.PoissonDistribution.DEFAULT_MAX_ITERATIONS">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_EPSILON">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_EPSILON</h4>
<pre>public static final&nbsp;double DEFAULT_EPSILON</pre>
<div class="block">Default convergence criterion.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.commons.math3.distribution.PoissonDistribution.DEFAULT_EPSILON">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="PoissonDistribution(double)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PoissonDistribution</h4>
<pre>public&nbsp;PoissonDistribution(double&nbsp;p)
                    throws <a href="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</a></pre>
<div class="block">Creates a new Poisson distribution with specified mean.
 <p>
 <b>Note:</b> this constructor will implicitly create an instance of
 <a href="../../../../../org/apache/commons/math3/random/Well19937c.html" title="class in org.apache.commons.math3.random"><code>Well19937c</code></a> as random generator to be used for sampling only (see
 <a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#sample()"><code>sample()</code></a> and <a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#sample(int)"><code>AbstractIntegerDistribution.sample(int)</code></a>). In case no sampling is
 needed for the created distribution, it is advised to pass <code>null</code>
 as random generator via the appropriate constructors to avoid the
 additional initialisation overhead.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - the Poisson mean</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</a></code> - if <code>p &lt;= 0</code>.</dd></dl>
</li>
</ul>
<a name="PoissonDistribution(double, double, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PoissonDistribution</h4>
<pre>public&nbsp;PoissonDistribution(double&nbsp;p,
                   double&nbsp;epsilon,
                   int&nbsp;maxIterations)
                    throws <a href="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</a></pre>
<div class="block">Creates a new Poisson distribution with specified mean, convergence
 criterion and maximum number of iterations.
 <p>
 <b>Note:</b> this constructor will implicitly create an instance of
 <a href="../../../../../org/apache/commons/math3/random/Well19937c.html" title="class in org.apache.commons.math3.random"><code>Well19937c</code></a> as random generator to be used for sampling only (see
 <a href="../../../../../org/apache/commons/math3/distribution/PoissonDistribution.html#sample()"><code>sample()</code></a> and <a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#sample(int)"><code>AbstractIntegerDistribution.sample(int)</code></a>). In case no sampling is
 needed for the created distribution, it is advised to pass <code>null</code>
 as random generator via the appropriate constructors to avoid the
 additional initialisation overhead.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - Poisson mean.</dd><dd><code>epsilon</code> - Convergence criterion for cumulative probabilities.</dd><dd><code>maxIterations</code> - the maximum number of iterations for cumulative
 probabilities.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</a></code> - if <code>p &lt;= 0</code>.</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd></dl>
</li>
</ul>
<a name="PoissonDistribution(org.apache.commons.math3.random.RandomGenerator, double, double, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PoissonDistribution</h4>
<pre>public&nbsp;PoissonDistribution(<a href="../../../../../org/apache/commons/math3/random/RandomGenerator.html" title="interface in org.apache.commons.math3.random">RandomGenerator</a>&nbsp;rng,
                   double&nbsp;p,
                   double&nbsp;epsilon,
                   int&nbsp;maxIterations)
                    throws <a href="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</a></pre>
<div class="block">Creates a new Poisson distribution with specified mean, convergence
 criterion and maximum number of iterations.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>rng</code> - Random number generator.</dd><dd><code>p</code> - Poisson mean.</dd><dd><code>epsilon</code> - Convergence criterion for cumulative probabilities.</dd><dd><code>maxIterations</code> - the maximum number of iterations for cumulative
 probabilities.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</a></code> - if <code>p &lt;= 0</code>.</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.1</dd></dl>
</li>
</ul>
<a name="PoissonDistribution(double, double)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PoissonDistribution</h4>
<pre>public&nbsp;PoissonDistribution(double&nbsp;p,
                   double&nbsp;epsilon)
                    throws <a href="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</a></pre>
<div class="block">Creates a new Poisson distribution with the specified mean and
 convergence criterion.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - Poisson mean.</dd><dd><code>epsilon</code> - Convergence criterion for cumulative probabilities.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/exception/NotStrictlyPositiveException.html" title="class in org.apache.commons.math3.exception">NotStrictlyPositiveException</a></code> - if <code>p &lt;= 0</code>.</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd></dl>
</li>
</ul>
<a name="PoissonDistribution(double, int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PoissonDistribution</h4>
<pre>public&nbsp;PoissonDistribution(double&nbsp;p,
                   int&nbsp;maxIterations)</pre>
<div class="block">Creates a new Poisson distribution with the specified mean and maximum
 number of iterations.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - Poisson mean.</dd><dd><code>maxIterations</code> - Maximum number of iterations for cumulative
 probabilities.</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="getMean()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMean</h4>
<pre>public&nbsp;double&nbsp;getMean()</pre>
<div class="block">Get the mean for the distribution.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the mean for the distribution.</dd></dl>
</li>
</ul>
<a name="probability(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>probability</h4>
<pre>public&nbsp;double&nbsp;probability(int&nbsp;x)</pre>
<div class="block">For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X = x)</code>. In other
 words, this method represents the probability mass function (PMF)
 for the distribution.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>x</code> - the point at which the PMF is evaluated</dd>
<dt><span class="strong">Returns:</span></dt><dd>the value of the probability mass function at <code>x</code></dd></dl>
</li>
</ul>
<a name="logProbability(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logProbability</h4>
<pre>public&nbsp;double&nbsp;logProbability(int&nbsp;x)</pre>
<div class="block">For a random variable <code>X</code> whose values are distributed according to
 this distribution, this method returns <code>log(P(X = x))</code>, where
 <code>log</code> is the natural logarithm. In other words, this method
 represents the logarithm of the probability mass function (PMF) for the
 distribution. Note that due to the floating point precision and
 under/overflow issues, this method will for some distributions be more
 precise and faster than computing the logarithm of
 <a href="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#probability(int)"><code>IntegerDistribution.probability(int)</code></a>.
 <p>
 The default implementation simply computes the logarithm of <code>probability(x)</code>.</p></div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#logProbability(int)">logProbability</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractIntegerDistribution</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>x</code> - the point at which the PMF is evaluated</dd>
<dt><span class="strong">Returns:</span></dt><dd>the logarithm of the value of the probability mass function at <code>x</code></dd></dl>
</li>
</ul>
<a name="cumulativeProbability(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cumulativeProbability</h4>
<pre>public&nbsp;double&nbsp;cumulativeProbability(int&nbsp;x)</pre>
<div class="block">For a random variable <code>X</code> whose values are distributed according
 to this distribution, this method returns <code>P(X &lt;= x)</code>.  In other
 words, this method represents the (cumulative) distribution function
 (CDF) for this distribution.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>x</code> - the point at which the CDF is evaluated</dd>
<dt><span class="strong">Returns:</span></dt><dd>the probability that a random variable with this
 distribution takes a value less than or equal to <code>x</code></dd></dl>
</li>
</ul>
<a name="normalApproximateProbability(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>normalApproximateProbability</h4>
<pre>public&nbsp;double&nbsp;normalApproximateProbability(int&nbsp;x)</pre>
<div class="block">Calculates the Poisson distribution function using a normal
 approximation. The <code>N(mean, sqrt(mean))</code> distribution is used
 to approximate the Poisson distribution. The computation uses
 "half-correction" (evaluating the normal distribution function at
 <code>x + 0.5</code>).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>x</code> - Upper bound, inclusive.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the distribution function value calculated using a normal
 approximation.</dd></dl>
</li>
</ul>
<a name="getNumericalMean()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumericalMean</h4>
<pre>public&nbsp;double&nbsp;getNumericalMean()</pre>
<div class="block">Use this method to get the numerical value of the mean of this
 distribution.

 For mean parameter <code>p</code>, the mean is <code>p</code>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the mean or <code>Double.NaN</code> if it is not defined</dd></dl>
</li>
</ul>
<a name="getNumericalVariance()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumericalVariance</h4>
<pre>public&nbsp;double&nbsp;getNumericalVariance()</pre>
<div class="block">Use this method to get the numerical value of the variance of this
 distribution.

 For mean parameter <code>p</code>, the variance is <code>p</code>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the variance (possibly <code>Double.POSITIVE_INFINITY</code> or
 <code>Double.NaN</code> if it is not defined)</dd></dl>
</li>
</ul>
<a name="getSupportLowerBound()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSupportLowerBound</h4>
<pre>public&nbsp;int&nbsp;getSupportLowerBound()</pre>
<div class="block">Access the lower bound of the support. This method must return the same
 value as <code>inverseCumulativeProbability(0)</code>. In other words, this
 method must return
 <p><code>inf {x in Z | P(X <= x) > 0}</code>.</p>

 The lower bound of the support is always 0 no matter the mean parameter.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>lower bound of the support (always 0)</dd></dl>
</li>
</ul>
<a name="getSupportUpperBound()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSupportUpperBound</h4>
<pre>public&nbsp;int&nbsp;getSupportUpperBound()</pre>
<div class="block">Access the upper bound of the support. This method must return the same
 value as <code>inverseCumulativeProbability(1)</code>. In other words, this
 method must return
 <p><code>inf {x in R | P(X <= x) = 1}</code>.</p>

 The upper bound of the support is positive infinity,
 regardless of the parameter values. There is no integer infinity,
 so this method returns <code>Integer.MAX_VALUE</code>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>upper bound of the support (always <code>Integer.MAX_VALUE</code> for
 positive infinity)</dd></dl>
</li>
</ul>
<a name="isSupportConnected()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSupportConnected</h4>
<pre>public&nbsp;boolean&nbsp;isSupportConnected()</pre>
<div class="block">Use this method to get information about whether the support is
 connected, i.e. whether all integers between the lower and upper bound of
 the support are included in the support.

 The support of this distribution is connected.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code></dd></dl>
</li>
</ul>
<a name="sample()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>sample</h4>
<pre>public&nbsp;int&nbsp;sample()</pre>
<div class="block">Generate a random value sampled from this distribution.

 The default implementation uses the
 <a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling">
 inversion method</a>.
 <p>
 <strong>Algorithm Description</strong>:
 <ul>
  <li>For small means, uses simulation of a Poisson process
   using Uniform deviates, as described
   <a href="http://mathaa.epfl.ch/cours/PMMI2001/interactive/rng7.htm"> here</a>.
   The Poisson process (and hence value returned) is bounded by 1000 * mean.
  </li>
  <li>For large means, uses the rejection algorithm described in
   <blockquote>
    Devroye, Luc. (1981).<i>The Computer Generation of Poisson Random Variables</i><br>
    <strong>Computing</strong> vol. 26 pp. 197-207.<br>
   </blockquote>
  </li>
 </ul>
 </p></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html#sample()">sample</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/math3/distribution/IntegerDistribution.html" title="interface in org.apache.commons.math3.distribution">IntegerDistribution</a></code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html#sample()">sample</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/math3/distribution/AbstractIntegerDistribution.html" title="class in org.apache.commons.math3.distribution">AbstractIntegerDistribution</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a random value.</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.2</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PoissonDistribution.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/math3/distribution/PascalDistribution.html" title="class in org.apache.commons.math3.distribution"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/math3/distribution/RealDistribution.html" title="interface in org.apache.commons.math3.distribution"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/math3/distribution/PoissonDistribution.html" target="_top">Frames</a></li>
<li><a href="PoissonDistribution.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2003&#x2013;2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>