Truncated Normal Distribution
- class TruncatedNormal
Namescope for collection of helpers providing different useful properties of truncated normal distributions. Used by
WeakRegime_AcceptanceIntervalandIndicatorImplication_AcceptanceInterval.- static mills_ratio(beta: float) float
Compute the mills-ratio for \(\beta\).
- Parameters:
beta (float) – argument \(\beta\)
- Returns:
mills-ratio
- Return type:
float
- static approx_mills_lower_bound(beta: float) float
Lower bound for mills-ratio.
- Parameters:
beta (float) – argument \(\beta > 0\)
- Returns:
lower bound for mills-ratio
- Return type:
float
- static approx_mills_upper_bound(beta)
Upper bound for mills-ratio.
- Parameters:
beta (float) – argument \(\beta > 0\)
- Returns:
upper bound for mills-ratio
- Return type:
float
- classmethod inv_mills_ratio(beta: float) float
Reciprocal value of the mills-ratio with improved numerical stability.
- Parameters:
beta (float) – argument \(\beta > 0\)
- Returns:
reciprocal value of mills-ratio
- Return type:
float
- classmethod mean_cutoff_below(true_mean: float, true_sigma: float, cutoff: float) float
Mean-value of a truncated-below normal distribution.
- Parameters:
true_mean (float) – the normal-distribution’s original mean-value parameter \(\mu\)
true_sigma (float) – the normal-distribution’s original standard-deviation parameter \(\sigma\)
cutoff (float) – the cutoff location \(c\)
- Returns:
\(E[X|X\geq c]\), where \(X \sim \mathcal{N}(\mu, \sigma^2)\).
- Return type:
float
- classmethod mean_cutoff_above(true_mean: float, true_sigma: float, cutoff: float) float
Mean-value of a truncated-above normal distribution.
- Parameters:
true_mean (float) – the normal-distribution’s original mean-value parameter \(\mu\)
true_sigma (float) – the normal-distribution’s original standard-deviation parameter \(\sigma\)
cutoff (float) – the cutoff location \(c\)
- Returns:
\(E[X|X\leq c]\), where \(X \sim \mathcal{N}(\mu, \sigma^2)\).
- Return type:
float