# Use of "org.apache.commons.math3" example

**URL:** <https://forum.inductiveautomation.com/t/use-of-org-apache-commons-math3-example/55091>\
**Category:** Ignition\
**Created:** [January 17, 2022, 10:03pm UTC](https://forum.inductiveautomation.com/t/use-of-org-apache-commons-math3-example/55091 "2022-01-17T22:03:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmb6259](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@jmb6259](https://forum.inductiveautomation.com/u/jmb6259)\
**Post date:** [January 17, 2022, 10:03pm UTC](https://forum.inductiveautomation.com/t/use-of-org-apache-commons-math3-example/55091/1 "2022-01-17T22:03:05Z")

</div>

Could you post a full example of how to use the org.apache.commons.math3" tools found at [Overview (Apache Commons Math 3.6.1 API)](https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/index.html)?

I see some fragmented examples in other post, but I can not seem to get them to work.  
Would you be able to post something illustrating the code all the way from importing the modules to returning a result?

I am specifically trying to use the binomial distribution function.

The Java equivalents to the Scipy tools “scipy.stats.binom.pmf” and “scipy.stats.binom.cdf” are what I am looking for.

Thanks,  
Joe

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [January 18, 2022, 3:40pm UTC](https://forum.inductiveautomation.com/t/use-of-org-apache-commons-math3-example/55091/2 "2022-01-18T15:40:01Z")

</div>

Unfortunately there aren’t a lot of good examples out there for Apache Commons Math – the ones we’ve published so far have been strictly trial and error, pieced together from a lot of example fragments found in searches.
