Package jline.lang.processes
Class EmpiricalCDF
java.lang.Object
jline.lang.processes.Distribution
jline.lang.processes.EmpiricalCDF
- All Implemented Interfaces:
Serializable,Copyable
Empirical CDF for a distribution
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmpiricalCDF(Matrix xdata) Creates an EmpiricalCDF with the given dataEmpiricalCDF(Matrix cdfdata, Matrix xdata) Creates an EmpiricalCDF with separate CDF and value data -
Method Summary
Modifier and TypeMethodDescriptiondoubleevalCDF(double t) Evaluates the cumulative distribution function (CDF) at the given point.doubleevalLST(double s) Evaluate the Laplace-Stieltjes Transform at sgetData()Get the empirical datadoublegetMean()Gets the mean (expected value) of this distribution.double[]Calculate the first three moments, SCV, and skewnessdoublegetSCV()Gets the squared coefficient of variation (SCV) of this distribution.doubleGets the skewness of this distribution.double[]Generates random samples from this distribution using the specified random generator.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
-
Field Details
-
data
-
-
Constructor Details
-
EmpiricalCDF
Creates an EmpiricalCDF with the given data- Parameters:
xdata- the data matrix with CDF and values
-
EmpiricalCDF
Creates an EmpiricalCDF with separate CDF and value data- Parameters:
cdfdata- the CDF valuesxdata- the corresponding x values
-
-
Method Details
-
sample
Description copied from class:DistributionGenerates random samples from this distribution using the specified random generator.- Specified by:
samplein classDistribution- Parameters:
n- the number of samples to generaterandom- the random number generator to use- Returns:
- array of random samples
-
evalCDF
public double evalCDF(double t) Description copied from class:DistributionEvaluates the cumulative distribution function (CDF) at the given point.- Specified by:
evalCDFin classDistribution- Parameters:
t- the point at which to evaluate the CDF- Returns:
- the CDF value at point t
-
getMean
public double getMean()Description copied from class:DistributionGets the mean (expected value) of this distribution.- Specified by:
getMeanin classDistribution- Returns:
- the mean value
-
getSCV
public double getSCV()Description copied from class:DistributionGets the squared coefficient of variation (SCV) of this distribution. SCV = Var(X) / E[X]^2.- Specified by:
getSCVin classDistribution- Returns:
- the squared coefficient of variation
-
getSkewness
public double getSkewness()Description copied from class:DistributionGets the skewness of this distribution. Skewness measures the asymmetry of the probability distribution.- Specified by:
getSkewnessin classDistribution- Returns:
- the skewness value
-
getMoments
public double[] getMoments()Calculate the first three moments, SCV, and skewness- Returns:
- array containing [m1, m2, m3, SCV, skewness]
-
evalLST
public double evalLST(double s) Evaluate the Laplace-Stieltjes Transform at s- Specified by:
evalLSTin classDistribution- Parameters:
s- the point to evaluate- Returns:
- LST value
-
getData
Get the empirical data- Returns:
- the data matrix
-