Package jline.lang.processes
Class EmpiricalCDF
-
- All Implemented Interfaces:
-
java.io.Serializable,jline.lang.Copyable
public class EmpiricalCDF extends Distribution
Empirical CDF for a distribution
-
-
Constructor Summary
Constructors Constructor Description EmpiricalCDF(Matrix xdata)Creates an EmpiricalCDF with the given data EmpiricalCDF(Matrix cdfdata, Matrix xdata)Creates an EmpiricalCDF with separate CDF and value data
-
Method Summary
Modifier and Type Method Description Array<double>sample(int n, Random random)Generates random samples from this distribution using the specified random generator. doubleevalCDF(double t)Evaluates the cumulative distribution function (CDF) at the given point. doublegetMean()Gets the mean (expected value) of this distribution. doublegetSCV()Gets the squared coefficient of variation (SCV) of this distribution. doublegetSkewness()Gets the skewness of this distribution. Array<double>getMoments()Calculate the first three moments, SCV, and skewness doubleevalLST(double s)Evaluate the Laplace-Stieltjes Transform at s MatrixgetData()Get the empirical data -
Methods inherited from class jline.lang.processes.Distribution
evalProbInterval, getName, getNumParams, getParam, getRate, getSupport, getVar, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, mean, name, numParams, param, rate, sample, scv, setNumParams, setParam, skewness, support, var -
Methods inherited from class jline.lang.Copyable
copy -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
EmpiricalCDF
EmpiricalCDF(Matrix xdata)
Creates an EmpiricalCDF with the given data- Parameters:
xdata- the data matrix with CDF and values
-
-
Method Detail
-
sample
Array<double> sample(int n, Random random)
Generates random samples from this distribution using the specified random generator.
- Parameters:
n- the number of samples to generaterandom- the random number generator to use- Returns:
array of random samples
-
evalCDF
double evalCDF(double t)
Evaluates the cumulative distribution function (CDF) at the given point.
- Parameters:
t- the point at which to evaluate the CDF- Returns:
the CDF value at point t
-
getMean
double getMean()
Gets the mean (expected value) of this distribution.
- Returns:
the mean value
-
getSCV
double getSCV()
Gets the squared coefficient of variation (SCV) of this distribution. SCV = Var(X) / E[X]^2.
- Returns:
the squared coefficient of variation
-
getSkewness
double getSkewness()
Gets the skewness of this distribution. Skewness measures the asymmetry of the probability distribution.
- Returns:
the skewness value
-
getMoments
Array<double> getMoments()
Calculate the first three moments, SCV, and skewness
- Returns:
array containing [m1, m2, m3, SCV, skewness]
-
evalLST
double evalLST(double s)
Evaluate the Laplace-Stieltjes Transform at s
- Parameters:
s- the point to evaluate- Returns:
LST value
-
-
-
-