Interval estimation via tail functions