I’ll be the first to admit, its been a long time since I was in Statistics class, but it’s really one of the most useful classes out there, even the esoteric parts of it.

Recently, I had to write code to compute bias estimation for climate change data, and one of the key stats used in computing bias estimation along with its summary statistics is: the t-distribution cumulative probability density function, or tcdf for short.

In Java land, we are fortunate to have the Apache Commons Math library, which allows computation of tcdf and inverse-tcdf:

http://commons.apache.org/math/userguide/distribution.html

Something like the following, using Apache Commons Math, will allow calculation of an inverse tcdf:

` TDistribution t = new TDistributionImpl(degreeOfFreedom);`

a = (t.inverseCumulativeProbability(0.975))

### Like this:

Like Loading...

*Related*

TDistributionImpl is from were ?

Hi Victor,

TDistributionImpl (packaged under the apache commons-math lib) can be imported from the class: org.apache.commons.math.distribution.TDistributionImpl

If you are using Maven, include the Apache Commons Math library by adding the following to your pom.xml:

<dependency>

<groupId>org.apache.commons</groupId>

<artifactId>commons-math</artifactId>

<version>2.1</version>

</dependency>

HTH!

Rishi