Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calculating t-inverse in apache commons

I need to calculate a t statistic for a java app. I'm using the Apache Commons library but can't find the implementation I need. I can get it in Excel with the TINV command, 1-the confidence level, and the sample count-1. For example, with the values 10, 24, and 19; and a 90% confidence level, I get a t-statistic of 2.9199... That's the number I need to reproduce in java.

Any ideas?

like image 347
pdw Avatar asked Feb 07 '13 18:02

pdw


1 Answers

Excel TINV(probability, deg_freedom) analogue:

new org.apache.commons.math3.distribution.TDistribution(deg_freedom).
inverseCumulativeProbability(probability)

Cheers

like image 133
serg ogoltsov Avatar answered Sep 21 '22 01:09

serg ogoltsov