Package com.opttek.optquest
Class COptQuestLogNormalDistribution
java.lang.Object
com.opttek.optquest.COptQuestLogNormalDistribution
- All Implemented Interfaces:
com.opttek.optquest.IProbabilityDistribution
public class COptQuestLogNormalDistribution
extends Object
implements com.opttek.optquest.IProbabilityDistribution
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecdf(double x) static doubleCDF(double x, double shape, double scale) Log-Normal Cumulative Distribution Function (CDF) Computes P(X ≤ x) where X follows a log-normal distribution with shape parameter shape and scale parameter scale.doublechaz(double x) static doubleCHAZ(double x, double shape, double scale) Log-Normal Cumulative Hazard Function Computes the cumulative hazard H(x) = -ln(1 - F(x)) where F(x) is the CDF of the log-normal distribution.doublehaz(double x) static doubleHAZ(double x, double shape, double scale) Log-Normal Hazard Function Computes the hazard rate h(x) = f(x) / (1 - F(x)) where f(x) is the PDF and F(x) is the CDF of the log-normal distribution.doublepdf(double x) static doublePDF(double x, double shape, double scale) Log-Normal Probability Density Function (PDF) Computes the probability density at x for a log-normal distribution with shape parameter shape and scale parameter scale.doubleppf(double x) static doublePPF(double p, double shape, double scale) Log-Normal Percent Point Function (PPF) - Inverse CDF Computes the value x such that P(X ≤ x) = p, where X follows a log-normal distribution with shape parameter shape and scale parameter scale.doublesf(double x)
-
Constructor Details
-
COptQuestLogNormalDistribution
public COptQuestLogNormalDistribution(double shape, double scale)
-
-
Method Details
-
pdf
public double pdf(double x) - Specified by:
pdfin interfacecom.opttek.optquest.IProbabilityDistribution
-
cdf
public double cdf(double x) - Specified by:
cdfin interfacecom.opttek.optquest.IProbabilityDistribution
-
ppf
public double ppf(double x) - Specified by:
ppfin interfacecom.opttek.optquest.IProbabilityDistribution
-
sf
public double sf(double x) - Specified by:
sfin interfacecom.opttek.optquest.IProbabilityDistribution
-
chaz
public double chaz(double x) - Specified by:
chazin interfacecom.opttek.optquest.IProbabilityDistribution
-
haz
public double haz(double x) - Specified by:
hazin interfacecom.opttek.optquest.IProbabilityDistribution
-
CDF
public static double CDF(double x, double shape, double scale) Log-Normal Cumulative Distribution Function (CDF) Computes P(X ≤ x) where X follows a log-normal distribution with shape parameter shape and scale parameter scale. Uses the relationship: CDF(x) = Φ((ln(x/scale))/shape) where Φ is the standard normal CDF.- Parameters:
x- the value at which to evaluate the CDF (must be positive)shape- shape parameter (sigma, must be positive)scale- scale parameter (must be positive)- Returns:
- the cumulative probability P(X ≤ x)
-
PDF
public static double PDF(double x, double shape, double scale) Log-Normal Probability Density Function (PDF) Computes the probability density at x for a log-normal distribution with shape parameter shape and scale parameter scale. Formula: f(x; σ, scale) = (1/(x*σ*√(2π))) * exp(-((ln(x/scale))²)/(2σ²))- Parameters:
x- the value at which to evaluate the PDF (must be positive)shape- shape parameter (sigma, must be positive)scale- scale parameter (must be positive)- Returns:
- the probability density at x
-
PPF
public static double PPF(double p, double shape, double scale) Log-Normal Percent Point Function (PPF) - Inverse CDF Computes the value x such that P(X ≤ x) = p, where X follows a log-normal distribution with shape parameter shape and scale parameter scale. Uses the relationship: PPF(p) = scale * exp(shape * Φ^{-1}(p)) where Φ^{-1} is the inverse standard normal CDF.- Parameters:
p- the probability (must be between 0 and 1, exclusive)shape- shape parameter (sigma, must be positive)scale- scale parameter (must be positive)- Returns:
- the value x such that CDF(x, shape, scale) = p
-
HAZ
public static double HAZ(double x, double shape, double scale) Log-Normal Hazard Function Computes the hazard rate h(x) = f(x) / (1 - F(x)) where f(x) is the PDF and F(x) is the CDF of the log-normal distribution.- Parameters:
x- the value at which to evaluate the hazard function (must be positive)shape- shape parameter (sigma, must be positive)scale- scale parameter (must be positive)- Returns:
- the hazard rate at x
-
CHAZ
public static double CHAZ(double x, double shape, double scale) Log-Normal Cumulative Hazard Function Computes the cumulative hazard H(x) = -ln(1 - F(x)) where F(x) is the CDF of the log-normal distribution.- Parameters:
x- the value at which to evaluate the cumulative hazard function (must be positive)shape- shape parameter (sigma, must be positive)scale- scale parameter (must be positive)- Returns:
- the cumulative hazard at x
-