Refactored credibility intervale to its own function.