def median_between_min_max
    if sample_min.present? && sample_max.present? && sample_median.present?
      errors.add(:sample_median, 'is not between min and max)') if !(sample_median <= sample_max) || !(sample_median >= sample_min)
    end