static void Main(string[] args) { int n = Convert.ToInt32(Console.ReadLine()); int[] nums = Array.ConvertAll(Console.ReadLine().Split(' '), qTemp => Convert.ToInt32(qTemp)); Console.WriteLine($"{StatUtilities.GetMean(nums):0.0}"); Console.WriteLine($"{StatUtilities.GetMedian(nums):0.0}"); Console.WriteLine($"{StatUtilities.GetMode(nums)}"); }
public static double Probability(int n, int k, double p) { return(StatUtilities.GetBinCoeff(n, k) * Math.Pow(p, k) * Math.Pow(1.0 - p, n - k)); }
public double CumulativeProbability(double x) { var z = (x - Mean) / (Std * Math.Sqrt(2)); return((1 + StatUtilities.ErrorFunction(z)) / 2); }
public static double Probability(int x, double mean) { return(Math.Pow(mean, x) * Math.Pow(Math.E, -mean) / StatUtilities.Factorial(x)); }