We are using the [Link] function, based on a few probability-related functions (e.g.
,
normal_probability_above, normal_probability_between, etc.) involving the normal distribution. The
functions mentioned are:
1. normal_probability_above(lo, mu=0, sigma=1):
2. normal_probability_between(lo, hi, mu=0, sigma=1):
3. normal_probability_outside(lo, hi, mu=0, sigma=1):
4. normal_upper_bound(probability, mu=0, sigma=1):
5. normal_lower_bound(probability, mu=0, sigma=1):
6. normal_two_sided_bounds(probability, mu=0, sigma=1):
Explanation:
1. normal_probability_above(lo, mu=0, sigma=1):
o This function computes the probability that a value from a normal distribution is greater
than lo.
o [Link](lo, loc=mu, scale=sigma) returns the cumulative probability that a value is less
than or equal to lo.
o Therefore, 1 - [Link](lo) gives the probability that a value is greater than lo.
2. normal_probability_between(lo, hi, mu=0, sigma=1):
o This function calculates the probability that a value lies between lo and hi.
o [Link](hi) gives the probability that a value is less than or equal to hi, while
[Link](lo) gives the probability that a value is less than or equal to lo.
o The difference between these two cumulative probabilities ([Link](hi) - [Link](lo))
provides the probability that a value lies between lo and hi.
3. normal_probability_outside(lo, hi, mu=0, sigma=1):
o This function calculates the probability that a value falls outside the range between lo
and hi.
o The probability is the complement of the probability of falling within the range, so it's
computed as 1 - normal_probability_between(lo, hi).
4. normal_upper_bound(probability, mu=0, sigma=1):
o This function returns the value x such that the probability of a value being less than or
equal to x is equal to probability.
o [Link](probability, loc=mu, scale=sigma) is the inverse of the cumulative distribution
function (CDF), so it finds the value corresponding to the given probability.
5. normal_lower_bound(probability, mu=0, sigma=1):
o This function returns the value x such that the probability of a value being greater than
or equal to x is equal to probability.
o To compute this, you first calculate the complementary probability, 1 - probability, and
then use [Link](1 - probability) to find the lower bound.
6. normal_two_sided_bounds(probability, mu=0, sigma=1):
o This function computes the symmetric upper and lower bounds around the mean mu
that contain a specified probability of the distribution.
o First, the tail probability outside the bounds is calculated as (1 - probability) / 2.
o The lower bound is found by [Link](tail_probability) and the upper bound by
[Link](1 - tail_probability).
In all of these cases, the functions use the properties of the normal distribution, particularly the
cumulative distribution function (cdf) and its inverse (ppf), to calculate probabilities and boundaries.