Class COptQuestUniformDistribution

java.lang.Object
com.opttek.optquest.COptQuestUniformDistribution
All Implemented Interfaces:
com.opttek.optquest.IProbabilityDistribution

public class COptQuestUniformDistribution extends Object implements com.opttek.optquest.IProbabilityDistribution
  • Constructor Summary

    Constructors
    Constructor
    Description
    COptQuestUniformDistribution(double min, double max)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    cdf(double x)
     
    static double
    CDF(double x, double min, double max)
    Uniform Cumulative Distribution Function (CDF) Computes P(X ≤ x) where X follows a uniform distribution U(min, max).
    double
    chaz(double x)
     
    static double
    CHAZ(double x, double min, double max)
    Uniform Cumulative Hazard Function Computes the cumulative hazard H(x) = -ln(S(x)) where S(x) is the survival function.
    double
    haz(double x)
     
    static double
    HAZ(double x, double min, double max)
    Uniform Hazard Function Computes the hazard function h(x) = f(x)/S(x) where f(x) is the PDF and S(x) is the survival function.
    double
    pdf(double x)
     
    static double
    PDF(double x, double min, double max)
    Uniform Probability Density Function (PDF) Computes the probability density at x for a uniform distribution U(min, max).
    double
    ppf(double x)
     
    static double
    PPF(double p, double min, double max)
    Uniform Percent Point Function (PPF) - Inverse CDF Computes the value x such that P(X ≤ x) = p, where X follows a uniform distribution U(min, max).
    double
    sf(double x)
     
    static double
    SF(double x, double min, double max)
    Uniform Survival Function (SF) Computes P(X > x) where X follows a uniform distribution U(min, max).

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • COptQuestUniformDistribution

      public COptQuestUniformDistribution(double min, double max)
  • Method Details

    • pdf

      public double pdf(double x)
      Specified by:
      pdf in interface com.opttek.optquest.IProbabilityDistribution
    • cdf

      public double cdf(double x)
      Specified by:
      cdf in interface com.opttek.optquest.IProbabilityDistribution
    • ppf

      public double ppf(double x)
      Specified by:
      ppf in interface com.opttek.optquest.IProbabilityDistribution
    • sf

      public double sf(double x)
      Specified by:
      sf in interface com.opttek.optquest.IProbabilityDistribution
    • chaz

      public double chaz(double x)
      Specified by:
      chaz in interface com.opttek.optquest.IProbabilityDistribution
    • haz

      public double haz(double x)
      Specified by:
      haz in interface com.opttek.optquest.IProbabilityDistribution
    • PDF

      public static double PDF(double x, double min, double max)
      Uniform Probability Density Function (PDF) Computes the probability density at x for a uniform distribution U(min, max). Formula: f(x) = 1/(max-min) for min ≤ x ≤ max, 0 otherwise
      Parameters:
      x - the value at which to evaluate the PDF
      min - the lower bound of the uniform distribution
      max - the upper bound of the uniform distribution
      Returns:
      the probability density at x
    • CDF

      public static double CDF(double x, double min, double max)
      Uniform Cumulative Distribution Function (CDF) Computes P(X ≤ x) where X follows a uniform distribution U(min, max). Formula: F(x) = 0 for x < min, (x-min)/(max-min) for min ≤ x ≤ max, 1 for x > max
      Parameters:
      x - the value at which to evaluate the CDF
      min - the lower bound of the uniform distribution
      max - the upper bound of the uniform distribution
      Returns:
      the cumulative probability P(X ≤ x)
    • PPF

      public static double PPF(double p, double min, double max)
      Uniform Percent Point Function (PPF) - Inverse CDF Computes the value x such that P(X ≤ x) = p, where X follows a uniform distribution U(min, max). Formula: F^(-1)(p) = min + p*(max-min) for 0 ≤ p ≤ 1
      Parameters:
      p - the probability (must be between 0 and 1, inclusive)
      min - the lower bound of the uniform distribution
      max - the upper bound of the uniform distribution
      Returns:
      the value x such that CDF(x) = p
    • SF

      public static double SF(double x, double min, double max)
      Uniform Survival Function (SF) Computes P(X > x) where X follows a uniform distribution U(min, max). Formula: S(x) = 1 for x ≤ min, (max-x)/(max-min) for min < x < max, 0 for x ≥ max
      Parameters:
      x - the value at which to evaluate the survival function
      min - the lower bound of the uniform distribution
      max - the upper bound of the uniform distribution
      Returns:
      the survival probability P(X > x)
    • CHAZ

      public static double CHAZ(double x, double min, double max)
      Uniform Cumulative Hazard Function Computes the cumulative hazard H(x) = -ln(S(x)) where S(x) is the survival function. For uniform distribution: H(x) = -ln((max-x)/(max-min)) for min ≤ x < max
      Parameters:
      x - the value at which to evaluate the cumulative hazard
      min - the lower bound of the uniform distribution
      max - the upper bound of the uniform distribution
      Returns:
      the cumulative hazard value
    • HAZ

      public static double HAZ(double x, double min, double max)
      Uniform Hazard Function Computes the hazard function h(x) = f(x)/S(x) where f(x) is the PDF and S(x) is the survival function. For uniform distribution: h(x) = 1/(max-x) for min ≤ x < max
      Parameters:
      x - the value at which to evaluate the hazard function
      min - the lower bound of the uniform distribution
      max - the upper bound of the uniform distribution
      Returns:
      the hazard value