isDifferentFrom method

bool isDifferentFrom(
  1. Statistic other
)

Returns true if statistic is significantly different from other.

This assumes normal distribution or very large samples. It is implemented by simply computing whether confidence intervals at given confidence level don't overlap.

Note that when two statistics do overlap, we cannot say anything with statistical significance (i.e. it doesn't mean 'there is no statistical difference' -- there very well may be). See link below for more info. http://www.graphpad.com/support/faqid/1362/

The confidence interval is at 95% confidence level.

Implementation

bool isDifferentFrom(Statistic other) =>
    (other.medianLowerBound < medianLowerBound &&
        other.medianUpperBound < medianLowerBound) ||
    (other.medianLowerBound > medianUpperBound &&
        other.medianUpperBound > medianUpperBound);