Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9337


Ignore:
Timestamp:
03/28/13 14:03:42 (12 years ago)
Author:
ascheibe
Message:

#1886 fixed bugs in TTest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/TTest.cs

    r9336 r9337  
    2525
    2626namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views {
    27   public class TTest {   
     27  public class TTest {
    2828    public static double Test(double[] data1, double[] data2) {
    2929      double left, right, both;
    30       //TODO: decide what to return
    3130      alglib.studentttest2(data1, data1.Length, data2, data2.Length, out both, out left, out right);
    32       return left;
    33     }     
     31      return both;
     32    }
    3433
    3534    public static double GetOptimalSampleSize(double[] data1, double[] data2, double conf = 0.95) {
     
    4342
    4443      result = Math.Pow(t, 2) * (Math.Pow(s1, 2) + Math.Pow(s2, 2)) / Math.Pow(m1 - m2, 2);
    45       return result;
     44      return Math.Ceiling(result);
    4645    }
    4746  }
Note: See TracChangeset for help on using the changeset viewer.