public void MedianTest()
{
{
BernoulliDistribution target = new BernoulliDistribution(0.2);
Assert.AreEqual(target.Median, target.InverseDistributionFunction(0.5));
}
{
BernoulliDistribution target = new BernoulliDistribution(0.6);
Assert.AreEqual(target.Median, target.InverseDistributionFunction(0.5));
}
{
BernoulliDistribution target = new BernoulliDistribution(0.0);
Assert.AreEqual(target.Median, target.InverseDistributionFunction(0.5));
}
{
BernoulliDistribution target = new BernoulliDistribution(1.0);
Assert.AreEqual(target.Median, target.InverseDistributionFunction(0.5));
}
}