You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2021/09/19 22:58:44 UTC

[commons-statistics] branch master updated (adb847a -> dda4ad9)

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-statistics.git.


    from adb847a  Add test for probability of success 1.0
     new 99be729  Correct density integrals test
     new dda4ad9  STATISTICS 9: Example application to evaluate distributions

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../ContinuousDistributionAbstractTest.java        |   8 +-
 .../LICENSE                                        |   0
 .../NOTICE                                         |   0
 README.md => commons-statistics-examples/README.md |  20 +-
 .../examples-distribution/HOWTO.md                 |  94 +++
 .../examples-distribution}/LICENSE                 |   0
 .../examples-distribution}/NOTICE                  |   0
 .../examples-distribution/README.md                |  18 +-
 .../examples-distribution/pom.xml                  | 105 ++++
 .../AbstractContinuousDistributionCommand.java     |  89 +++
 .../AbstractDiscreteDistributionCommand.java       |  89 +++
 .../distribution/AbstractDistributionCommand.java  |  26 +-
 .../examples/distribution/BetaCommand.java         | 144 +++++
 .../examples/distribution/BinomialCommand.java     | 147 +++++
 .../examples/distribution/CauchyCommand.java       | 144 +++++
 .../examples/distribution/ChiSquaredCommand.java   | 131 ++++
 .../ContinuousDistributionOptions.java             |  57 ++
 .../distribution/DiscreteDistributionOptions.java  |  52 ++
 .../examples/distribution/Distribution.java        |  56 ++
 .../distribution/DistributionFunction.java         |  20 +-
 .../examples/distribution/DistributionOptions.java |  54 ++
 .../examples/distribution/DistributionUtils.java   | 697 +++++++++++++++++++++
 .../distribution/DistributionsApplication.java     | 111 ++++
 .../examples/distribution/ExpCommand.java          | 130 ++++
 .../statistics/examples/distribution/FCommand.java | 144 +++++
 .../examples/distribution/GammaCommand.java        | 145 +++++
 .../examples/distribution/GeometricCommand.java    | 133 ++++
 .../examples/distribution/GumbelCommand.java       | 144 +++++
 .../distribution/HypergeometricCommand.java        | 158 +++++
 .../InverseContinuousDistributionOptions.java      |  13 +-
 .../InverseDiscreteDistributionOptions.java        |  52 ++
 .../examples/distribution/LaplaceCommand.java      | 144 +++++
 .../examples/distribution/LevyCommand.java         | 144 +++++
 .../examples/distribution/LogNormalCommand.java    | 145 +++++
 .../examples/distribution/LogisticCommand.java     | 144 +++++
 .../distribution/ManifestVersionProvider.java      |  81 +++
 .../examples/distribution/NakagamiCommand.java     | 144 +++++
 .../examples/distribution/NormalCommand.java       | 146 +++++
 .../examples/distribution/ParetoCommand.java       | 145 +++++
 .../examples/distribution/PascalCommand.java       | 150 +++++
 .../examples/distribution/PoissonCommand.java      | 133 ++++
 .../examples/distribution/StandardOptions.java     |  17 +-
 .../statistics/examples/distribution/TCommand.java | 130 ++++
 .../examples/distribution/TriangularCommand.java   | 157 +++++
 .../distribution/TruncatedNormalCommand.java       | 169 +++++
 .../distribution/UniformContinuousCommand.java     | 147 +++++
 .../distribution/UniformDiscreteCommand.java       | 148 +++++
 .../examples/distribution/WeibullCommand.java      | 145 +++++
 .../examples/distribution/ZipfCommand.java         | 146 +++++
 .../examples}/distribution/package-info.java       |  10 +-
 commons-statistics-examples/pom.xml                |  95 +++
 pom.xml                                            |  12 +
 stats.tgz                                          | Bin 0 -> 34299 bytes
 53 files changed, 5487 insertions(+), 46 deletions(-)
 copy {commons-statistics-regression => commons-statistics-examples}/LICENSE (100%)
 copy {commons-statistics-regression => commons-statistics-examples}/NOTICE (100%)
 copy README.md => commons-statistics-examples/README.md (83%)
 create mode 100644 commons-statistics-examples/examples-distribution/HOWTO.md
 copy {commons-statistics-regression => commons-statistics-examples/examples-distribution}/LICENSE (100%)
 copy {commons-statistics-regression => commons-statistics-examples/examples-distribution}/NOTICE (100%)
 copy README.md => commons-statistics-examples/examples-distribution/README.md (83%)
 create mode 100644 commons-statistics-examples/examples-distribution/pom.xml
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/AbstractContinuousDistributionCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/AbstractDiscreteDistributionCommand.java
 copy commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/package-info.java => commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/AbstractDistributionCommand.java (51%)
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/BetaCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/BinomialCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/CauchyCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ChiSquaredCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ContinuousDistributionOptions.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DiscreteDistributionOptions.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/Distribution.java
 copy commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/package-info.java => commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionFunction.java (59%)
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionOptions.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionUtils.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionsApplication.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ExpCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/FCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/GammaCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/GeometricCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/GumbelCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/HypergeometricCommand.java
 copy commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/package-info.java => commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/InverseContinuousDistributionOptions.java (60%)
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/InverseDiscreteDistributionOptions.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LaplaceCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LevyCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LogNormalCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LogisticCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ManifestVersionProvider.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/NakagamiCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/NormalCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ParetoCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/PascalCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/PoissonCommand.java
 copy commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/package-info.java => commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/StandardOptions.java (56%)
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/TCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/TriangularCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/TruncatedNormalCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/UniformContinuousCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/UniformDiscreteCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/WeibullCommand.java
 create mode 100644 commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ZipfCommand.java
 copy {commons-statistics-distribution/src/main/java/org/apache/commons/statistics => commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples}/distribution/package-info.java (72%)
 create mode 100644 commons-statistics-examples/pom.xml
 create mode 100644 stats.tgz

[commons-statistics] 01/02: Correct density integrals test

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-statistics.git

commit 99be7290365a23323f012e1301190793c2772f3b
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Sun Sep 19 22:56:43 2021 +0100

    Correct density integrals test
    
    This integrated an interval from the minimum point to the current point.
    Change to integrate the interval between consecutive points.
---
 .../distribution/ContinuousDistributionAbstractTest.java          | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ContinuousDistributionAbstractTest.java b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ContinuousDistributionAbstractTest.java
index 120de7c..5632fb2 100644
--- a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ContinuousDistributionAbstractTest.java
+++ b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/ContinuousDistributionAbstractTest.java
@@ -509,12 +509,12 @@ abstract class ContinuousDistributionAbstractTest {
         }
         Collections.sort(integrationTestPoints);
         for (int i = 1; i < integrationTestPoints.size(); i++) {
+            final double x0 = integrationTestPoints.get(i - 1);
+            final double x1 = integrationTestPoints.get(i);
             Assertions.assertEquals(
-                distribution.probability(integrationTestPoints.get(0),
-                integrationTestPoints.get(i)),
+                distribution.probability(x0, x1),
                 integrator.integrate(1000000, // Triangle integrals are very slow to converge
-                                     d, integrationTestPoints.get(0),
-                                     integrationTestPoints.get(i)), tol);
+                                     d, x0, x1), tol);
         }
     }
 

Re: [commons-statistics] branch master updated (adb847a -> dda4ad9)

Posted by Alex Herbert <al...@gmail.com>.
On Mon, 20 Sept 2021 at 01:35, Gilles Sadowski <gi...@gmail.com> wrote:

> > Summary of changes:
> >  [...]
> >  stats.tgz                                          | Bin 0 -> 34299 bytes
>
> Spurious file?

Thanks. An early version that I had transferred from one machine to
another. The RAT check plugin ignored it so it was left in error.

Alex

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [commons-statistics] branch master updated (adb847a -> dda4ad9)

Posted by Gilles Sadowski <gi...@gmail.com>.
Le lun. 20 sept. 2021 à 00:58, <ah...@apache.org> a écrit :
>
> This is an automated email from the ASF dual-hosted git repository.
>
> aherbert pushed a change to branch master
> in repository https://gitbox.apache.org/repos/asf/commons-statistics.git.
>
>
>     from adb847a  Add test for probability of success 1.0
>      new 99be729  Correct density integrals test
>      new dda4ad9  STATISTICS 9: Example application to evaluate distributions
>
> The 2 revisions listed above as "new" are entirely new to this
> repository and will be described in separate emails.  The revisions
> listed as "add" were already present in the repository and have only
> been added to this reference.
>
>
> Summary of changes:
>  [...]
>  stats.tgz                                          | Bin 0 -> 34299 bytes

Spurious file?

Gilles

> [...]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


[commons-statistics] 02/02: STATISTICS 9: Example application to evaluate distributions

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-statistics.git

commit dda4ad9bafc7137555ab30b021c3d5bed25f9aa6
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Sun Sep 19 23:58:41 2021 +0100

    STATISTICS 9: Example application to evaluate distributions
    
    The application can configure the distribution parameters and evaluate
    the distribution functions (e.g. pdf, cdf, inverse cdf). The range of
    evaluated points can be configured.
---
 commons-statistics-examples/LICENSE                | 275 ++++++++
 commons-statistics-examples/NOTICE                 |   5 +
 commons-statistics-examples/README.md              |  93 +++
 .../examples-distribution/HOWTO.md                 |  94 +++
 .../examples-distribution/LICENSE                  | 275 ++++++++
 .../examples-distribution/NOTICE                   |   5 +
 .../examples-distribution/README.md                |  91 +++
 .../examples-distribution/pom.xml                  | 105 ++++
 .../AbstractContinuousDistributionCommand.java     |  89 +++
 .../AbstractDiscreteDistributionCommand.java       |  89 +++
 .../distribution/AbstractDistributionCommand.java  |  43 ++
 .../examples/distribution/BetaCommand.java         | 144 +++++
 .../examples/distribution/BinomialCommand.java     | 147 +++++
 .../examples/distribution/CauchyCommand.java       | 144 +++++
 .../examples/distribution/ChiSquaredCommand.java   | 131 ++++
 .../ContinuousDistributionOptions.java             |  57 ++
 .../distribution/DiscreteDistributionOptions.java  |  52 ++
 .../examples/distribution/Distribution.java        |  56 ++
 .../distribution/DistributionFunction.java         |  37 ++
 .../examples/distribution/DistributionOptions.java |  54 ++
 .../examples/distribution/DistributionUtils.java   | 697 +++++++++++++++++++++
 .../distribution/DistributionsApplication.java     | 111 ++++
 .../examples/distribution/ExpCommand.java          | 130 ++++
 .../statistics/examples/distribution/FCommand.java | 144 +++++
 .../examples/distribution/GammaCommand.java        | 145 +++++
 .../examples/distribution/GeometricCommand.java    | 133 ++++
 .../examples/distribution/GumbelCommand.java       | 144 +++++
 .../distribution/HypergeometricCommand.java        | 158 +++++
 .../InverseContinuousDistributionOptions.java      |  30 +
 .../InverseDiscreteDistributionOptions.java        |  52 ++
 .../examples/distribution/LaplaceCommand.java      | 144 +++++
 .../examples/distribution/LevyCommand.java         | 144 +++++
 .../examples/distribution/LogNormalCommand.java    | 145 +++++
 .../examples/distribution/LogisticCommand.java     | 144 +++++
 .../distribution/ManifestVersionProvider.java      |  81 +++
 .../examples/distribution/NakagamiCommand.java     | 144 +++++
 .../examples/distribution/NormalCommand.java       | 146 +++++
 .../examples/distribution/ParetoCommand.java       | 145 +++++
 .../examples/distribution/PascalCommand.java       | 150 +++++
 .../examples/distribution/PoissonCommand.java      | 133 ++++
 .../examples/distribution/StandardOptions.java     |  34 +
 .../statistics/examples/distribution/TCommand.java | 130 ++++
 .../examples/distribution/TriangularCommand.java   | 157 +++++
 .../distribution/TruncatedNormalCommand.java       | 169 +++++
 .../distribution/UniformContinuousCommand.java     | 147 +++++
 .../distribution/UniformDiscreteCommand.java       | 148 +++++
 .../examples/distribution/WeibullCommand.java      | 145 +++++
 .../examples/distribution/ZipfCommand.java         | 146 +++++
 .../examples/distribution/package-info.java        |  27 +
 commons-statistics-examples/pom.xml                |  95 +++
 pom.xml                                            |  12 +
 stats.tgz                                          | Bin 0 -> 34299 bytes
 52 files changed, 6316 insertions(+)

