0

If a have a sample of data in c#, let's say a List. How would I use Math.Net to calculate the probability that the mean of the data is greater than zero, using the students-t distribution. I can see Math.Net has a set of functions pertaining to doing this, but I just can't see to find an example of usage.

Craig
  • 413
  • 7
  • 16

1 Answers1

1

In case anybody was wondering, this is how it is done.

   public static double MeanGreaterThenZero(List<double> data)
   {
      return 1 - StudentT.CDF(0, 1, data.Count - 1, data.Mean() * Math.Sqrt(data.Count) / data.StandardDeviation());
   }
Craig
  • 413
  • 7
  • 16