Package com.opttek.optquest
Class COptQuestParetoDistribution
java.lang.Object
com.opttek.optquest.COptQuestParetoDistribution
- All Implemented Interfaces:
com.opttek.optquest.IProbabilityDistribution
public class COptQuestParetoDistribution
extends Object
implements com.opttek.optquest.IProbabilityDistribution
Pareto distribution implementation.
Verified - these functions return the same results as scipy.stats.pareto.
Inspired by / Based on NIST's DataPlot implementation.
-
Constructor Summary
ConstructorsConstructorDescriptionCOptQuestParetoDistribution(double gamma, double a, double loc, double scale) -
Method Summary
Modifier and TypeMethodDescriptiondoublecdf(double x) static doubleCDF(double x, double gamma) Pareto Cumulative Distribution Function with default parameters Uses standard parameterization with a=1, loc=0, scale=1.static doubleCDF(double x, double gamma, double a, double loc, double scale) Pareto Cumulative Distribution Function (CDF) Computes P(X ≤ x) where X follows a Pareto distribution with shape parameter gamma and support parameters.doublechaz(double x) static doubleCHAZ(double x, double gamma) Pareto Cumulative Hazard Function with default parameters Uses standard parameterization with a=1, loc=0, scale=1.static doubleCHAZ(double x, double gamma, double a, double loc, double scale) Pareto Cumulative Hazard Function Computes the cumulative hazard H(x) = -ln(S(x)) where S(x) = 1 - F(x) is the survival function.doublehaz(double x) static doubleHAZ(double x, double gamma) Pareto Hazard Function with default parameters Uses standard parameterization with a=1, loc=0, scale=1.static doubleHAZ(double x, double gamma, double a, double loc, double scale) Pareto Hazard Function Computes the hazard rate h(x) = f(x) / S(x) where f(x) is the PDF and S(x) is the survival function.doublepdf(double x) static doublePDF(double x, double gamma) Pareto Probability Density Function with default parameters Uses standard parameterization with a=1, loc=0, scale=1.static doublePDF(double x, double gamma, double a, double loc, double scale) Pareto Probability Density Function (PDF) Computes the probability density at x for a Pareto distribution with given parameters.doubleppf(double x) static doublePPF(double p, double gamma) Pareto Percent Point Function with default parameters Uses standard parameterization with a=1, loc=0, scale=1.static doublePPF(double p, double gamma, double a, double loc, double scale) Pareto Percent Point Function (PPF) - Inverse CDF Computes the value x such that P(X ≤ x) = p, where X follows a Pareto distribution with given parameters.doublesf(double x)
-
Constructor Details
-
COptQuestParetoDistribution
public COptQuestParetoDistribution(double gamma, double a, double loc, 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 gamma, double a, double loc, double scale) Pareto Cumulative Distribution Function (CDF) Computes P(X ≤ x) where X follows a Pareto distribution with shape parameter gamma and support parameters. The CDF is given by: F(x; γ, a) = 1 - (a/x)^γ for x ≥ a, 0 otherwise- Parameters:
x- the value at which to evaluate the CDF (must be finite)gamma- the tail length shape parameter (must be positive)a- the lower bound parameter (must be positive, default 1.0)loc- the location parameter (default 0.0)scale- the scale parameter (must be positive, default 1.0)- Returns:
- the cumulative probability P(X ≤ x)
-
CDF
public static double CDF(double x, double gamma) Pareto Cumulative Distribution Function with default parameters Uses standard parameterization with a=1, loc=0, scale=1.- Parameters:
x- the value at which to evaluate the CDFgamma- the tail length shape parameter (must be positive)- Returns:
- the cumulative probability P(X ≤ x)
-
PDF
public static double PDF(double x, double gamma, double a, double loc, double scale) Pareto Probability Density Function (PDF) Computes the probability density at x for a Pareto distribution with given parameters. The PDF is given by: f(x; γ, a) = (γ * a^γ) / x^(γ+1) for x ≥ a, 0 otherwise- Parameters:
x- the value at which to evaluate the PDF (must be finite)gamma- the tail length shape parameter (must be positive)a- the lower bound parameter (must be positive, default 1.0)loc- the location parameter (default 0.0)scale- the scale parameter (must be positive, default 1.0)- Returns:
- the probability density at x
-
PDF
public static double PDF(double x, double gamma) Pareto Probability Density Function with default parameters Uses standard parameterization with a=1, loc=0, scale=1.- Parameters:
x- the value at which to evaluate the PDFgamma- the tail length shape parameter (must be positive)- Returns:
- the probability density at x
-
PPF
public static double PPF(double p, double gamma, double a, double loc, double scale) Pareto Percent Point Function (PPF) - Inverse CDF Computes the value x such that P(X ≤ x) = p, where X follows a Pareto distribution with given parameters. Uses the closed-form inverse: x = a * (1-p)^(-1/γ)- Parameters:
p- the probability (must be between 0 and 1, exclusive)gamma- the tail length shape parameter (must be positive)a- the lower bound parameter (must be positive, default 1.0)loc- the location parameter (default 0.0)scale- the scale parameter (must be positive, default 1.0)- Returns:
- the value x such that CDF(x, gamma, a, loc, scale) = p
-
PPF
public static double PPF(double p, double gamma) Pareto Percent Point Function with default parameters Uses standard parameterization with a=1, loc=0, scale=1.- Parameters:
p- the probability (must be between 0 and 1, exclusive)gamma- the tail length shape parameter (must be positive)- Returns:
- the value x such that CDF(x, gamma) = p
-
CHAZ
public static double CHAZ(double x, double gamma, double a, double loc, double scale) Pareto Cumulative Hazard Function Computes the cumulative hazard H(x) = -ln(S(x)) where S(x) = 1 - F(x) is the survival function. For Pareto distribution: H(x; γ, a) = γ * ln(x/a) for x ≥ a, 0 otherwise- Parameters:
x- the value at which to evaluate the cumulative hazardgamma- the tail length shape parameter (must be positive)a- the lower bound parameter (must be positive, default 1.0)loc- the location parameter (default 0.0)scale- the scale parameter (must be positive, default 1.0)- Returns:
- the cumulative hazard value
-
CHAZ
public static double CHAZ(double x, double gamma) Pareto Cumulative Hazard Function with default parameters Uses standard parameterization with a=1, loc=0, scale=1.- Parameters:
x- the value at which to evaluate the cumulative hazardgamma- the tail length shape parameter (must be positive)- Returns:
- the cumulative hazard value
-
HAZ
public static double HAZ(double x, double gamma, double a, double loc, double scale) Pareto Hazard Function Computes the hazard rate h(x) = f(x) / S(x) where f(x) is the PDF and S(x) is the survival function. For Pareto distribution: h(x; γ, a) = γ/x for x ≥ a, 0 otherwise- Parameters:
x- the value at which to evaluate the hazard rategamma- the tail length shape parameter (must be positive)a- the lower bound parameter (must be positive, default 1.0)loc- the location parameter (default 0.0)scale- the scale parameter (must be positive, default 1.0)- Returns:
- the hazard rate value
-
HAZ
public static double HAZ(double x, double gamma) Pareto Hazard Function with default parameters Uses standard parameterization with a=1, loc=0, scale=1.- Parameters:
x- the value at which to evaluate the hazard rategamma- the tail length shape parameter (must be positive)- Returns:
- the hazard rate value
-