diff --git a/commons-statistics-examples/LICENSE b/commons-statistics-examples/LICENSE
new file mode 100644
index 0000000..de777e4
--- /dev/null
+++ b/commons-statistics-examples/LICENSE
@@ -0,0 +1,275 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+================================================================================
+
+Class "org.apache.commons.rng.internal.source64.MersenneTwister64" contains
+Java code partly ported from the reference implementation in C.
+That source file contained the following notice:
+
+   Copyright (C) 2004, Makoto Matsumoto and Takuji Nishimura,
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+     1. Redistributions of source code must retain the above copyright
+        notice, this list of conditions and the following disclaimer.
+
+     2. Redistributions in binary form must reproduce the above copyright
+        notice, this list of conditions and the following disclaimer in the
+        documentation and/or other materials provided with the distribution.
+
+     3. The names of its contributors may not be used to endorse or promote
+        products derived from this software without specific prior written
+        permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+================================================================================
+
+Class "org.apache.commons.rng.internal.source32.MersenneTwister" contains
+Java code partly ported from the reference implementation in C.
+That source file contained the following notice:
+
+   Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+     1. Redistributions of source code must retain the above copyright
+        notice, this list of conditions and the following disclaimer.
+
+     2. Redistributions in binary form must reproduce the above copyright
+        notice, this list of conditions and the following disclaimer in the
+        documentation and/or other materials provided with the distribution.
+
+     3. The names of its contributors may not be used to endorse or promote
+        products derived from this software without specific prior written
+        permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+================================================================================
diff --git a/commons-statistics-examples/NOTICE b/commons-statistics-examples/NOTICE
new file mode 100644
index 0000000..d00085d
--- /dev/null
+++ b/commons-statistics-examples/NOTICE
@@ -0,0 +1,5 @@
+Apache Commons Statistics
+Copyright 2018-2021 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
diff --git a/commons-statistics-examples/README.md b/commons-statistics-examples/README.md
new file mode 100644
index 0000000..f0443de
--- /dev/null
+++ b/commons-statistics-examples/README.md
@@ -0,0 +1,93 @@
+<!---
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!---
+ +======================================================================+
+ |****                                                              ****|
+ |****      THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN      ****|
+ |****                    DO NOT EDIT DIRECTLY                      ****|
+ |****                                                              ****|
+ +======================================================================+
+ | TEMPLATE FILE: readme-md-template.md                                 |
+ | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+ +======================================================================+
+ |                                                                      |
+ | 1) Re-generate using: mvn commons:readme-md                          |
+ |                                                                      |
+ | 2) Set the following properties in the component's pom:              |
+ |    - commons.componentid (required, alphabetic, lower case)          |
+ |    - commons.release.version (required)                              |
+ |                                                                      |
+ | 3) Example Properties                                                |
+ |                                                                      |
+ |  <properties>                                                        |
+ |    <commons.componentid>math</commons.componentid>                   |
+ |    <commons.release.version>1.2</commons.release.version>            |
+ |  </properties>                                                       |
+ |                                                                      |
+ +======================================================================+
+--->
+Apache Commons Statistics
+===================
+
+Examples of use of the "Commons Statistics" library.
+Codes in this module and its sub-modules are not part of the library.
+They provide checking, benchmarking tools to enhance the documentation
+and to help ensure correctness of the implementations.
+
+Documentation
+-------------
+
+More information can be found on the [Apache Commons Statistics homepage](https://commons.apache.org/proper/commons-statistics).
+The [Javadoc](https://commons.apache.org/proper/commons-statistics/javadocs/api-release) can be browsed.
+Questions related to the usage of Apache Commons Statistics should be posted to the [user mailing list][ml].
+
+Where can I get the latest release?
+-----------------------------------
+You can download source and binaries from our [download page](https://commons.apache.org/proper/commons-statistics/download_statistics.cgi).
+
+Contributing
+------------
+
+We accept Pull Requests via GitHub. The [developer mailing list][ml] is the main channel of communication for contributors.
+There are some guidelines which will make applying PRs easier for us:
++ No tabs! Please use spaces for indentation.
++ Respect the code style.
++ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
++ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running ```mvn clean test```.
+
+If you plan to contribute on a regular basis, please consider filing a [contributor license agreement](https://www.apache.org/licenses/#clas).
+You can learn more about contributing via GitHub in our [contribution guidelines](CONTRIBUTING.md).
+
+License
+-------
+This code is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0).
+
+See the `NOTICE` file for required notices and attributions.
+
+Donations
+---------
+You like Apache Commons Statistics? Then [donate back to the ASF](https://www.apache.org/foundation/contributing.html) to support the development.
+
+Additional Resources
+--------------------
+
++ [Apache Commons Homepage](https://commons.apache.org/)
++ [Apache Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/STATISTICS)
++ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
++ `#apache-commons` IRC channel on `irc.freenode.org`
+
+[ml]:https://commons.apache.org/mail-lists.html
diff --git a/commons-statistics-examples/examples-distribution/HOWTO.md b/commons-statistics-examples/examples-distribution/HOWTO.md
new file mode 100644
index 0000000..eb80c30
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/HOWTO.md
@@ -0,0 +1,94 @@
+<!---
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+Apache Commons RNG Examples Distribution  Utilities
+===================================================
+
+Application for calling distributions defined in Commons Statistics.
+
+Build the package using:
+
+    mvn package -Pexamples-distributions
+
+The application contains help information describing the usage. Obtain the help
+by running the application with the `-h` flag to obtain the available commands
+and to obtain information for the commands:
+
+    java -jar target/examples-distributions.jar -h
+    java -jar target/examples-distributions.jar exp -h
+
+Each command of the application will create an instance of the distribution
+named by the command. Each distribution command has the following functions:
+
+| Function | Description |
+| -------- | ----------- |
+| pdf | Probability Density Function (continuous distributions) |
+| pmf | Probability Mass Function (discrete distributions) |
+| cdf | Cumulative Probability Density Function |
+| survival | Survival Probability Function |
+| icdf | Inverse Cumulative Probability Density Function |
+| lpdf | Natural logarithm of the PDF (continuous distributions) |
+| lpmf | Natural logarithm of the PMF (discrete distributions) |
+
+For convenicence the discrete distribution pmf and lpmf commands are aliased to pdf and lpdf.
+
+The pdf, cdf and survival functions accept an input value and output a probability or
+probability density. The icdf function accepts an input probability and outputs a value.
+The distribution is configured with suitable defaults for the distribution parameters
+and the range of values to evaluate. Executing the command will output a delimited
+table that can be plotted for visual inspection. The output will default to stdout and
+can optionally be written to file.
+
+Distributions for input values that are real numbers will be evaluated between a
+minimum and maximum with a specified number of steps used to move from min to max.
+For example 1 to 5 in 10 steps would use a difference of 0.4 between values.
+
+Distributions for input values that are integers will be evaluated between a
+minimum and maximum with a specified increment used to move from min to max.
+For example 1 to 20 with an increment of 2 would output 11 values. The default
+increment is 1 so caution must be taken when using a large range to avoid excess
+evaluations.
+
+Points to evaluate can be overridden by: using individual values; updating the
+enumerated range; or using an input file.
+
+Distributions that require multiple parameters must specify either a single parameter
+value or ``n`` values where ``n`` is the same for each parameter. Any parameter
+with 1 value will be expanded to size ``n``.
+
+Examples
+--------
+
+To create a sample of the PDF for the exponential distribution:
+
+    java -jar target/examples-distribution.jar exp pdf
+    java -jar target/examples-distribution.jar exp pdf --mean 3.45
+    java -jar target/examples-distribution.jar exp pdf \
+        --mean 3.45 --min 3 --max 5 --steps 50
+
+To create a sample of the CDF for the Poisson distribution:
+
+    java -jar target/examples-distribution.jar poisson cdf
+    java -jar target/examples-distribution.jar poisson cdf --mean 3.45
+    java -jar target/examples-distribution.jar poisson cdf \
+        --mean 12.34 --min 0 --max 50 --increment 2
+
+To create a sample of the PDF for the Gamma distribution with different shape and
+a fixed scale:
+
+    java -jar target/examples-distribution.jar gamma pdf \
+        --shape 0.5,1,2 --scale 1
diff --git a/commons-statistics-examples/examples-distribution/LICENSE b/commons-statistics-examples/examples-distribution/LICENSE
new file mode 100644
index 0000000..de777e4
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/LICENSE
@@ -0,0 +1,275 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+================================================================================
+
+Class "org.apache.commons.rng.internal.source64.MersenneTwister64" contains
+Java code partly ported from the reference implementation in C.
+That source file contained the following notice:
+
+   Copyright (C) 2004, Makoto Matsumoto and Takuji Nishimura,
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+     1. Redistributions of source code must retain the above copyright
+        notice, this list of conditions and the following disclaimer.
+
+     2. Redistributions in binary form must reproduce the above copyright
+        notice, this list of conditions and the following disclaimer in the
+        documentation and/or other materials provided with the distribution.
+
+     3. The names of its contributors may not be used to endorse or promote
+        products derived from this software without specific prior written
+        permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+================================================================================
+
+Class "org.apache.commons.rng.internal.source32.MersenneTwister" contains
+Java code partly ported from the reference implementation in C.
+That source file contained the following notice:
+
+   Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+     1. Redistributions of source code must retain the above copyright
+        notice, this list of conditions and the following disclaimer.
+
+     2. Redistributions in binary form must reproduce the above copyright
+        notice, this list of conditions and the following disclaimer in the
+        documentation and/or other materials provided with the distribution.
+
+     3. The names of its contributors may not be used to endorse or promote
+        products derived from this software without specific prior written
+        permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+================================================================================
diff --git a/commons-statistics-examples/examples-distribution/NOTICE b/commons-statistics-examples/examples-distribution/NOTICE
new file mode 100644
index 0000000..d00085d
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/NOTICE
@@ -0,0 +1,5 @@
+Apache Commons Statistics
+Copyright 2018-2021 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
diff --git a/commons-statistics-examples/examples-distribution/README.md b/commons-statistics-examples/examples-distribution/README.md
new file mode 100644
index 0000000..21a6bf5
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/README.md
@@ -0,0 +1,91 @@
+<!---
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!---
+ +======================================================================+
+ |****                                                              ****|
+ |****      THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN      ****|
+ |****                    DO NOT EDIT DIRECTLY                      ****|
+ |****                                                              ****|
+ +======================================================================+
+ | TEMPLATE FILE: readme-md-template.md                                 |
+ | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+ +======================================================================+
+ |                                                                      |
+ | 1) Re-generate using: mvn commons:readme-md                          |
+ |                                                                      |
+ | 2) Set the following properties in the component's pom:              |
+ |    - commons.componentid (required, alphabetic, lower case)          |
+ |    - commons.release.version (required)                              |
+ |                                                                      |
+ | 3) Example Properties                                                |
+ |                                                                      |
+ |  <properties>                                                        |
+ |    <commons.componentid>math</commons.componentid>                   |
+ |    <commons.release.version>1.2</commons.release.version>            |
+ |  </properties>                                                       |
+ |                                                                      |
+ +======================================================================+
+--->
+Apache Commons Statistics
+===================
+
+Application for calling the distributions defined in Commons Statistics.
+Code in this module is not part of the public API.
+
+Documentation
+-------------
+
+More information can be found on the [Apache Commons Statistics homepage](https://commons.apache.org/proper/commons-statistics).
+The [Javadoc](https://commons.apache.org/proper/commons-statistics/javadocs/api-release) can be browsed.
+Questions related to the usage of Apache Commons Statistics should be posted to the [user mailing list][ml].
+
+Where can I get the latest release?
+-----------------------------------
+You can download source and binaries from our [download page](https://commons.apache.org/proper/commons-statistics/download_statistics.cgi).
+
+Contributing
+------------
+
+We accept Pull Requests via GitHub. The [developer mailing list][ml] is the main channel of communication for contributors.
+There are some guidelines which will make applying PRs easier for us:
++ No tabs! Please use spaces for indentation.
++ Respect the code style.
++ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
++ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running ```mvn clean test```.
+
+If you plan to contribute on a regular basis, please consider filing a [contributor license agreement](https://www.apache.org/licenses/#clas).
+You can learn more about contributing via GitHub in our [contribution guidelines](CONTRIBUTING.md).
+
+License
+-------
+This code is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0).
+
+See the `NOTICE` file for required notices and attributions.
+
+Donations
+---------
+You like Apache Commons Statistics? Then [donate back to the ASF](https://www.apache.org/foundation/contributing.html) to support the development.
+
+Additional Resources
+--------------------
+
++ [Apache Commons Homepage](https://commons.apache.org/)
++ [Apache Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/STATISTICS)
++ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
++ `#apache-commons` IRC channel on `irc.freenode.org`
+
+[ml]:https://commons.apache.org/mail-lists.html
diff --git a/commons-statistics-examples/examples-distribution/pom.xml b/commons-statistics-examples/examples-distribution/pom.xml
new file mode 100644
index 0000000..629afc3
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/pom.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.commons</groupId>
+    <artifactId>commons-statistics-examples</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>commons-statistics-examples-distribution</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <!-- This name is used in the shaded jar to provide the application title for the version information. -->
+  <name>Apache Commons Statistics Distribution Utilities</name>
+
+  <description>Application for calling the distributions defined in Commons Statistics.
+  Code in this module is not part of the public API.</description>
+
+  <properties>
+    <!-- OSGi -->
+    <commons.osgi.symbolicName>org.apache.commons.statistics.examples.distribution</commons.osgi.symbolicName>
+    <commons.osgi.export>org.apache.commons.statistics.examples.distribution</commons.osgi.export>
+    <!-- Java 9+ -->
+    <commons.automatic.module.name>org.apache.commons.statistics.examples.distribution</commons.automatic.module.name>
+    <!-- Workaround to avoid duplicating config files. -->
+    <statistics.parent.dir>${basedir}/../..</statistics.parent.dir>
+
+    <uberjar.name>examples-distribution</uberjar.name>
+    <project.mainClass>org.apache.commons.statistics.examples.distribution.DistributionsApplication</project.mainClass>
+  </properties>
+
+  <dependencies>
+    <dependency>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-statistics-distribution</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>info.picocli</groupId>
+      <artifactId>picocli</artifactId>
+    </dependency>
+  </dependencies>
+
+  <profiles>
+    <profile>
+      <id>examples-distribution</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-shade-plugin</artifactId>
+            <version>${statistics.shade.version}</version>
+            <executions>
+              <execution>
+                <phase>package</phase>
+                <goals>
+                  <goal>shade</goal>
+                </goals>
+                <configuration>
+                  <finalName>${uberjar.name}</finalName>
+                  <minimizeJar>true</minimizeJar>
+                  <transformers>
+                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                      <mainClass>${project.mainClass}</mainClass>
+                    </transformer>
+                  </transformers>
+                  <filters>
+                    <filter>
+                      <!-- Shading signed JARs will fail without this. http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar -->
+                      <artifact>*:*</artifact>
+                      <excludes>
+                        <exclude>META-INF/*.SF</exclude>
+                        <exclude>META-INF/*.DSA</exclude>
+                        <exclude>META-INF/*.RSA</exclude>
+                        <exclude>META-INF/LICENSE</exclude>
+                        <exclude>META-INF/MANIFEST.MF</exclude>
+                        <exclude>META-INF/NOTICE</exclude>
+                      </excludes>
+                    </filter>
+                  </filters>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
+</project>
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/AbstractContinuousDistributionCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/AbstractContinuousDistributionCommand.java
new file mode 100644
index 0000000..9c6ffd9
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/AbstractContinuousDistributionCommand.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.List;
+import java.util.concurrent.Callable;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import picocli.CommandLine.Mixin;
+
+/**
+ * Base command for a continuous distribution.
+ *
+ * <p>Sub-classes are assumed to have a name that corresponds to the command to action.
+ * Typically this is a function value in the {@link DistributionFunction} enum. The
+ * distribution will be evaluated for this function using the points defined by the
+ * {@link DistributionOptions}.
+ *
+ * <p>Alternatively the sub-class name may indicate a special command to execute.
+ *
+ * <p>Sub-classes must provide the list of distributions to evaluate and options for the
+ * evaluation.
+ */
+abstract class AbstractContinuousDistributionCommand implements Callable<Void> {
+    /** The standard options. */
+    @Mixin
+    private StandardOptions standardOptions;
+
+    @Override
+    public Void call() {
+        final List<Distribution<ContinuousDistribution>> distributions = getDistributions();
+        final DistributionOptions distributionOptions = getDistributionOptions();
+        // Set the function based on the class name
+        final String name = getClass().getSimpleName();
+
+        // Special handling of sub-classes which do not evaluate a function of the distribution.
+        // This is done here to avoid duplicating an overridden 'call()' method for each instance.
+        // Currently this applies to a 'check' command that performs verification checks
+        // on the distribution.
+        if ("Check".equals(name)) {
+            // This is not an evaluation of a single function.
+            DistributionUtils.check(distributions,
+                (ContinuousDistributionOptions) distributionOptions);
+            return null;
+        }
+
+        // Assume an evaluation of a distribution function
+        distributionOptions.distributionFunction = DistributionFunction.valueOf(name);
+        // Assume there are only two types of options:
+        // Forward functions: x (real) -> p-value
+        // Inverse functions: p-value -> x (real)
+        if (distributionOptions instanceof InverseContinuousDistributionOptions) {
+            DistributionUtils.evaluate(distributions,
+                (InverseContinuousDistributionOptions) distributionOptions);
+        } else {
+            DistributionUtils.evaluate(distributions,
+                (ContinuousDistributionOptions) distributionOptions);
+        }
+        return null;
+    }
+
+    /**
+     * Gets the distributions to evaluate.
+     *
+     * @return the distributions
+     */
+    protected abstract List<Distribution<ContinuousDistribution>> getDistributions();
+
+    /**
+     * Gets the distribution options.
+     * This will define the points to evaluate, and the output options.
+     *
+     * @return the distribution options
+     */
+    protected abstract DistributionOptions getDistributionOptions();
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/AbstractDiscreteDistributionCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/AbstractDiscreteDistributionCommand.java
new file mode 100644
index 0000000..ed8ed37
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/AbstractDiscreteDistributionCommand.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.List;
+import java.util.concurrent.Callable;
+import org.apache.commons.statistics.distribution.DiscreteDistribution;
+import picocli.CommandLine.Mixin;
+
+/**
+ * Base command for a discrete distribution.
+ *
+ * <p>Sub-classes are assumed to have a name that corresponds to the command to action.
+ * Typically this is a function value in the {@link DistributionFunction} enum. The
+ * distribution will be evaluated for this function using the points defined by the
+ * {@link DistributionOptions}.
+ *
+ * <p>Alternatively the sub-class name may indicate a special command to execute.
+ *
+ * <p>Sub-classes must provide the list of distributions to evaluate and options for the
+ * evaluation.
+ */
+abstract class AbstractDiscreteDistributionCommand implements Callable<Void> {
+    /** The standard options. */
+    @Mixin
+    private StandardOptions standardOptions;
+
+    @Override
+    public Void call() {
+        final List<Distribution<DiscreteDistribution>> distributions = getDistributions();
+        final DistributionOptions distributionOptions = getDistributionOptions();
+        // Set the function based on the class name
+        final String name = getClass().getSimpleName();
+
+        // Special handling of sub-classes which do not evaluate a function of the distribution.
+        // This is done here to avoid duplicating an overridden 'call()' method for each instance.
+        // Currently this applies to a hidden 'check' command that performs verification checks
+        // on the distribution.
+        if ("Check".equals(name)) {
+            // This is not an evaluation of a single function.
+            DistributionUtils.check(distributions,
+                (DiscreteDistributionOptions) distributionOptions);
+            return null;
+        }
+
+        // Assume an evaluation of a distribution function
+        distributionOptions.distributionFunction = DistributionFunction.valueOf(name);
+        // Assume there are only two types of options:
+        // Forward functions: x (int) -> p-value
+        // Inverse functions: p-value -> x (int)
+        if (distributionOptions instanceof InverseDiscreteDistributionOptions) {
+            DistributionUtils.evaluate(distributions,
+                (InverseDiscreteDistributionOptions) distributionOptions);
+        } else {
+            DistributionUtils.evaluate(distributions,
+                (DiscreteDistributionOptions) distributionOptions);
+        }
+        return null;
+    }
+
+    /**
+     * Gets the distributions to evaluate.
+     *
+     * @return the distributions
+     */
+    protected abstract List<Distribution<DiscreteDistribution>> getDistributions();
+
+    /**
+     * Gets the distribution options.
+     * This will define the points to evaluate, and the output options.
+     *
+     * @return the distribution options
+     */
+    protected abstract DistributionOptions getDistributionOptions();
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/AbstractDistributionCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/AbstractDistributionCommand.java
new file mode 100644
index 0000000..af73cae
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/AbstractDistributionCommand.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.concurrent.Callable;
+import picocli.CommandLine.Mixin;
+import picocli.CommandLine.Model.CommandSpec;
+import picocli.CommandLine.Spec;
+
+/**
+ * Base command that output the help message.
+ * This is used for commands that have sub-commands.
+ */
+abstract class AbstractDistributionCommand implements Callable<Void> {
+    /** The command specification. Used to print the usage built by Picocli. */
+    @Spec
+    private CommandSpec spec;
+
+    /** The standard options. */
+    @Mixin
+    private StandardOptions standardOptions;
+
+    @Override
+    public Void call() {
+        // All work is done in sub-commands so just print the usage
+        spec.commandLine().usage(System.out);
+        return null;
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/BetaCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/BetaCommand.java
new file mode 100644
index 0000000..d09ec35
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/BetaCommand.java
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.BetaDistribution;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link BetaDistribution}.
+ */
+@Command(name = "beta",
+         description = "Beta distribution.",
+         subcommands = {
+             BetaCommand.Check.class,
+             BetaCommand.PDF.class,
+             BetaCommand.LPDF.class,
+             BetaCommand.CDF.class,
+             BetaCommand.Survival.class,
+             BetaCommand.ICDF.class,
+         })
+class BetaCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution alpha. */
+            @Option(names = {"--alpha"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"alpha shape (default: ${DEFAULT-VALUE})."})
+            private double[] alpha = {0.5, 5, 1, 2, 2};
+
+            /** The distribution beta. */
+            @Option(names = {"--beta"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"beta shape (default: ${DEFAULT-VALUE})."})
+            private double[] beta = {0.5, 1, 3, 2, 5};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 1;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] alpha = params.alpha;
+            double[] beta = params.beta;
+            final int n = DistributionUtils.validateLengths(alpha.length, beta.length);
+
+            alpha = DistributionUtils.expandToLength(alpha, n);
+            beta = DistributionUtils.expandToLength(beta, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new BetaDistribution(alpha[i], beta[i]);
+                list.add(new Distribution<>(d, "alpha=" + alpha[i] + ",beta=" + beta[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Beta distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Beta distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Beta distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Beta distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Beta distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Beta distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/BinomialCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/BinomialCommand.java
new file mode 100644
index 0000000..60570df
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/BinomialCommand.java
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.BinomialDistribution;
+import org.apache.commons.statistics.distribution.DiscreteDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link BinomialDistribution}.
+ */
+@Command(name = "binomial",
+         aliases = {"bino"},
+         description = "Binomial distribution.",
+         subcommands = {
+             BinomialCommand.Check.class,
+             BinomialCommand.PMF.class,
+             BinomialCommand.LPMF.class,
+             BinomialCommand.CDF.class,
+             BinomialCommand.Survival.class,
+             BinomialCommand.ICDF.class,
+         })
+class BinomialCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractDiscreteDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution trials. */
+            @Option(names = {"-n", "--trials"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"number of trials (default: ${DEFAULT-VALUE})."})
+            private int[] trials = {20, 20, 40};
+
+            /** The distribution p. */
+            @Option(names = {"-p", "--probability"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"probability of success (default: ${DEFAULT-VALUE})."})
+            private double[] p = {0.5, 0.7, 0.5};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends DiscreteDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 40;
+            }
+        }
+
+        @Override
+        protected List<Distribution<DiscreteDistribution>> getDistributions() {
+            int[] trials = params.trials;
+            double[] p = params.p;
+            final int n = DistributionUtils.validateLengths(trials.length, p.length);
+
+            trials = DistributionUtils.expandToLength(trials, n);
+            p = DistributionUtils.expandToLength(p, n);
+
+            // Create distributions
+            final ArrayList<Distribution<DiscreteDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final DiscreteDistribution d = new BinomialDistribution(trials[i], p[i]);
+                list.add(new Distribution<>(d, "trials=" + trials[i] + ",p=" + p[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Binomial distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PMF command. */
+    @Command(name = "pmf",
+             aliases = {"pdf"},
+             description = "Binomial distribution PMF.")
+    static class PMF extends ProbabilityCommand {}
+
+    /** LPMF command. */
+    @Command(name = "lpmf",
+             aliases = {"lpdf"},
+             description = "Binomial distribution natural logarithm of the PMF.")
+    static class LPMF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Binomial distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Binomial distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Binomial distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseDiscreteDistributionOptions distributionOptions = new InverseDiscreteDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/CauchyCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/CauchyCommand.java
new file mode 100644
index 0000000..8eda266
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/CauchyCommand.java
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.CauchyDistribution;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link CauchyDistribution}.
+ */
+@Command(name = "cauchy",
+         description = "Cauchy distribution.",
+         subcommands = {
+             CauchyCommand.Check.class,
+             CauchyCommand.PDF.class,
+             CauchyCommand.LPDF.class,
+             CauchyCommand.CDF.class,
+             CauchyCommand.Survival.class,
+             CauchyCommand.ICDF.class,
+         })
+class CauchyCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution location. */
+            @Option(names = {"--location"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"location (default: ${DEFAULT-VALUE})."})
+            private double[] location = {0, 0, 0, -2};
+
+            /** The distribution scale. */
+            @Option(names = {"--scale"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"scale (default: ${DEFAULT-VALUE})."})
+            private double[] scale = {0.5, 1, 2, 1};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = -5;
+                max = 5;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] location = params.location;
+            double[] scale = params.scale;
+            final int n = DistributionUtils.validateLengths(location.length, scale.length);
+
+            location = DistributionUtils.expandToLength(location, n);
+            scale = DistributionUtils.expandToLength(scale, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new CauchyDistribution(location[i], scale[i]);
+                list.add(new Distribution<>(d, "location=" + location[i] + ",scale=" + scale[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Cauchy distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Cauchy distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Cauchy distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Cauchy distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Cauchy distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Cauchy distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ChiSquaredCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ChiSquaredCommand.java
new file mode 100644
index 0000000..4dbef51
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ChiSquaredCommand.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ChiSquaredDistribution;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link ChiSquaredDistribution}.
+ */
+@Command(name = "chisq",
+         aliases = {"chi2"},
+         description = "Chi-squared distribution.",
+         subcommands = {
+             ChiSquaredCommand.Check.class,
+             ChiSquaredCommand.PDF.class,
+             ChiSquaredCommand.LPDF.class,
+             ChiSquaredCommand.CDF.class,
+             ChiSquaredCommand.Survival.class,
+             ChiSquaredCommand.ICDF.class,
+         })
+class ChiSquaredCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution degrees of freedom. */
+            @Option(names = {"--df", "--degrees-of-freedom"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"degrees of freedom (default: ${DEFAULT-VALUE})."})
+            private double[] df = {1, 2, 3, 4, 6, 9};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 8;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (final double degreesOfFreedom : params.df) {
+                final ContinuousDistribution d = new ChiSquaredDistribution(degreesOfFreedom);
+                list.add(new Distribution<>(d, "df=" + degreesOfFreedom));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Chi-squared distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Chi-squared distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Chi-squared distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Chi-squared distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Chi-squared distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Chi-squared distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ContinuousDistributionOptions.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ContinuousDistributionOptions.java
new file mode 100644
index 0000000..c58bdc4
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ContinuousDistributionOptions.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import picocli.CommandLine.Option;
+
+/**
+ * Options for functions of continuous distributions.
+ * Applies to functions x=real and f(x)=real.
+ */
+class ContinuousDistributionOptions extends DistributionOptions {
+    /** The minimum point to evaluate. */
+    @Option(names = { "--min" },
+            description = {"Minimum point to evaluate (default: ${DEFAULT-VALUE})."})
+    protected double min;
+
+    /** The maximum point to evaluate. */
+    @Option(names = { "--max" },
+            description = {"Maximum point to evaluate (default: ${DEFAULT-VALUE})."})
+    protected double max = 5;
+
+    /** The number of steps from minimum to the maximum. */
+    @Option(names = { "--steps" },
+            description = {"Number of steps from the minimum to the maximum (default: ${DEFAULT-VALUE})."})
+    protected int steps = 100;
+
+    /** The single point to evaluate. */
+    @Option(names = { "-x", "--point" },
+            arity = "1..*",
+            split = ",",
+            description = {"Point to evaluate (overrides input range)."})
+    protected double[] x;
+
+    /** The format for the evaluated point. */
+    @Option(names = { "--xformat" },
+            description = {"Format for the evaluated point (default: ${DEFAULT-VALUE})."})
+    protected String xformat = "%.6g";
+
+    /** The format for the output values. */
+    @Option(names = { "--format" },
+            description = {"Format for the output values (default: ${DEFAULT-VALUE})."})
+    protected String format = "%s";
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DiscreteDistributionOptions.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DiscreteDistributionOptions.java
new file mode 100644
index 0000000..c6a4f05
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DiscreteDistributionOptions.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import picocli.CommandLine.Option;
+
+/**
+ * Options for functions of discrete distributions.
+ * Applies to functions x=integer and f(x)=real.
+ */
+class DiscreteDistributionOptions extends DistributionOptions {
+    /** The minimum point to evaluate. */
+    @Option(names = { "--min" },
+            description = {"Minimum point to evaluate (default: ${DEFAULT-VALUE})."})
+    protected int min;
+
+    /** The maximum point to evaluate. */
+    @Option(names = { "--max" },
+            description = {"Maximum point to evaluate (default: ${DEFAULT-VALUE})."})
+    protected int max = 20;
+
+    /** The increment from minimum to the maximum. */
+    @Option(names = { "-i", "--increment" },
+            description = {"Increment from the minimum to the maximum (default: ${DEFAULT-VALUE})."})
+    protected int increment = 1;
+
+    /** The single point to evaluate. */
+    @Option(names = { "-x", "--point" },
+            arity = "1..*",
+            split = ",",
+            description = {"Point to evaluate (overrides input range)."})
+    protected int[] x;
+
+    /** The format for the output values. */
+    @Option(names = { "--format" },
+            description = {"Format for the output values (default: ${DEFAULT-VALUE})."})
+    protected String format = "%s";
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/Distribution.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/Distribution.java
new file mode 100644
index 0000000..efcdd63
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/Distribution.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+/**
+ * Stored a distribution and its parameters.
+ *
+ * @param <T> The type of distribution
+ */
+class Distribution<T> {
+    /** The distribution. */
+    private final T distribution;
+    /** The parameters. */
+    private final String parameters;
+
+    /**
+     * @param distribution the distribution
+     * @param parameters the parameters
+     */
+    Distribution(T distribution, String parameters) {
+        this.distribution = distribution;
+        this.parameters = parameters;
+    }
+
+    /**
+     * Gets the distribution.
+     *
+     * @return the distribution
+     */
+    T getDistribution() {
+        return distribution;
+    }
+
+    /**
+     * Gets the parameters.
+     *
+     * @return the parameters
+     */
+    String getParameters() {
+        return parameters;
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionFunction.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionFunction.java
new file mode 100644
index 0000000..db71cea
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionFunction.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+/**
+ * Define the distribution function.
+ */
+enum DistributionFunction {
+    /** Probability Density Function. */
+    PDF,
+    /** Natural Logarithm of the Probability Density Function. */
+    LPDF,
+    /** Probability Mass Function. */
+    PMF,
+    /** Natural Logarithm of the Probability Mass Function. */
+    LPMF,
+    /** Cumulative Probability Density Function. */
+    CDF,
+    /** Inverse Cumulative Probability Density Function. */
+    ICDF,
+    /** Survival Probability Function. */
+    Survival
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionOptions.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionOptions.java
new file mode 100644
index 0000000..4d8092e
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionOptions.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.io.File;
+import picocli.CommandLine.Option;
+
+/**
+ * Standard options for distribution commands.
+ */
+class DistributionOptions {
+
+    /** The distribution function. */
+    protected DistributionFunction distributionFunction;
+
+    /** The field delimiter. */
+    @Option(names = { "--delim" },
+            description = {"Output field delimiter (default: \\t)."})
+    protected String delim = "\t";
+
+    /** The output file. */
+    @Option(names = { "--out" },
+            paramLabel = "file",
+            description = {"Output file (default: stdout)."})
+    protected File outputFile;
+
+    /** The output file. */
+    @Option(names = { "--in" },
+            paramLabel = "file",
+            description = {"Input file containing points to evaluate.",
+                           "Overrides configured ranges."})
+    protected File inputFile;
+
+    /** Flag indicating if an exception should be suppressed during function evaluation.
+     * Exceptions are thrown by the ICDF function when the input probability is not in
+     * the interval {@code [0, 1]}. */
+    @Option(names = { "--no-ex", "--no-exception" },
+            description = {"Suppress function evaluation exceptions (returns NaN or integer min value)."})
+    protected boolean suppressException;
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionUtils.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionUtils.java
new file mode 100644
index 0000000..df3099b
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionUtils.java
@@ -0,0 +1,697 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.UncheckedIOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.DiscreteDistribution;
+
+/**
+ * Utility methods.
+ */
+final class DistributionUtils {
+    /** Message prefix for an unknown function. */
+    private static final String UNKNOWN_FUNCTION = "Unknown function: ";
+
+    /** No public construction. */
+    private DistributionUtils() {}
+
+    /**
+     * A unary function for a continuous distribution.
+     */
+    interface ContinuousFunction {
+        /**
+         * Applies this function to the given argument.
+         *
+         * @param dist Distributions
+         * @param x Point to evaluate
+         * @return the result
+         */
+        double apply(ContinuousDistribution dist, double x);
+    }
+
+    /**
+     * A unary function for a discrete distribution.
+     */
+    interface DiscreteFunction {
+        /**
+         * Applies this function to the given argument.
+         *
+         * @param dist Distributions
+         * @param x Point to evaluate
+         * @return the result
+         */
+        double apply(DiscreteDistribution dist, int x);
+    }
+
+    /**
+     * A unary inverse function for a discrete distribution.
+     */
+    interface InverseDiscreteFunction {
+        /**
+         * Applies this function to the given argument.
+         *
+         * @param dist Distributions
+         * @param x Point to evaluate
+         * @return the result
+         */
+        int apply(DiscreteDistribution dist, double x);
+    }
+
+    /**
+     * Evaluate the distribution function.
+     *
+     * @param dist Distributions
+     * @param distributionOptions Distribution options
+     */
+    static void evaluate(List<Distribution<ContinuousDistribution>> dist,
+                         ContinuousDistributionOptions distributionOptions) {
+        try (PrintWriter out = createOutput(distributionOptions)) {
+            final ContinuousFunction fun = createFunction(distributionOptions);
+            final double[] points = createPoints(distributionOptions);
+
+            final String delim = createDelimiter(distributionOptions);
+            createHeader("x", dist, out, delim);
+
+            // Evaluate function at the points
+            final String format = distributionOptions.format;
+            final String xformat = distributionOptions.xformat;
+            for (final double x : points) {
+                out.format(xformat, x);
+                dist.forEach(d -> {
+                    out.print(delim);
+                    out.format(format, fun.apply(d.getDistribution(), x));
+                });
+                out.println();
+            }
+        }
+    }
+
+    /**
+     * Evaluate the continuous distribution inverse function.
+     *
+     * @param dist Distributions
+     * @param distributionOptions Distribution options
+     */
+    static void evaluate(List<Distribution<ContinuousDistribution>> dist,
+                         InverseContinuousDistributionOptions distributionOptions) {
+        try (PrintWriter out = createOutput(distributionOptions)) {
+            final ContinuousFunction fun = createFunction(distributionOptions);
+            final double[] points = createPoints(distributionOptions);
+
+            final String delim = createDelimiter(distributionOptions);
+            createHeader("p", dist, out, delim);
+
+            // Evaluate function at the points
+            final String format = distributionOptions.format;
+            final String xformat = distributionOptions.pformat;
+            for (final double p : points) {
+                out.format(xformat, p);
+                dist.forEach(d -> {
+                    out.print(delim);
+                    out.format(format, fun.apply(d.getDistribution(), p));
+                });
+                out.println();
+            }
+        }
+    }
+
+    /**
+     * Evaluate the discrete distribution function.
+     *
+     * @param dist Distributions
+     * @param distributionOptions Distribution options
+     */
+    static void evaluate(List<Distribution<DiscreteDistribution>> dist,
+                         DiscreteDistributionOptions distributionOptions) {
+        try (PrintWriter out = createOutput(distributionOptions)) {
+            final DiscreteFunction fun = createFunction(distributionOptions);
+            final int[] points = createPoints(distributionOptions);
+
+            final String delim = createDelimiter(distributionOptions);
+            createHeader("x", dist, out, delim);
+
+            // Evaluate function at the points
+            final String format = distributionOptions.format;
+            for (final int x : points) {
+                out.print(x);
+                dist.forEach(d -> {
+                    out.print(delim);
+                    out.format(format, fun.apply(d.getDistribution(), x));
+                });
+                out.println();
+            }
+        }
+    }
+
+    /**
+     * Evaluate the discrete distribution inverse function.
+     *
+     * @param dist Distributions
+     * @param distributionOptions Distribution options
+     */
+    static void evaluate(List<Distribution<DiscreteDistribution>> dist,
+                         InverseDiscreteDistributionOptions distributionOptions) {
+        try (PrintWriter out = createOutput(distributionOptions)) {
+            final InverseDiscreteFunction fun = createFunction(distributionOptions);
+            final double[] points = createPoints(distributionOptions);
+
+            final String delim = createDelimiter(distributionOptions);
+            createHeader("p", dist, out, delim);
+
+            // Evaluate function at the points
+            final String format = distributionOptions.pformat;
+            for (final double p : points) {
+                out.format(format, p);
+                dist.forEach(d -> {
+                    out.print(delim);
+                    out.print(fun.apply(d.getDistribution(), p));
+                });
+                out.println();
+            }
+        }
+    }
+
+    /**
+     * Verification checks on the continuous distribution.
+     *
+     * @param dist Distributions
+     * @param distributionOptions Distribution options
+     */
+    static void check(List<Distribution<ContinuousDistribution>> dist,
+                      ContinuousDistributionOptions distributionOptions) {
+        try (PrintWriter out = createOutput(distributionOptions)) {
+            final double[] points = createPoints(distributionOptions);
+
+            dist.forEach(d -> {
+                final ContinuousDistribution dd = d.getDistribution();
+                final String title = dd.getClass().getSimpleName() + " " + d.getParameters();
+                // Note: Negation of equality checks will detect NaNs.
+                // Validate bounds
+                final double lower = dd.getSupportLowerBound();
+                final double upper = dd.getSupportUpperBound();
+                if (!(lower == dd.inverseCumulativeProbability(0))) {
+                    out.printf("%s lower icdf(0.0) : %s != %s", title, lower, dd.inverseCumulativeProbability(0));
+                }
+                if (!(upper == dd.inverseCumulativeProbability(1))) {
+                    out.printf("%s upper icdf(1.0) : %s != %s", title, upper, dd.inverseCumulativeProbability(1));
+                }
+                // Validate CDF + Survival == 1
+                for (final double x : points) {
+                    final double p1 = dd.cumulativeProbability(x);
+                    final double p2 = dd.survivalProbability(x);
+                    final double s = p1 + p2;
+                    if (!(Math.abs(1.0 - s) < 1e-10)) {
+                        out.printf("%s x=%s : cdf + survival != 1.0 : %s + %s%n", title, x, p1, p2);
+                    }
+                    // Verify x = icdf(cdf(x)). Ignore p-values close to the bounds.
+                    if (p1 <= 1e-6 || p1 >= 1.0 - 1e-6) {
+                        continue;
+                    }
+                    final double xx = dd.inverseCumulativeProbability(p1);
+                    final double dx = Math.abs(x - xx);
+                    // Absolute or relative error
+                    if (!(dx < 1e-10 || dx / Math.abs(x) < 1e-5)) {
+                        out.printf("%s x=%s : icdf(%s) : %s (cdf=%s)%n", title, x, p1, xx,
+                            dd.cumulativeProbability(xx));
+                    }
+                }
+                // Validate pdf and logpdf
+                for (final double x : points) {
+                    final double p1 = dd.density(x);
+                    final double p2 = dd.logDensity(x);
+                    if (!(Math.abs(Math.exp(p2) - p1) < 1e-10)) {
+                        out.printf("%s x=%s : pdf != exp(logpdf) : %s + %s%n", title, x, p1, Math.exp(p2));
+                    }
+                }
+            });
+        }
+    }
+
+    /**
+     * Verification checks on the discrete distribution.
+     *
+     * @param dist Distributions
+     * @param distributionOptions Distribution options
+     */
+    static void check(List<Distribution<DiscreteDistribution>> dist,
+                      DiscreteDistributionOptions distributionOptions) {
+        try (PrintWriter out = createOutput(distributionOptions)) {
+            final int[] points = createPoints(distributionOptions);
+
+            dist.forEach(d -> {
+                final DiscreteDistribution dd = d.getDistribution();
+                final String title = dd.getClass().getSimpleName() + " " + d.getParameters();
+                // Note: Negation of equality checks will detect NaNs.
+                // Validate bounds
+                final int lower = dd.getSupportLowerBound();
+                final int upper = dd.getSupportUpperBound();
+                if (!(lower == dd.inverseCumulativeProbability(0))) {
+                    out.printf("%s lower != icdf(0.0) : %d != %d", title, lower, dd.inverseCumulativeProbability(0));
+                }
+                if (!(upper == dd.inverseCumulativeProbability(1))) {
+                    out.printf("%s upper != icdf(1.0) : %d != %d", title, upper, dd.inverseCumulativeProbability(1));
+                }
+                // Validate CDF + Survival == 1
+                for (final int x : points) {
+                    final double p1 = dd.cumulativeProbability(x);
+                    final double p2 = dd.survivalProbability(x);
+                    final double s = p1 + p2;
+                    if (!(Math.abs(1.0 - s) < 1e-10)) {
+                        out.printf("%s x=%d : cdf + survival != 1.0 : %s + %s%n", title, x, p1, p2);
+                    }
+                    // Verify x = icdf(cdf(x)). Ignore p-values close to the bounds.
+                    if (p1 <= 1e-6 || p1 >= 1.0 - 1e-6) {
+                        continue;
+                    }
+                    final int xx = dd.inverseCumulativeProbability(p1);
+                    if (x != xx) {
+                        out.printf("%s x=%d : icdf(%s) : %d (cdf=%s)%n", title, x, p1, xx,
+                            dd.cumulativeProbability(xx));
+                    }
+                }
+                // Validate pmf and logpmf
+                for (final int x : points) {
+                    final double p1 = dd.probability(x);
+                    final double p2 = dd.logProbability(x);
+                    if (!(Math.abs(Math.exp(p2) - p1) < 1e-10)) {
+                        out.printf("%s x=%d : pmf != exp(logpmf) : %s + %s%n", title, x, p1, Math.exp(p2));
+                    }
+                }
+            });
+        }
+    }
+
+    /**
+     * Creates the output.
+     *
+     * @param distributionOptions Distribution options
+     * @return the print stream
+     */
+    private static PrintWriter createOutput(DistributionOptions distributionOptions) {
+        if (distributionOptions.outputFile != null) {
+            try {
+                return new PrintWriter(Files.newBufferedWriter(distributionOptions.outputFile.toPath()));
+            } catch (IOException ex) {
+                throw new UncheckedIOException("Failed to create output: " + distributionOptions.outputFile, ex);
+            }
+        }
+        return new PrintWriter(System.out) {
+            @Override
+            public void close() {
+                // Do not close stdout but flush the contents
+                flush();
+            }
+        };
+    }
+
+    /**
+     * Creates the delimiter.
+     *
+     * @param distributionOptions Distribution options
+     * @return the delimiter
+     */
+    private static String createDelimiter(DistributionOptions distributionOptions) {
+        final String delim = distributionOptions.delim;
+        // Unescape tabs. Do not support other escaped delimiters.
+        return delim.replace("\\t", "\t");
+    }
+
+    /**
+     * Creates the header.
+     *
+     * @param <T> Type of distribution
+     * @param xname Name for the evaluated point
+     * @param dist List of named distributions
+     * @param out Output
+     * @param delim Field delimiter
+     */
+    private static <T> void createHeader(String xname, List<Distribution<T>> dist, final PrintWriter out,
+        final String delim) {
+        // Create header
+        out.print(xname);
+        dist.forEach(d -> {
+            out.print(delim);
+            out.print(d.getParameters());
+        });
+        out.println();
+    }
+
+    /**
+     * Creates the function.
+     *
+     * @param distributionOptions Distribution options
+     * @return the function
+     */
+    private static ContinuousFunction createFunction(ContinuousDistributionOptions distributionOptions) {
+        ContinuousFunction f;
+        switch (distributionOptions.distributionFunction) {
+        case PDF:
+            f = ContinuousDistribution::density;
+            break;
+        case LPDF:
+            f = ContinuousDistribution::logDensity;
+            break;
+        case CDF:
+            f = ContinuousDistribution::cumulativeProbability;
+            break;
+        case Survival:
+            f = ContinuousDistribution::survivalProbability;
+            break;
+        default:
+            throw new IllegalArgumentException(UNKNOWN_FUNCTION + distributionOptions.distributionFunction);
+        }
+        if (!distributionOptions.suppressException) {
+            return f;
+        }
+        return new ContinuousFunction() {
+            @Override
+            public double apply(ContinuousDistribution dist, double x) {
+                try {
+                    return f.apply(dist, x);
+                } catch (IllegalArgumentException ex) {
+                    // Ignore
+                    return Double.NaN;
+                }
+            }
+        };
+    }
+
+    /**
+     * Creates the function.
+     *
+     * @param distributionOptions Distribution options
+     * @return the function
+     */
+    private static DiscreteFunction createFunction(DiscreteDistributionOptions distributionOptions) {
+        DiscreteFunction f;
+        switch (distributionOptions.distributionFunction) {
+        case PMF:
+            f = DiscreteDistribution::probability;
+            break;
+        case LPMF:
+            f = DiscreteDistribution::logProbability;
+            break;
+        case CDF:
+            f = DiscreteDistribution::cumulativeProbability;
+            break;
+        case Survival:
+            f = DiscreteDistribution::survivalProbability;
+            break;
+        default:
+            throw new IllegalArgumentException(UNKNOWN_FUNCTION + distributionOptions.distributionFunction);
+        }
+        if (!distributionOptions.suppressException) {
+            return f;
+        }
+        return new DiscreteFunction() {
+            @Override
+            public double apply(DiscreteDistribution dist, int x) {
+                try {
+                    return f.apply(dist, x);
+                } catch (IllegalArgumentException ex) {
+                    // Ignore
+                    return Double.NaN;
+                }
+            }
+        };
+    }
+
+    /**
+     * Creates the function.
+     *
+     * @param distributionOptions Distribution options
+     * @return the function
+     */
+    private static ContinuousFunction createFunction(InverseContinuousDistributionOptions distributionOptions) {
+        if (!distributionOptions.suppressException) {
+            return ContinuousDistribution::inverseCumulativeProbability;
+        }
+        return new ContinuousFunction() {
+            @Override
+            public double apply(ContinuousDistribution dist, double x) {
+                try {
+                    return dist.inverseCumulativeProbability(x);
+                } catch (IllegalArgumentException ex) {
+                    // Ignore
+                    return Double.NaN;
+                }
+            }
+        };
+    }
+
+    /**
+     * Creates the function.
+     *
+     * @param distributionOptions Distribution options
+     * @return the function
+     */
+    private static InverseDiscreteFunction createFunction(InverseDiscreteDistributionOptions distributionOptions) {
+        if (!distributionOptions.suppressException) {
+            return DiscreteDistribution::inverseCumulativeProbability;
+        }
+        return new InverseDiscreteFunction() {
+            @Override
+            public int apply(DiscreteDistribution dist, double x) {
+                try {
+                    return dist.inverseCumulativeProbability(x);
+                } catch (IllegalArgumentException ex) {
+                    // Ignore
+                    return Integer.MIN_VALUE;
+                }
+            }
+        };
+    }
+
+    /**
+     * Creates the points.
+     *
+     * @param distributionOptions Distribution options
+     * @return the points
+     */
+    private static double[] createPoints(ContinuousDistributionOptions distributionOptions) {
+        if (distributionOptions.x != null) {
+            return distributionOptions.x;
+        }
+        if (distributionOptions.inputFile != null) {
+            return readDoublePoints(distributionOptions.inputFile);
+        }
+        return enumerate(distributionOptions.min, distributionOptions.max,
+            distributionOptions.steps);
+    }
+
+    /**
+     * Creates the points.
+     *
+     * @param distributionOptions Distribution options
+     * @return the points
+     */
+    private static int[] createPoints(DiscreteDistributionOptions distributionOptions) {
+        if (distributionOptions.x != null) {
+            return distributionOptions.x;
+        }
+        if (distributionOptions.inputFile != null) {
+            return readIntPoints(distributionOptions.inputFile);
+        }
+        return series(distributionOptions.min, distributionOptions.max,
+            distributionOptions.increment);
+    }
+
+    /**
+     * Creates the points.
+     *
+     * @param distributionOptions Distribution options
+     * @return the points
+     */
+    private static double[] createPoints(InverseDiscreteDistributionOptions distributionOptions) {
+        if (distributionOptions.x != null) {
+            return distributionOptions.x;
+        }
+        if (distributionOptions.inputFile != null) {
+            return readDoublePoints(distributionOptions.inputFile);
+        }
+        return enumerate(distributionOptions.min, distributionOptions.max,
+            distributionOptions.steps);
+    }
+
+    /**
+     * Read the {@code double} valued points from the input file.
+     *
+     * @param inputFile the input file
+     * @return the points
+     */
+    private static double[] readDoublePoints(File inputFile) {
+        double[] points = new double[10];
+        int size = 0;
+        try (BufferedReader in = Files.newBufferedReader(inputFile.toPath())) {
+            for (String line = in.readLine(); line != null; line = in.readLine()) {
+                final double x = Double.parseDouble(line);
+                if (points.length == size) {
+                    points = Arrays.copyOf(points, size * 2);
+                }
+                points[size++] = x;
+            }
+        } catch (final IOException e) {
+            throw new UncheckedIOException(e);
+        } catch (final NumberFormatException e) {
+            throw new RuntimeException("Input file should contain a real number on each line", e);
+        }
+        return Arrays.copyOf(points, size);
+    }
+
+    /**
+     * Read the {@code int} valued points from the input file.
+     *
+     * @param inputFile the input file
+     * @return the points
+     */
+    private static int[] readIntPoints(File inputFile) {
+        int[] points = new int[10];
+        int size = 0;
+        try (BufferedReader in = Files.newBufferedReader(inputFile.toPath())) {
+            for (String line = in.readLine(); line != null; line = in.readLine()) {
+                final int x = Integer.parseInt(line);
+                if (points.length == size) {
+                    points = Arrays.copyOf(points, size * 2);
+                }
+                points[size++] = x;
+            }
+        } catch (final IOException e) {
+            throw new UncheckedIOException(e);
+        } catch (final NumberFormatException e) {
+            throw new RuntimeException("Input file should contain an integer on each line", e);
+        }
+        return Arrays.copyOf(points, size);
+    }
+
+    /**
+     * Enumerate from min to max using the specified number of steps.
+     *
+     * @param min the min
+     * @param max the max
+     * @param steps the steps
+     * @return the enumeration
+     */
+    private static double[] enumerate(double min, double max, int steps) {
+        if (!Double.isFinite(min)) {
+            throw new IllegalArgumentException("Invalid minimum: " + min);
+        }
+        if (!Double.isFinite(max)) {
+            throw new IllegalArgumentException("Invalid maximum: " + max);
+        }
+        if (min == max) {
+            return new double[] {min};
+        }
+        final double[] x = new double[steps + 1];
+        final double dx = (max - min) / steps;
+        for (int i = 0; i < steps; i++) {
+            x[i] = min + i * dx;
+        }
+        x[steps] = max;
+        return x;
+    }
+
+    /**
+     * Enumerate from min to max using the specified increment.
+     *
+     * @param min the min
+     * @param max the max
+     * @param increment the increment
+     * @return the series
+     */
+    private static int[] series(int min, int max, int increment) {
+        if (min == max) {
+            return new int[] {min};
+        }
+        final int steps = (int) Math.ceil((double) (max - min) / increment);
+        final int[] x = new int[steps + 1];
+        for (int i = 0; i < steps; i++) {
+            x[i] = min + i * increment;
+        }
+        x[steps] = max;
+        return x;
+    }
+
+    /**
+     * Validate the parameter array lengths are either 1 or n. Returns the maximum length (n).
+     *
+     * <p>Note: It is assumed lengths of 1 can be expanded to length n using an array fill
+     * operation.
+     *
+     * @param lengths the lengths
+     * @return n
+     * @throws IllegalArgumentException If a length is between 1 and n.
+     */
+    static int validateLengths(int... lengths) {
+        int max = 0;
+        for (final int l : lengths) {
+            max = max < l ? l : max;
+        }
+        // Validate
+        for (final int l : lengths) {
+            if (l != 1 && l != max) {
+                throw new IllegalArgumentException(
+                    "Invalid parameter array length: " + l +
+                    ". Lengths must by either 1 or the maximum (" + max + ").");
+            }
+        }
+        return max;
+    }
+
+    /**
+     * Expand the array to the specified length. The array is filled with the value at
+     * index zero if a new array is created.
+     *
+     *  <p>Returns the original array if it is the correct length.
+     *
+     * @param array Array
+     * @param n Length
+     * @return expanded array
+     */
+    static double[] expandToLength(double[] array, int n) {
+        if (array.length != n) {
+            array = Arrays.copyOf(array, n);
+            Arrays.fill(array, array[0]);
+        }
+        return array;
+    }
+
+    /**
+     * Expand the array to the specified length. The array is filled with the value at
+     * index zero if a new array is created.
+     *
+     *  <p>Returns the original array if it is the correct length.
+     *
+     * @param array Array
+     * @param n Length
+     * @return expanded array
+     */
+    static int[] expandToLength(int[] array, int n) {
+        if (array.length != n) {
+            array = Arrays.copyOf(array, n);
+            Arrays.fill(array, array[0]);
+        }
+        return array;
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionsApplication.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionsApplication.java
new file mode 100644
index 0000000..c5fac71
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/DistributionsApplication.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import picocli.CommandLine;
+import picocli.CommandLine.Command;
+
+/**
+ * Construct instances of probability distributions using the Commons Statistics library.
+ * Output values from the distribution functions: PDF; CDF; Survival Function; and Inverse CDF.
+ */
+public final class DistributionsApplication {
+
+    // Implementation Notes
+    //
+    // This application constructs distribution instances of the Commons Statistics library
+    // and calls the standard distribution functions:
+    //
+    // PDF(x)          Probability Density Function (continuous distributions)
+    // PMF(x)          Probability Mass Function (discrete distributions)
+    // CDF(x)          Cumulative Probability Function
+    // Survival(x)     Survival Probability Function
+    // InverseCDF(p)   Inverse Cumulative Probability Function
+    //
+    // There is very little logic in the application. All the classes serve to provide
+    // commands for annotation with the PicoCLI library. Each command must have an annotated
+    // instance. Since the functions (pdf, pmf, icdf) require different arguments
+    // (x real, x int, p-value) this implementation
+    // avoids using the function as an option to avoid specifying a generic set of parameters
+    // covering both input x as real or integer and input probability as real in [0, 1].
+    // This creates many classes with the same structure. Maintenance is possible using
+    // carefully constructed regex replacements across the Command classes.
+    //
+    // Note that PicoCLI constructs classes using the no arguments constructor. Thus any
+    // defaults for arguments must be declared inline (for primitives) or set in the no
+    // arguments constructor for objects. Reusing the same options class instantiated with
+    // arguments to the constructor to set default values is ignored when the option is
+    // changed by a command line argument. In this case PicoCLI will create
+    // a new instance with the no arguments constructor and the overridden values are lost.
+    //
+    // Discrete distributions have a PMF. For convenience this has an alias
+    // as pdf so all distributions can be called using the same syntax.
+    // Aliases have been used for the distribution names to shorten commands.
+
+    /** No public constructor. */
+    private DistributionsApplication() {}
+
+    /**
+     * Specification for the top-level command in the examples distributions application.
+     *
+     * <p>This command will print the top-level help message.</p>
+     */
+    @Command(name = "distributions",
+             description = "Apache Commons Statistics Distribution Utilities.",
+             subcommands = {
+                 BetaCommand.class,
+                 BinomialCommand.class,
+                 CauchyCommand.class,
+                 ChiSquaredCommand.class,
+                 ExpCommand.class,
+                 FCommand.class,
+                 GammaCommand.class,
+                 GeometricCommand.class,
+                 GumbelCommand.class,
+                 HypergeometricCommand.class,
+                 LaplaceCommand.class,
+                 LevyCommand.class,
+                 LogisticCommand.class,
+                 LogNormalCommand.class,
+                 NakagamiCommand.class,
+                 NormalCommand.class,
+                 ParetoCommand.class,
+                 PascalCommand.class,
+                 PoissonCommand.class,
+                 TCommand.class,
+                 TriangularCommand.class,
+                 TruncatedNormalCommand.class,
+                 UniformContinuousCommand.class,
+                 UniformDiscreteCommand.class,
+                 WeibullCommand.class,
+                 ZipfCommand.class,
+             })
+    static class DistributionsCommand extends AbstractDistributionCommand {
+        // Nothing to do
+    }
+
+    /**
+     * Run the Statistics examples command line application.
+     *
+     * @param args Application's arguments.
+     */
+    public static void main(String[] args) {
+        // The command line is built using annotations
+        final CommandLine cmd = new CommandLine(new DistributionsCommand());
+        System.exit(cmd.execute(args));
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ExpCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ExpCommand.java
new file mode 100644
index 0000000..e9ac1e7
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ExpCommand.java
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.ExponentialDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link ExponentialDistribution}.
+ */
+@Command(name = "exp",
+         description = "Exponential distribution.",
+         subcommands = {
+             ExpCommand.Check.class,
+             ExpCommand.PDF.class,
+             ExpCommand.LPDF.class,
+             ExpCommand.CDF.class,
+             ExpCommand.Survival.class,
+             ExpCommand.ICDF.class,
+         })
+class ExpCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution mean. */
+            @Option(names = {"-m", "--mean", "--scale"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"mean (scale) (default: ${DEFAULT-VALUE})."})
+            private double[] mean = {2, 1, 2.0 / 3};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 5;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (final double m : params.mean) {
+                final ContinuousDistribution d = new ExponentialDistribution(m);
+                list.add(new Distribution<>(d, "mean=" + m));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Exponential distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Exponential distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Exponential distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Exponential distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Exponential distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Exponential distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/FCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/FCommand.java
new file mode 100644
index 0000000..9d32298
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/FCommand.java
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.FDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link FDistribution}.
+ */
+@Command(name = "f",
+         description = "F distribution.",
+         subcommands = {
+             FCommand.Check.class,
+             FCommand.PDF.class,
+             FCommand.LPDF.class,
+             FCommand.CDF.class,
+             FCommand.Survival.class,
+             FCommand.ICDF.class,
+         })
+class FCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution df1. */
+            @Option(names = {"--df1", "--numerator-degrees-of-freedom"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"numerator degrees-of-freedom (default: ${DEFAULT-VALUE})."})
+            private double[] df1 = {1, 2, 5, 10, 100};
+
+            /** The distribution df2. */
+            @Option(names = {"--df2", "--denominator-degrees-of-freedom"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"denominator degrees-of-freedom (default: ${DEFAULT-VALUE})."})
+            private double[] df2 = {1, 1, 2, 1, 100};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 5;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] df1 = params.df1;
+            double[] df2 = params.df2;
+            final int n = DistributionUtils.validateLengths(df1.length, df2.length);
+
+            df1 = DistributionUtils.expandToLength(df1, n);
+            df2 = DistributionUtils.expandToLength(df2, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new FDistribution(df1[i], df2[i]);
+                list.add(new Distribution<>(d, "df1=" + df1[i] + ",df2=" + df2[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "F distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "F distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "F distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "F distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "F distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "F distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/GammaCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/GammaCommand.java
new file mode 100644
index 0000000..dfb4418
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/GammaCommand.java
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.GammaDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link GammaDistribution}.
+ */
+@Command(name = "gamma",
+         aliases = {"gam"},
+         description = "Gamma distribution.",
+         subcommands = {
+             GammaCommand.Check.class,
+             GammaCommand.PDF.class,
+             GammaCommand.LPDF.class,
+             GammaCommand.CDF.class,
+             GammaCommand.Survival.class,
+             GammaCommand.ICDF.class,
+         })
+class GammaCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution shape. */
+            @Option(names = {"-k", "--shape"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"shape (default: ${DEFAULT-VALUE})."})
+            private double[] shape = {1, 2, 3, 5, 9, 7.5, 0.5};
+
+            /** The distribution scale. */
+            @Option(names = {"-t", "--scale"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"scale (default: ${DEFAULT-VALUE})."})
+            private double[] scale = {2, 2, 2, 1, 0.5, 1, 1};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 20;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] shape = params.shape;
+            double[] scale = params.scale;
+            final int n = DistributionUtils.validateLengths(shape.length, scale.length);
+
+            shape = DistributionUtils.expandToLength(shape, n);
+            scale = DistributionUtils.expandToLength(scale, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new GammaDistribution(shape[i], scale[i]);
+                list.add(new Distribution<>(d, "shape=" + shape[i] + ",scale=" + scale[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Gamma distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Gamma distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Gamma distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Gamma distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Gamma distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Gamma distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/GeometricCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/GeometricCommand.java
new file mode 100644
index 0000000..85a721d
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/GeometricCommand.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.DiscreteDistribution;
+import org.apache.commons.statistics.distribution.GeometricDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link GeometricDistribution}.
+ */
+@Command(name = "geometric",
+         aliases = {"geo"},
+         description = "Geometric distribution.",
+         subcommands = {
+             GeometricCommand.Check.class,
+             GeometricCommand.PMF.class,
+             GeometricCommand.LPMF.class,
+             GeometricCommand.CDF.class,
+             GeometricCommand.Survival.class,
+             GeometricCommand.ICDF.class,
+         })
+class GeometricCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractDiscreteDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution probability of success. */
+            @Option(names = {"-p", "--probability"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"probability of success (default: ${DEFAULT-VALUE})."})
+            private double[] p = {0.2, 0.5, 0.8};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends DiscreteDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 10;
+            }
+        }
+
+        @Override
+        protected List<Distribution<DiscreteDistribution>> getDistributions() {
+            // Create distributions
+            final ArrayList<Distribution<DiscreteDistribution>> list = new ArrayList<>();
+            for (final double prob : params.p) {
+                final DiscreteDistribution d = new GeometricDistribution(prob);
+                list.add(new Distribution<>(d, "p=" + prob));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Geometric distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PMF command. */
+    @Command(name = "pmf",
+             aliases = {"pdf"},
+             description = "Geometric distribution PMF.")
+    static class PMF extends ProbabilityCommand {}
+
+    /** LPMF command. */
+    @Command(name = "lpmf",
+             aliases = {"lpdf"},
+             description = "Geometric distribution natural logarithm of the PMF.")
+    static class LPMF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Geometric distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Geometric distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Geometric distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseDiscreteDistributionOptions distributionOptions = new InverseDiscreteDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/GumbelCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/GumbelCommand.java
new file mode 100644
index 0000000..1f073a3
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/GumbelCommand.java
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.GumbelDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link GumbelDistribution}.
+ */
+@Command(name = "gumbel",
+         description = "Gumbel distribution.",
+         subcommands = {
+             GumbelCommand.Check.class,
+             GumbelCommand.PDF.class,
+             GumbelCommand.LPDF.class,
+             GumbelCommand.CDF.class,
+             GumbelCommand.Survival.class,
+             GumbelCommand.ICDF.class,
+         })
+class GumbelCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution location. */
+            @Option(names = {"--mu", "--location"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"location (default: ${DEFAULT-VALUE})."})
+            private double[] mu = {0.5, 1, 1.5, 3};
+
+            /** The distribution scale. */
+            @Option(names = {"--beta", "--scale"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"scale (default: ${DEFAULT-VALUE})."})
+            private double[] beta = {2, 2, 3, 4};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = -5;
+                max = 20;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] location = params.mu;
+            double[] scale = params.beta;
+            final int n = DistributionUtils.validateLengths(location.length, scale.length);
+
+            location = DistributionUtils.expandToLength(location, n);
+            scale = DistributionUtils.expandToLength(scale, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new GumbelDistribution(location[i], scale[i]);
+                list.add(new Distribution<>(d, "mu=" + location[i] + ",beta=" + scale[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Gumbel distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Gumbel distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Gumbel distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Gumbel distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Gumbel distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Gumbel distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/HypergeometricCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/HypergeometricCommand.java
new file mode 100644
index 0000000..13062bb
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/HypergeometricCommand.java
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.DiscreteDistribution;
+import org.apache.commons.statistics.distribution.HypergeometricDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link HypergeometricDistribution}.
+ */
+@Command(name = "hypergeometric",
+         aliases = {"hyge"},
+         description = "Hypergeometric distribution.",
+         subcommands = {
+             HypergeometricCommand.Check.class,
+             HypergeometricCommand.PMF.class,
+             HypergeometricCommand.LPMF.class,
+             HypergeometricCommand.CDF.class,
+             HypergeometricCommand.Survival.class,
+             HypergeometricCommand.ICDF.class,
+         })
+class HypergeometricCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractDiscreteDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution N. */
+            @Option(names = {"-N", "--population-size"},
+                    paramLabel = "N",
+                    arity = "1..*",
+                    split = ",",
+                    description = {"population size (default: ${DEFAULT-VALUE})."})
+            private int[] popSize = {500};
+
+            /** The distribution successes. */
+            @Option(names = {"-K", "--number-of-successes"},
+                    paramLabel = "K",
+                    arity = "1..*",
+                    split = ",",
+                    description = {"number of successes (default: ${DEFAULT-VALUE})."})
+            private int[] successes = {50, 60, 70};
+
+            /** The distribution n. */
+            @Option(names = {"-n", "--sample-size"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"sample size (default: ${DEFAULT-VALUE})."})
+            private int[] n = {100, 200, 300};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends DiscreteDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 60;
+            }
+        }
+
+        @Override
+        protected List<Distribution<DiscreteDistribution>> getDistributions() {
+            int[] popSize = params.popSize;
+            int[] successes = params.successes;
+            int[] n = params.n;
+            final int max = DistributionUtils.validateLengths(popSize.length, successes.length);
+
+            popSize = DistributionUtils.expandToLength(popSize, max);
+            successes = DistributionUtils.expandToLength(successes, max);
+            n = DistributionUtils.expandToLength(n, max);
+
+            // Create distributions
+            final ArrayList<Distribution<DiscreteDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < max; i++) {
+                final DiscreteDistribution d = new HypergeometricDistribution(popSize[i], successes[i], n[i]);
+                list.add(new Distribution<>(d, "N=" + popSize[i] + ",K=" + successes[i] + ",n=" + n[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Hypergeometric distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PMF command. */
+    @Command(name = "pmf",
+             aliases = {"pdf"},
+             description = "Hypergeometric distribution PMF.")
+    static class PMF extends ProbabilityCommand {}
+
+    /** LPMF command. */
+    @Command(name = "lpmf",
+             aliases = {"lpdf"},
+             description = "Hypergeometric distribution natural logarithm of the PMF.")
+    static class LPMF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Hypergeometric distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Hypergeometric distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Hypergeometric distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseDiscreteDistributionOptions distributionOptions = new InverseDiscreteDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/InverseContinuousDistributionOptions.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/InverseContinuousDistributionOptions.java
new file mode 100644
index 0000000..62b93ac
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/InverseContinuousDistributionOptions.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import picocli.CommandLine.Option;
+
+/**
+ * Options for inverse probability functions of continuous distributions.
+ * Applies to functions x=real in [0, 1] and f(x)=real.
+ */
+class InverseContinuousDistributionOptions extends InverseDiscreteDistributionOptions {
+    /** The format for the output values. */
+    @Option(names = { "--format" },
+            description = {"Format for the output values (default: ${DEFAULT-VALUE})."})
+    protected String format = "%s";
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/InverseDiscreteDistributionOptions.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/InverseDiscreteDistributionOptions.java
new file mode 100644
index 0000000..1c07ef1
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/InverseDiscreteDistributionOptions.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import picocli.CommandLine.Option;
+
+/**
+ * Options for inverse probability functions of discrete distributions.
+ * Applies to functions x=real in [0, 1] and f(x)=integer.
+ */
+class InverseDiscreteDistributionOptions extends DistributionOptions {
+    /** The minimum probability to evaluate. */
+    @Option(names = { "--min" },
+            description = {"Minimum probability to evaluate (default: ${DEFAULT-VALUE})."})
+    protected double min;
+
+    /** The maximum probability to evaluate. */
+    @Option(names = { "--max" },
+            description = {"Maximum probability to evaluate (default: ${DEFAULT-VALUE})."})
+    protected double max = 1;
+
+    /** The number of steps from minimum to the maximum. */
+    @Option(names = { "--steps" },
+            description = {"Number of steps from the minimum to the maximum (default: ${DEFAULT-VALUE})."})
+    protected int steps = 100;
+
+    /** The single point to evaluate. */
+    @Option(names = { "-x", "--point" },
+            arity = "1..*",
+            split = ",",
+            description = {"Point to evaluate (overrides input range)."})
+    protected double[] x;
+
+    /** The format for the evaluated probability. */
+    @Option(names = { "--pformat" },
+            description = {"Format for the evaluated probability (default: ${DEFAULT-VALUE})."})
+    protected String pformat = "%.6g";
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LaplaceCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LaplaceCommand.java
new file mode 100644
index 0000000..96b0f4d
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LaplaceCommand.java
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.LaplaceDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link LaplaceDistribution}.
+ */
+@Command(name = "laplace",
+         description = "Laplace distribution.",
+         subcommands = {
+             LaplaceCommand.Check.class,
+             LaplaceCommand.PDF.class,
+             LaplaceCommand.LPDF.class,
+             LaplaceCommand.CDF.class,
+             LaplaceCommand.Survival.class,
+             LaplaceCommand.ICDF.class,
+         })
+class LaplaceCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution location. */
+            @Option(names = {"--mu", "--location"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"location (default: ${DEFAULT-VALUE})."})
+            private double[] mu = {0, 0, 0, -5};
+
+            /** The distribution scale. */
+            @Option(names = {"--beta", "--scale"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"scale (default: ${DEFAULT-VALUE})."})
+            private double[] beta = {1, 2, 4, 4};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = -10;
+                max = 10;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] location = params.mu;
+            double[] scale = params.beta;
+            final int n = DistributionUtils.validateLengths(location.length, scale.length);
+
+            location = DistributionUtils.expandToLength(location, n);
+            scale = DistributionUtils.expandToLength(scale, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new LaplaceDistribution(location[i], scale[i]);
+                list.add(new Distribution<>(d, "mu=" + location[i] + ",beta=" + scale[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Laplace distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Laplace distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Laplace distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Laplace distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Laplace distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Laplace distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LevyCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LevyCommand.java
new file mode 100644
index 0000000..a4b64e6
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LevyCommand.java
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.LevyDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link LevyDistribution}.
+ */
+@Command(name = "levy",
+         description = "Levy distribution.",
+         subcommands = {
+             LevyCommand.Check.class,
+             LevyCommand.PDF.class,
+             LevyCommand.LPDF.class,
+             LevyCommand.CDF.class,
+             LevyCommand.Survival.class,
+             LevyCommand.ICDF.class,
+         })
+class LevyCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution location. */
+            @Option(names = {"--mu", "--location"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"location (default: ${DEFAULT-VALUE})."})
+            private double[] mu = {0};
+
+            /** The distribution scale. */
+            @Option(names = {"-c", "--scale"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"scale (default: ${DEFAULT-VALUE})."})
+            private double[] c = {0.5, 1, 2, 4, 8};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 3;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] location = params.mu;
+            double[] scale = params.c;
+            final int n = DistributionUtils.validateLengths(location.length, scale.length);
+
+            location = DistributionUtils.expandToLength(location, n);
+            scale = DistributionUtils.expandToLength(scale, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new LevyDistribution(location[i], scale[i]);
+                list.add(new Distribution<>(d, "mu=" + location[i] + ",c=" + scale[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Levy distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Levy distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Levy distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Levy distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Levy distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Levy distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LogNormalCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LogNormalCommand.java
new file mode 100644
index 0000000..35626bf
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LogNormalCommand.java
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.LogNormalDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link LogNormalDistribution}.
+ */
+@Command(name = "lognormal",
+         aliases = {"lnorm", "logn"},
+         description = "Log-normal distribution.",
+         subcommands = {
+             LogNormalCommand.Check.class,
+             LogNormalCommand.PDF.class,
+             LogNormalCommand.LPDF.class,
+             LogNormalCommand.CDF.class,
+             LogNormalCommand.Survival.class,
+             LogNormalCommand.ICDF.class,
+         })
+class LogNormalCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution mean. */
+            @Option(names = {"-m", "--mu", "--mean"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"mean of variable's natural logarithm (default: ${DEFAULT-VALUE})."})
+            private double[] mu = {0};
+
+            /** The distribution sigma. */
+            @Option(names = {"-s", "--sigma"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"standard deviation of variable's natural logarithm (default: ${DEFAULT-VALUE})."})
+            private double[] sigma = {0.125, 0.25, 0.5, 1, 1.5, 10};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 3;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] mean = params.mu;
+            double[] sigma = params.sigma;
+            final int n = DistributionUtils.validateLengths(mean.length, sigma.length);
+
+            mean = DistributionUtils.expandToLength(mean, n);
+            sigma = DistributionUtils.expandToLength(sigma, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new LogNormalDistribution(mean[i], sigma[i]);
+                list.add(new Distribution<>(d, "mu=" + mean[i] + ",sigma=" + sigma[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Log-normal distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Log-normal distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Log-normal distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Log-normal distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Log-normal distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Log-normal distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LogisticCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LogisticCommand.java
new file mode 100644
index 0000000..f53dfc3
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/LogisticCommand.java
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.LogisticDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link LogisticDistribution}.
+ */
+@Command(name = "logistic",
+         description = "Logistic distribution.",
+         subcommands = {
+             LogisticCommand.Check.class,
+             LogisticCommand.PDF.class,
+             LogisticCommand.LPDF.class,
+             LogisticCommand.CDF.class,
+             LogisticCommand.Survival.class,
+             LogisticCommand.ICDF.class,
+         })
+class LogisticCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution location. */
+            @Option(names = {"--mu", "--location"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"location (default: ${DEFAULT-VALUE})."})
+            private double[] mu = {5, 9, 9, 6, 2};
+
+            /** The distribution scale. */
+            @Option(names = {"-s", "--scale"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"scale (default: ${DEFAULT-VALUE})."})
+            private double[] s = {2, 3, 4, 2, 1};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = -5;
+                max = 20;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] location = params.mu;
+            double[] scale = params.s;
+            final int n = DistributionUtils.validateLengths(location.length, scale.length);
+
+            location = DistributionUtils.expandToLength(location, n);
+            scale = DistributionUtils.expandToLength(scale, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new LogisticDistribution(location[i], scale[i]);
+                list.add(new Distribution<>(d, "mu=" + location[i] + ",s=" + scale[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Logistic distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Logistic distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Logistic distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Logistic distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Logistic distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Logistic distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ManifestVersionProvider.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ManifestVersionProvider.java
new file mode 100644
index 0000000..1fb3391
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ManifestVersionProvider.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+import picocli.CommandLine.IVersionProvider;
+
+/**
+ * {@link IVersionProvider} implementation that returns version information from
+ * the package jar file's {@code /META-INF/MANIFEST.MF} file.
+ *
+ * @see <a
+ * href="https://github.com/remkop/picocli/blob/master/picocli-examples/src/main/java/picocli/examples/VersionProviderDemo2.java">PicoCLI
+ * version provider demo</a>
+ */
+class ManifestVersionProvider implements IVersionProvider {
+    /** The manifest key for the implementation title. */
+    private static final String KEY = "Implementation-Title";
+
+    /** {@inheritDoc} */
+    @Override
+    public String[] getVersion() throws Exception {
+        final Enumeration<URL> resources = Thread.currentThread().getContextClassLoader()
+                                           .getResources("META-INF/MANIFEST.MF");
+        while (resources.hasMoreElements()) {
+            final URL url = resources.nextElement();
+            try (InputStream stream = url.openStream()) {
+                final Manifest manifest = new Manifest(stream);
+                if (isApplicableManifest(manifest)) {
+                    final Attributes attr = manifest.getMainAttributes();
+                    return new String[] {get(attr, KEY) + " version \"" +
+                                         get(attr, "Implementation-Version") + "\""};
+                }
+            } catch (final IOException ex) {
+                return new String[] {"Unable to read from " + url + ". " + ex};
+            }
+        }
+        return new String[0];
+    }
+
+    /**
+     * Checks if this is the applicable manifest for the package.
+     *
+     * @param manifest The manifest.
+     * @return true if is the applicable manifest
+     */
+    private static boolean isApplicableManifest(Manifest manifest) {
+        final Attributes attributes = manifest.getMainAttributes();
+        return "Apache Commons Statistics Distribution Utilities".equals(get(attributes, KEY));
+    }
+
+    /**
+     * Gets the named object from the attributes using the key.
+     *
+     * @param attributes The attributes.
+     * @param key The key.
+     * @return the object
+     */
+    private static Object get(Attributes attributes, String key) {
+        return attributes.get(new Attributes.Name(key));
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/NakagamiCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/NakagamiCommand.java
new file mode 100644
index 0000000..1d6f024
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/NakagamiCommand.java
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.NakagamiDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link NakagamiDistribution}.
+ */
+@Command(name = "nakagami",
+         description = "Nakagami distribution.",
+         subcommands = {
+             NakagamiCommand.Check.class,
+             NakagamiCommand.PDF.class,
+             NakagamiCommand.LPDF.class,
+             NakagamiCommand.CDF.class,
+             NakagamiCommand.Survival.class,
+             NakagamiCommand.ICDF.class,
+         })
+class NakagamiCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution shape. */
+            @Option(names = {"--mu", "--shape"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"shape (default: ${DEFAULT-VALUE})."})
+            private double[] mu = {0.5, 1, 1, 1, 2, 2, 5};
+
+            /** The distribution scale. */
+            @Option(names = {"--omega", "--scale"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"scale (default: ${DEFAULT-VALUE})."})
+            private double[] omega = {1, 1, 2, 3, 1, 2, 1};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 3;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] shape = params.mu;
+            double[] scale = params.omega;
+            final int n = DistributionUtils.validateLengths(shape.length, scale.length);
+
+            shape = DistributionUtils.expandToLength(shape, n);
+            scale = DistributionUtils.expandToLength(scale, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new NakagamiDistribution(shape[i], scale[i]);
+                list.add(new Distribution<>(d, "mu=" + shape[i] + ",omega=" + scale[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Nakagami distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Nakagami distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Nakagami distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Nakagami distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Nakagami distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Nakagami distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/NormalCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/NormalCommand.java
new file mode 100644
index 0000000..fadf8ef
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/NormalCommand.java
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.NormalDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link NormalDistribution}.
+ */
+@Command(name = "normal",
+         aliases = {"norm"},
+         description = "Normal distribution.",
+         subcommands = {
+             NormalCommand.Check.class,
+             NormalCommand.PDF.class,
+             NormalCommand.LPDF.class,
+             NormalCommand.CDF.class,
+             NormalCommand.Survival.class,
+             NormalCommand.ICDF.class,
+         })
+class NormalCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution mean. */
+            @Option(names = {"-m", "--mu", "--mean"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"mean (default: ${DEFAULT-VALUE})."})
+            private double[] mu = {0, 0, 0, -2};
+
+            /** The distribution sigma. */
+            @Option(names = {"-s", "--sigma"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"standard deviation (default: ${DEFAULT-VALUE})."})
+            // Define using variance
+            private double[] sigma = {Math.sqrt(0.2), 1, Math.sqrt(5), Math.sqrt(0.5)};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = -5;
+                max = 5;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] mean = params.mu;
+            double[] sigma = params.sigma;
+            final int n = DistributionUtils.validateLengths(mean.length, sigma.length);
+
+            mean = DistributionUtils.expandToLength(mean, n);
+            sigma = DistributionUtils.expandToLength(sigma, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new NormalDistribution(mean[i], sigma[i]);
+                list.add(new Distribution<>(d, "mu=" + mean[i] + ",sigma=" + sigma[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Normal distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Normal distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Normal distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Normal distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Normal distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Normal distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ParetoCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ParetoCommand.java
new file mode 100644
index 0000000..efa018e
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ParetoCommand.java
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.ParetoDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link ParetoDistribution}.
+ */
+@Command(name = "pareto",
+         description = "Pareto distribution.",
+         subcommands = {
+             ParetoCommand.Check.class,
+             ParetoCommand.PDF.class,
+             ParetoCommand.LPDF.class,
+             ParetoCommand.CDF.class,
+             ParetoCommand.Survival.class,
+             ParetoCommand.ICDF.class,
+         })
+class ParetoCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution scale. */
+            @Option(names = {"--xm", "--scale"},
+                    paramLabel = "xm",
+                    arity = "1..*",
+                    split = ",",
+                    description = {"scale (default: ${DEFAULT-VALUE})."})
+            private double[] scale = {1};
+
+            /** The distribution shape. */
+            @Option(names = {"--alpha", "--shape"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"shape (default: ${DEFAULT-VALUE})."})
+            private double[] shape = {3, 2, 1};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 5;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] scale = params.scale;
+            double[] shape = params.shape;
+            final int n = DistributionUtils.validateLengths(shape.length, scale.length);
+
+            scale = DistributionUtils.expandToLength(scale, n);
+            shape = DistributionUtils.expandToLength(shape, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new ParetoDistribution(scale[i], shape[i]);
+                list.add(new Distribution<>(d, "xm=" + scale[i] + ",alpha=" + shape[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Pareto distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Pareto distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Pareto distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Pareto distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Pareto distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Pareto distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/PascalCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/PascalCommand.java
new file mode 100644
index 0000000..94e97be
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/PascalCommand.java
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.DiscreteDistribution;
+import org.apache.commons.statistics.distribution.PascalDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link PascalDistribution}.
+ */
+@Command(name = "pascal",
+         aliases = {"negativebinomial", "nbin"},
+         description = "Pascal distribution.",
+         subcommands = {
+             PascalCommand.Check.class,
+             PascalCommand.PMF.class,
+             PascalCommand.LPMF.class,
+             PascalCommand.CDF.class,
+             PascalCommand.Survival.class,
+             PascalCommand.ICDF.class,
+         })
+class PascalCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractDiscreteDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution trials. */
+            @Option(names = {"-r", "--number-of-successes"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"number of successes (default: ${DEFAULT-VALUE})."})
+            private int[] r = {1, 2, 3, 4, 5, 10, 20, 40};
+
+            /** The distribution p. */
+            @Option(names = {"-p", "--probability"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"probability of success (default: ${DEFAULT-VALUE})."})
+            // mean = (r * (1 - p)) / p = (r / p) - r
+            // p = r / (mean + r)
+            // Compute for a mean=10
+            private double[] p = {1.0 / 11, 2.0 / 12, 3.0 / 13, 4.0 / 14, 5.0 / 15, 10.0 / 20, 20.0 / 30, 40.0 / 50};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends DiscreteDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 25;
+            }
+        }
+
+        @Override
+        protected List<Distribution<DiscreteDistribution>> getDistributions() {
+            int[] r = params.r;
+            double[] p = params.p;
+            final int n = DistributionUtils.validateLengths(r.length, p.length);
+
+            r = DistributionUtils.expandToLength(r, n);
+            p = DistributionUtils.expandToLength(p, n);
+
+            // Create distributions
+            final ArrayList<Distribution<DiscreteDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final DiscreteDistribution d = new PascalDistribution(r[i], p[i]);
+                list.add(new Distribution<>(d, "r=" + r[i] + ",p=" + p[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Pascal distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PMF command. */
+    @Command(name = "pmf",
+             aliases = {"pdf"},
+             description = "Pascal distribution PMF.")
+    static class PMF extends ProbabilityCommand {}
+
+    /** LPMF command. */
+    @Command(name = "lpmf",
+             aliases = {"lpdf"},
+             description = "Pascal distribution natural logarithm of the PMF.")
+    static class LPMF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Pascal distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Pascal distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Pascal distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseDiscreteDistributionOptions distributionOptions = new InverseDiscreteDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/PoissonCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/PoissonCommand.java
new file mode 100644
index 0000000..b8d4b06
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/PoissonCommand.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.DiscreteDistribution;
+import org.apache.commons.statistics.distribution.PoissonDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link PoissonDistribution}.
+ */
+@Command(name = "poisson",
+         aliases = {"poiss"},
+         description = "Poisson distribution.",
+         subcommands = {
+             PoissonCommand.Check.class,
+             PoissonCommand.PMF.class,
+             PoissonCommand.LPMF.class,
+             PoissonCommand.CDF.class,
+             PoissonCommand.Survival.class,
+             PoissonCommand.ICDF.class,
+         })
+class PoissonCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractDiscreteDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution mean. */
+            @Option(names = {"-m", "--mean"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"mean (default: ${DEFAULT-VALUE})."})
+            private double[] mean = {1, 4, 10};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends DiscreteDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 20;
+            }
+        }
+
+        @Override
+        protected List<Distribution<DiscreteDistribution>> getDistributions() {
+            // Create distributions
+            final ArrayList<Distribution<DiscreteDistribution>> list = new ArrayList<>();
+            for (final double m : params.mean) {
+                final DiscreteDistribution d = new PoissonDistribution(m);
+                list.add(new Distribution<>(d, "mean=" + m));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Poisson distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PMF command. */
+    @Command(name = "pmf",
+             aliases = {"pdf"},
+             description = "Poisson distribution PMF.")
+    static class PMF extends ProbabilityCommand {}
+
+    /** LPMF command. */
+    @Command(name = "lpmf",
+             aliases = {"lpdf"},
+             description = "Poisson distribution natural logarithm of the PMF.")
+    static class LPMF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Poisson distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Poisson distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Poisson distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseDiscreteDistributionOptions distributionOptions = new InverseDiscreteDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/StandardOptions.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/StandardOptions.java
new file mode 100644
index 0000000..fabb2a1
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/StandardOptions.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import picocli.CommandLine.Command;
+
+/**
+ * Standard options for all commands. This sets the formatting for usage messages and
+ * adds common parameters (help, version, verbosity).
+ */
+@Command(sortOptions = false,
+         mixinStandardHelpOptions = true,
+         versionProvider      = ManifestVersionProvider.class,
+         synopsisHeading      = "%n",
+         descriptionHeading   = "%n",
+         parameterListHeading = "%nParameters:%n",
+         optionListHeading    = "%nOptions:%n",
+         commandListHeading   = "%nCommands:%n")
+class StandardOptions {
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/TCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/TCommand.java
new file mode 100644
index 0000000..72ba55a
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/TCommand.java
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.TDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link TDistribution}.
+ */
+@Command(name = "t",
+         description = "T distribution.",
+         subcommands = {
+             TCommand.Check.class,
+             TCommand.PDF.class,
+             TCommand.LPDF.class,
+             TCommand.CDF.class,
+             TCommand.Survival.class,
+             TCommand.ICDF.class,
+         })
+class TCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution degrees of freedom. */
+            @Option(names = {"-v", "--df", "--degrees-of-freedom"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"degrees of freedom (default: ${DEFAULT-VALUE})."})
+            private double[] df = {1, 2, 5, 1e10};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = -5;
+                max = 5;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (final double degreesOfFreedom : params.df) {
+                final ContinuousDistribution d = new TDistribution(degreesOfFreedom);
+                list.add(new Distribution<>(d, "df=" + degreesOfFreedom));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "T distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "T distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "T distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "T distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "T distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "T distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/TriangularCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/TriangularCommand.java
new file mode 100644
index 0000000..0cbf8e9
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/TriangularCommand.java
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.TriangularDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link TriangularDistribution}.
+ */
+@Command(name = "triangular",
+         aliases = {"tri"},
+         description = "Triangular distribution.",
+         subcommands = {
+             TriangularCommand.Check.class,
+             TriangularCommand.PDF.class,
+             TriangularCommand.LPDF.class,
+             TriangularCommand.CDF.class,
+             TriangularCommand.Survival.class,
+             TriangularCommand.ICDF.class,
+         })
+class TriangularCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution lower limit. */
+            @Option(names = {"-a", "--lower"},
+                    paramLabel = "a",
+                    arity = "1..*",
+                    split = ",",
+                    description = {"lower bound (default: ${DEFAULT-VALUE})."})
+            private double[] lower = {-4, -1};
+
+            /** The distribution mode. */
+            @Option(names = {"-b", "--mode"},
+                    paramLabel = "b",
+                    arity = "1..*",
+                    split = ",",
+                    description = {"mode (default: ${DEFAULT-VALUE})."})
+            private double[] mode = {2.5, 2};
+
+            /** The distribution upper limit. */
+            @Option(names = {"-c", "--upper"},
+                    paramLabel = "c",
+                    arity = "1..*",
+                    split = ",",
+                    description = {"upper bound (default: ${DEFAULT-VALUE})."})
+            private double[] upper = {4, 5};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = -5;
+                max = 5;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] lower = params.lower;
+            double[] mode = params.mode;
+            double[] upper = params.upper;
+            final int n = DistributionUtils.validateLengths(lower.length, mode.length, upper.length);
+
+            lower = DistributionUtils.expandToLength(lower, n);
+            mode = DistributionUtils.expandToLength(mode, n);
+            upper = DistributionUtils.expandToLength(upper, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new TriangularDistribution(lower[i], mode[i], upper[i]);
+                list.add(new Distribution<>(d, "a=" + lower[i] + ",b=" + upper[i] + ",c=" + upper[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Triangular distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Triangular PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Triangular distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Triangular CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Triangular survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Triangular inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/TruncatedNormalCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/TruncatedNormalCommand.java
new file mode 100644
index 0000000..419f4a3
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/TruncatedNormalCommand.java
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.TruncatedNormalDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link TruncatedNormalDistribution}.
+ */
+@Command(name = "truncatednormal",
+         aliases = {"tnorm"},
+         description = "Truncated normal distribution.",
+         subcommands = {
+             TruncatedNormalCommand.Check.class,
+             TruncatedNormalCommand.PDF.class,
+             TruncatedNormalCommand.LPDF.class,
+             TruncatedNormalCommand.CDF.class,
+             TruncatedNormalCommand.Survival.class,
+             TruncatedNormalCommand.ICDF.class,
+         })
+class TruncatedNormalCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** The default minimum for x. */
+        static final double MIN = -10;
+        /** The default maximum for x. */
+        static final double MAX = 10;
+
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution mean. */
+            @Option(names = {"-m", "--mu", "--mean"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"mean (default: ${DEFAULT-VALUE})."})
+            private double[] mu = {-8, 0, 9, 0};
+
+            /** The distribution sigma. */
+            @Option(names = {"-s", "--sigma"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"standard deviation (default: ${DEFAULT-VALUE})."})
+            private double[] sigma = {2, 2, 10, 10};
+
+            /** The distribution lower limit. */
+            @Option(names = {"-l", "--lower"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"lower bound (default: ${DEFAULT-VALUE})."})
+            private double[] lower = {MIN};
+
+            /** The distribution upper limit. */
+            @Option(names = {"-u", "--upper"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"upper bound (default: ${DEFAULT-VALUE})."})
+            private double[] upper = {MAX};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = MIN;
+                max = MAX;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] mean = params.mu;
+            double[] sigma = params.sigma;
+            double[] lower = params.lower;
+            double[] upper = params.upper;
+            final int n = DistributionUtils.validateLengths(mean.length, sigma.length, lower.length, upper.length);
+
+            mean = DistributionUtils.expandToLength(mean, n);
+            sigma = DistributionUtils.expandToLength(sigma, n);
+            lower = DistributionUtils.expandToLength(lower, n);
+            upper = DistributionUtils.expandToLength(upper, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new TruncatedNormalDistribution(mean[i], sigma[i], lower[i], upper[i]);
+                list.add(new Distribution<>(d, "mu=" + mean[i] + ",sigma=" + sigma[i] +
+                                               ",lower=" + lower[i] + ",upper=" + upper[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Truncated normal distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Truncated normal distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Truncated normal distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Truncated normal distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Truncated normal distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Truncated normal distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/UniformContinuousCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/UniformContinuousCommand.java
new file mode 100644
index 0000000..b8bea8f
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/UniformContinuousCommand.java
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import org.apache.commons.statistics.distribution.UniformContinuousDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link UniformContinuousDistribution}.
+ */
+@Command(name = "unif",
+         aliases = {"uniform", "rectangular"},
+         description = "Continuous uniform distribution.",
+         subcommands = {
+             UniformContinuousCommand.Check.class,
+             UniformContinuousCommand.PDF.class,
+             UniformContinuousCommand.LPDF.class,
+             UniformContinuousCommand.CDF.class,
+             UniformContinuousCommand.Survival.class,
+             UniformContinuousCommand.ICDF.class,
+         })
+class UniformContinuousCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution lower limit. */
+            @Option(names = {"-a", "--lower"},
+                    paramLabel = "a",
+                    arity = "1..*",
+                    split = ",",
+                    description = {"lower bound (default: ${DEFAULT-VALUE})."})
+            private double[] lower = {0, 0, -3};
+
+            /** The distribution upper limit. */
+            @Option(names = {"-b", "--upper"},
+                    paramLabel = "b",
+                    arity = "1..*",
+                    split = ",",
+                    description = {"upper bound (default: ${DEFAULT-VALUE})."})
+            private double[] upper = {3, 5, 2};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = -5;
+                max = 5;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] lower = params.lower;
+            double[] upper = params.upper;
+            final int n = DistributionUtils.validateLengths(lower.length, upper.length);
+
+            lower = DistributionUtils.expandToLength(lower, n);
+            upper = DistributionUtils.expandToLength(upper, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new UniformContinuousDistribution(lower[i], upper[i]);
+                list.add(new Distribution<>(d, "a=" + lower[i] + ",b=" + upper[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Continuous uniform distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Continuous uniform distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Continuous uniform distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Continuous uniform distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Continuous uniform distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Continuous uniform distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/UniformDiscreteCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/UniformDiscreteCommand.java
new file mode 100644
index 0000000..21d99fd
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/UniformDiscreteCommand.java
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.DiscreteDistribution;
+import org.apache.commons.statistics.distribution.UniformDiscreteDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link UniformDiscreteDistribution}.
+ */
+@Command(name = "unid",
+         description = "Discrete uniform distribution.",
+         subcommands = {
+             UniformDiscreteCommand.Check.class,
+             UniformDiscreteCommand.PMF.class,
+             UniformDiscreteCommand.LPMF.class,
+             UniformDiscreteCommand.CDF.class,
+             UniformDiscreteCommand.Survival.class,
+             UniformDiscreteCommand.ICDF.class,
+         })
+class UniformDiscreteCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractDiscreteDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution lower limit. */
+            @Option(names = {"-a", "--lower"},
+                    paramLabel = "a",
+                    arity = "1..*",
+                    split = ",",
+                    description = {"lower bound (default: ${DEFAULT-VALUE})."})
+            private int[] lower = {0, -3};
+
+            /** The distribution upper limit. */
+            @Option(names = {"-b", "--upper"},
+                    paramLabel = "b",
+                    arity = "1..*",
+                    split = ",",
+                    description = {"upper bound (default: ${DEFAULT-VALUE})."})
+            private int[] upper = {5, 4};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends DiscreteDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = -5;
+                max = 5;
+            }
+        }
+
+        @Override
+        protected List<Distribution<DiscreteDistribution>> getDistributions() {
+            int[] lower = params.lower;
+            int[] upper = params.upper;
+            final int n = DistributionUtils.validateLengths(lower.length, upper.length);
+
+            lower = DistributionUtils.expandToLength(lower, n);
+            upper = DistributionUtils.expandToLength(upper, n);
+
+            // Create distributions
+            final ArrayList<Distribution<DiscreteDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final DiscreteDistribution d = new UniformDiscreteDistribution(lower[i], upper[i]);
+                list.add(new Distribution<>(d, "a=" + lower[i] + ",b=" + upper[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Discrete uniform distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PMF command. */
+    @Command(name = "pmf",
+             aliases = {"pdf"},
+             description = "Discrete uniform distribution PMF.")
+    static class PMF extends ProbabilityCommand {}
+
+    /** LPMF command. */
+    @Command(name = "lpmf",
+             aliases = {"lpdf"},
+             description = "Discrete distribution natural logarithm of the PMF.")
+    static class LPMF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Discrete uniform distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Discrete uniform distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Discrete uniform distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseDiscreteDistributionOptions distributionOptions = new InverseDiscreteDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/WeibullCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/WeibullCommand.java
new file mode 100644
index 0000000..1d640b7
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/WeibullCommand.java
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.WeibullDistribution;
+import org.apache.commons.statistics.distribution.ContinuousDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link WeibullDistribution}.
+ */
+@Command(name = "weibull",
+         aliases = {"wbl"},
+         description = "Weibull distribution.",
+         subcommands = {
+             WeibullCommand.Check.class,
+             WeibullCommand.PDF.class,
+             WeibullCommand.LPDF.class,
+             WeibullCommand.CDF.class,
+             WeibullCommand.Survival.class,
+             WeibullCommand.ICDF.class,
+         })
+class WeibullCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractContinuousDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution alpha (shape). */
+            @Option(names = {"-k", "--alpha", "--shape"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"alpha shape (default: ${DEFAULT-VALUE})."})
+            private double[] alpha = {0.5, 1, 1.5, 5};
+
+            /** The distribution beta (scale). */
+            @Option(names = {"-l", "--beta", "--scale"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"beta scale (default: ${DEFAULT-VALUE})."})
+            private double[] beta = {1};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends ContinuousDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 0;
+                max = 2.5;
+            }
+        }
+
+        @Override
+        protected List<Distribution<ContinuousDistribution>> getDistributions() {
+            double[] alpha = params.alpha;
+            double[] beta = params.beta;
+            final int n = DistributionUtils.validateLengths(alpha.length, beta.length);
+
+            alpha = DistributionUtils.expandToLength(alpha, n);
+            beta = DistributionUtils.expandToLength(beta, n);
+
+            // Create distributions
+            final ArrayList<Distribution<ContinuousDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < n; i++) {
+                final ContinuousDistribution d = new WeibullDistribution(alpha[i], beta[i]);
+                list.add(new Distribution<>(d, "alpha=" + alpha[i] + ",beta=" + beta[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Weibull distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PDF command. */
+    @Command(name = "pdf",
+             description = "Weibull distribution PDF.")
+    static class PDF extends ProbabilityCommand {}
+
+    /** LPDF command. */
+    @Command(name = "lpdf",
+             description = "Weibull distribution natural logarithm of the PDF.")
+    static class LPDF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Weibull distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Weibull distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Weibull distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseContinuousDistributionOptions distributionOptions = new InverseContinuousDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ZipfCommand.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ZipfCommand.java
new file mode 100644
index 0000000..11777e9
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/ZipfCommand.java
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.statistics.examples.distribution;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.statistics.distribution.ZipfDistribution;
+import org.apache.commons.statistics.distribution.DiscreteDistribution;
+import picocli.CommandLine.ArgGroup;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+/**
+ * Command for the {@link ZipfDistribution}.
+ */
+@Command(name = "zipf",
+         description = "Zipf distribution.",
+         subcommands = {
+             ZipfCommand.Check.class,
+             ZipfCommand.PMF.class,
+             ZipfCommand.LPMF.class,
+             ZipfCommand.CDF.class,
+             ZipfCommand.Survival.class,
+             ZipfCommand.ICDF.class,
+         })
+class ZipfCommand extends AbstractDistributionCommand {
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class BaseCommand extends AbstractDiscreteDistributionCommand {
+        /** Distribution parameters. */
+        @ArgGroup(validate = false, heading = "Distribution parameters:%n", order = 1)
+        private Params params = new Params();
+
+        /** Parameters class. */
+        static class Params {
+            /** The distribution number of elements. */
+            @Option(names = {"-n", "--number-of-elements"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"number of elements (default: ${DEFAULT-VALUE})."})
+            private int[] n = {10};
+
+            /** The distribution exponent. */
+            @Option(names = {"-e", "--exponent"},
+                    arity = "1..*",
+                    split = ",",
+                    description = {"exponent (default: ${DEFAULT-VALUE})."})
+            private double[] e = {1, 2, 3, 4};
+        }
+
+        /** Extend the options to set the default values for this distribution. */
+        static final class Options extends DiscreteDistributionOptions {
+            /** Set defaults. */
+            private Options() {
+                min = 1;
+                max = 10;
+            }
+        }
+
+        @Override
+        protected List<Distribution<DiscreteDistribution>> getDistributions() {
+            int[] n = params.n;
+            double[] e = params.e;
+            final int max = DistributionUtils.validateLengths(n.length, e.length);
+
+            n = DistributionUtils.expandToLength(n, max);
+            e = DistributionUtils.expandToLength(e, max);
+
+            // Create distributions
+            final ArrayList<Distribution<DiscreteDistribution>> list = new ArrayList<>();
+            for (int i = 0; i < max; i++) {
+                final DiscreteDistribution d = new ZipfDistribution(n[i], e[i]);
+                list.add(new Distribution<>(d, "n=" + n[i] + ",p=" + e[i]));
+            }
+            return list;
+        }
+    }
+
+    /** Base command for the distribution that defines the parameters. */
+    private abstract static class ProbabilityCommand extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private Options distributionOptions = new Options();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+
+    /** Verification checks command. */
+    @Command(name = "check",
+             hidden = true,
+             description = "Zipf distribution verification checks.")
+    static class Check extends ProbabilityCommand {}
+
+    /** PMF command. */
+    @Command(name = "pmf",
+             aliases = {"pdf"},
+             description = "Zipf distribution PMF.")
+    static class PMF extends ProbabilityCommand {}
+
+    /** LPMF command. */
+    @Command(name = "lpmf",
+             aliases = {"lpdf"},
+             description = "Zipf distribution natural logarithm of the PMF.")
+    static class LPMF extends ProbabilityCommand {}
+
+    /** CDF command. */
+    @Command(name = "cdf",
+             description = "Zipf distribution CDF.")
+    static class CDF extends ProbabilityCommand {}
+
+    /** Survival command. */
+    @Command(name = "survival", aliases = {"sur"},
+             description = "Zipf distribution survival probability.")
+    static class Survival extends ProbabilityCommand {}
+
+    /** ICDF command. */
+    @Command(name = "icdf",
+             description = "Zipf distribution inverse CDF.")
+    static class ICDF extends BaseCommand {
+        /** The distribution options. */
+        @ArgGroup(validate = false, heading = "Evaluation options:%n", order = 2)
+        private InverseDiscreteDistributionOptions distributionOptions = new InverseDiscreteDistributionOptions();
+
+        @Override
+        protected DistributionOptions getDistributionOptions() {
+            return distributionOptions;
+        }
+    }
+}
diff --git a/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/package-info.java b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/package-info.java
new file mode 100644
index 0000000..48a45e6
--- /dev/null
+++ b/commons-statistics-examples/examples-distribution/src/main/java/org/apache/commons/statistics/examples/distribution/package-info.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * <h3>Distributions test application</h3>
+ *
+ * <p>
+ * This package contains an application for computing functions of probability distributions.
+ * The following functions can be evaluated: PDF, CDF, Survival function, and Inverse CDF.
+ * </p>
+ */
+
+package org.apache.commons.statistics.examples.distribution;
diff --git a/commons-statistics-examples/pom.xml b/commons-statistics-examples/pom.xml
new file mode 100644
index 0000000..07941d5
--- /dev/null
+++ b/commons-statistics-examples/pom.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.commons</groupId>
+    <artifactId>commons-statistics-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>commons-statistics-examples</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+  <name>Apache Commons Statistics Examples</name>
+
+  <description>Examples of use of the "Commons Statistics" library.
+  Codes in this module and its sub-modules are not part of the library.
+  They provide checking, benchmarking tools to enhance the documentation
+  and to help ensure correctness of the implementations.</description>
+
+  <properties>
+    <!-- OSGi -->
+    <commons.osgi.symbolicName>org.apache.commons.statistics.examples</commons.osgi.symbolicName>
+    <commons.osgi.export>org.apache.commons.statistics.examples</commons.osgi.export>
+    <!-- Java 9+ -->
+    <commons.automatic.module.name>org.apache.commons.statistics.examples</commons.automatic.module.name>
+    <!-- Workaround to avoid duplicating config files. -->
+    <statistics.parent.dir>${basedir}/..</statistics.parent.dir>
+
+    <statistics.picocli.version>4.6.1</statistics.picocli.version>
+    <statistics.exec.version>3.0.0</statistics.exec.version>
+    <statistics.shade.version>3.2.4</statistics.shade.version>
+
+    <!-- Disable JApiCmp failures (but keep the report). The examples API is allowed to change. -->
+    <commons.japicmp.breakBuildOnBinaryIncompatibleModifications>false</commons.japicmp.breakBuildOnBinaryIncompatibleModifications>
+    <commons.japicmp.breakBuildOnSourceIncompatibleModifications>false</commons.japicmp.breakBuildOnSourceIncompatibleModifications>
+    <statistics.jira.component>examples</statistics.jira.component>
+  </properties>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-statistics-distribution</artifactId>
+        <version>1.0-SNAPSHOT</version>
+      </dependency>
+      <dependency>
+        <groupId>info.picocli</groupId>
+        <artifactId>picocli</artifactId>
+        <version>${statistics.picocli.version}</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>exec-maven-plugin</artifactId>
+          <version>${statistics.exec.version}</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <artifactId>maven-pmd-plugin</artifactId>
+        <version>${statistics.pmd.version}</version>
+        <configuration>
+          <failOnViolation>false</failOnViolation>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <modules>
+    <module>examples-distribution</module>
+  </modules>
+</project>
diff --git a/pom.xml b/pom.xml
index 0ce9244..93fec16 100644
--- a/pom.xml
+++ b/pom.xml
@@ -728,6 +728,18 @@ This is avoided by creating an empty directory when svn is not available.
       </build>
     </profile>
 
+    <!--
+        Profiles for modules with special requirements.
+    -->
+    <profile>
+      <id>examples</id>
+      <modules>
+        <module>commons-statistics-distribution</module>
+        <module>commons-statistics-regression</module>
+        <module>commons-statistics-examples</module>
+      </modules>
+    </profile>
+
   </profiles>
 
   <modules>
diff --git a/stats.tgz b/stats.tgz
new file mode 100644
index 0000000..e22978b
Binary files /dev/null and b/stats.tgz differ