public static StatisticReturnObject pairedTTest(List<? extends Number> list1, List<? extends Number> list2) 
		throws Exception
	{
		
		if( list1.size() != list2.size())
			throw new Exception("Lists must be of equal size");
		
		List<Double> diffs = new ArrayList<Double>();
		
		for( int x=0; x < list1.size(); x++ )
		{
			if( list1.get(x) != null && list2.get(x) != null)
				diffs.add(list1.get(x).doubleValue() - list2.get(x).doubleValue());
		}
		
		Avevar av = new Avevar(diffs);
		
		double t= av.getAve() / (av.getSqrt() / Math.sqrt(diffs.size()));
		double df = diffs.size() -1;
		double p= betai( 0.5 * df, 0.5, df / ( df + t * t ));
		
		return new StatisticReturnObject(t,p);
	}