/** * Create a TTest instance. * * @return a new TTest instance */ public TTest createTTest() { return new TTestImpl(); }
public IValue tTest(IList sample1, IList sample2){ double s1[] = makeT(sample1); double s2[] = makeT(sample2); //for(int i = 0; i < s1.length; i++) System.err.println("s1[" + i + "] = " + s1[i]); //for(int i = 0; i < s2.length; i++) System.err.println("s2[" + i + "] = " + s2[i]); try { double r = new TTestImpl().tTest(s1, s2); //System.err.println("r = " + r); return values.real(r); } catch (IllegalArgumentException e) { throw RuntimeExceptionFactory.illegalArgument(sample1, null, null, e.getMessage()); } catch (MathException e) { throw RuntimeExceptionFactory.illegalArgument(sample1, null, null, e.getMessage()); } }
public IValue tTest(IList sample1, IList sample2, INumber alpha){ double s1[] = makeT(sample1); double s2[] = makeT(sample2); try { return values.bool(new TTestImpl().tTest(s1, s2, alpha.toReal(values.getPrecision()).doubleValue())); } catch (IllegalArgumentException e) { throw RuntimeExceptionFactory.illegalArgument(sample1, null, null, e.getMessage()); } catch (MathException e) { throw RuntimeExceptionFactory.illegalArgument(sample1, null, null, e.getMessage()); } }
public IValue tTest(INumber mu, IList sample, INumber alpha){ double s[] = makeT(sample); try { return values.bool(new TTestImpl().tTest( mu.toReal(values.getPrecision()).doubleValue(), s, alpha.toReal(values.getPrecision()).doubleValue())); } catch (IllegalArgumentException e) { throw RuntimeExceptionFactory.illegalArgument(sample, null, null, e.getMessage()); } catch (MathException e) { throw RuntimeExceptionFactory.illegalArgument(sample, null, null, e.getMessage()); } }