public void ShortOrderMedian() { // -3 -1 -0.5 0 1 4 5 6 10 var samples = new[] { -1, 5, 0, -3, 10, -0.5, 4, 1, 6 }; Assert.That(samples.Median(), Is.EqualTo(1), "Median"); Assert.That(Statistics.OrderStatistic(samples, 1), Is.EqualTo(-3), "Order-1"); Assert.That(Statistics.OrderStatistic(samples, 3), Is.EqualTo(-0.5), "Order-3"); Assert.That(Statistics.OrderStatistic(samples, 7), Is.EqualTo(5), "Order-7"); Assert.That(Statistics.OrderStatistic(samples, 9), Is.EqualTo(10), "Order-9"); }