Class Normal
-
- All Implemented Interfaces:
-
java.io.Serializable,jline.lang.Copyable
public class Normal extends ContinuousDistribution implements Serializable
A normal (Gaussian) distribution.
-
-
Constructor Summary
Constructors Constructor Description Normal(double mu, double sigma)
-
Method Summary
Modifier and Type Method Description static NormalfitMean(double mean)static NormalfitMeanAndStd(double mean, double std)static NormalfitMeanAndVar(double mean, double var)doubleevalCDF(double x)Evaluates the cumulative distribution function (CDF) at the given point. doubleevalLST(double s)Evaluate the Laplace-Stieltjes Transform at s doubleevalPDF(double x)doublegetMean()Gets the mean (expected value) of this distribution. doublegetStd()doublegetVar()Gets the variance of this distribution. doublegetSCV()Gets the squared coefficient of variation (SCV) of this distribution. doublegetSkewness()Gets the skewness of this distribution. Array<double>sample(int n)Generates random samples from this distribution using default random generator. Array<double>sample(int n, Random random)Generates random samples from this distribution using the specified random generator. StringtoString()-
Methods inherited from class jline.lang.processes.Distribution
evalProbInterval, getName, getNumParams, getParam, getRate, getSupport, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, mean, name, numParams, param, rate, 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
-
-
Method Detail
-
fitMeanAndStd
static Normal fitMeanAndStd(double mean, double std)
-
fitMeanAndVar
static Normal fitMeanAndVar(double mean, double var)
-
evalCDF
double evalCDF(double x)
Evaluates the cumulative distribution function (CDF) at the given point.
- Returns:
the CDF value at point t
-
evalLST
double evalLST(double s)
Evaluate the Laplace-Stieltjes Transform at s
- Parameters:
s- the Laplace domain variable- Returns:
the LST value at s
-
evalPDF
double evalPDF(double x)
-
getMean
double getMean()
Gets the mean (expected value) of this distribution.
- Returns:
the mean value
-
getStd
double getStd()
-
getVar
double getVar()
Gets the variance of this distribution. Computed as SCV * mean^2.
- Returns:
the variance
-
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
-
sample
Array<double> sample(int n)
Generates random samples from this distribution using default random generator.
- Parameters:
n- the number of samples to generate- Returns:
array of random samples
-
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
-
-
-
-