Пример #1
0
        public ConfidenceInterval(double mean, double standardError, int n, ConfidenceLevel level = ConfidenceLevel.L999)
        {
            Mean          = mean;
            StandardError = standardError;
            Level         = level;
            Margin        = n <= 2 ? double.NaN : standardError *level.GetZValue(n);

            Lower = mean - Margin;
            Upper = mean + Margin;
        }
        public void ZValueTest(ConfidenceLevel level, int n, double expected)
        {
            double actual = level.GetZValue(n);

            Assert.Equal(expected, actual, 3);
        }