Beispiel #1
0
        public void When_Compute_Probabiliy_NormalLaw()
        {
            var normalLaw         = new NormalLaw();
            var firstProbability  = normalLaw.ComputeLowerCumulative(0, 1, 1.56); // <= 1.56
            var secondProbability = normalLaw.ComputeLowerCumulative(0, 1, 0.5);  // <= 0.5

            Assert.Equal(0.94064850654741039, firstProbability);
            Assert.Equal(0.691662613143159, secondProbability);
        }
Beispiel #2
0
        public IActionResult UpperNormalLaw([FromBody] GetNormalLawRequest request)
        {
            var normalLaw = new NormalLaw();
            var result    = normalLaw.ComputeUpperCumulative(request.Average, request.StandardDeviation, request.Value);

            return(new OkObjectResult(new ProbabilityResponse {
                Probability = result
            }));
        }