public class Normal extends ContinuousDistribution
Constructor and Description |
---|
Normal() |
Normal(double mean,
double stndDev) |
Modifier and Type | Method and Description |
---|---|
double |
cdf(double x)
Computes the value of the Cumulative Density Function (CDF) at the given
point.
|
static double |
cdf(double x,
double mu,
double sigma) |
ContinuousDistribution |
clone() |
boolean |
equals(Object obj) |
double[] |
getCurrentVariableValues()
Returns an array, where each value contains the value of a parameter in the distribution.
|
String |
getDescriptiveName()
The descriptive name of a distribution returns the name of the distribution, followed by the parameters of the distribution and their values.
|
String |
getDistributionName()
Return the name of the distribution.
|
String[] |
getVariables()
Returns an array, where each value contains the name of a parameter in the distribution.
|
int |
hashCode() |
double |
invCdf(double d)
Computes the inverse Cumulative Density Function (CDF-1) at
the given point.
|
static double |
invcdf(double x,
double mu,
double sigma) |
double |
invPdf(double d) |
double |
logPdf(double x)
Computes the log of the Probability Density Function.
|
static double |
logPdf(double x,
double mu,
double sigma)
Computes the log probability of a given value
|
double |
max()
The maximum value for which the
#pdf(double) is meant to return
a value. |
double |
mean()
Computes the mean value of the distribution
|
double |
median()
Computes the median value of the distribution
|
double |
min()
The minimum value for which the
#pdf(double) is meant to return
a value. |
double |
mode()
Computes the mode of the distribution.
|
double |
pdf(double d)
Computes the value of the Probability Density Function (PDF) at the given point
|
static double |
pdf(double x,
double mu,
double sigma) |
void |
setMean(double mean) |
void |
setStndDev(double stndDev) |
void |
setUsingData(Vec data)
Attempts to set the variables used by this distribution based on population sample data,
assuming the sample data is from this type of distribution.
|
void |
setVariable(String var,
double value)
Sets one of the variables of this distribution by the name.
|
double |
skewness()
Computes the skewness of the distribution.
|
double |
standardDeviation()
Computes the standard deviation of the distribution.
|
double |
variance()
Computes the variance of the distribution.
|
double |
zTransform(double x) |
static double |
zTransform(double x,
double mu,
double sigma) |
getFunctionPDF, getIntegrationMax, getIntegrationMin, toString
getFunctionCDF, invCdf, sample, sampleVec
public void setMean(double mean)
public void setStndDev(double stndDev)
public static double cdf(double x, double mu, double sigma)
public double cdf(double x)
Distribution
cdf
in class ContinuousDistribution
x
- the value to get the CDF ofpublic static double invcdf(double x, double mu, double sigma)
public double invCdf(double d)
Distribution
invCdf
in class ContinuousDistribution
d
- the probability valuepublic static double pdf(double x, double mu, double sigma)
public double pdf(double d)
ContinuousDistribution
pdf
in class ContinuousDistribution
d
- the value to get the PDFpublic static double logPdf(double x, double mu, double sigma)
x
- the value to the get log(pdf) ofmu
- the mean of the distributionsigma
- the standard deviation of the distributionpublic double logPdf(double x)
ContinuousDistribution
Double.NEGATIVE_INFINITY
would be the true
value. Instead, this method will always return the negative of
Double.MAX_VALUE
. This is to avoid propagating bad values through
computation.logPdf
in class ContinuousDistribution
x
- the value to get the log(PDF) ofpublic double invPdf(double d)
public static double zTransform(double x, double mu, double sigma)
public double zTransform(double x)
public String getDescriptiveName()
ContinuousDistribution
getDescriptiveName
in class ContinuousDistribution
public double min()
Distribution
#pdf(double)
is meant to return
a value. Note that Double.NEGATIVE_INFINITY
is a valid return
value.min
in class Distribution
#pdf(double)
is meant to
return a value.public double max()
Distribution
#pdf(double)
is meant to return
a value. Note that Double.POSITIVE_INFINITY
is a valid return
value.max
in class Distribution
#pdf(double)
is meant to
return a value.public String getDistributionName()
ContinuousDistribution
getDistributionName
in class ContinuousDistribution
public String[] getVariables()
ContinuousDistribution
ContinuousDistribution.getCurrentVariableValues()
getVariables
in class ContinuousDistribution
public void setVariable(String var, double value)
ContinuousDistribution
setVariable
in class ContinuousDistribution
var
- the variable to setvalue
- the value to setpublic ContinuousDistribution clone()
clone
in class ContinuousDistribution
public void setUsingData(Vec data)
ContinuousDistribution
setUsingData
in class ContinuousDistribution
data
- the data to use to attempt to fit againstpublic double[] getCurrentVariableValues()
ContinuousDistribution
ContinuousDistribution.getVariables()
getCurrentVariableValues
in class ContinuousDistribution
ContinuousDistribution.getVariables()
public double mean()
Distribution
mean
in class ContinuousDistribution
public double median()
Distribution
median
in class Distribution
public double mode()
Distribution
NaN
may be returned if the mode is not defined for the current values of the
distribution.mode
in class ContinuousDistribution
public double variance()
Distribution
NaN
may be
returned if the variance is not defined for the current values of the distribution.
Infinity
is a possible value to be returned
by some distributions.variance
in class ContinuousDistribution
public double standardDeviation()
Distribution
NaN
may be
returned if the variance is not defined for the current values of the distribution.
Infinity
is a possible value to be returned
by some distributions.standardDeviation
in class Distribution
public double skewness()
Distribution
NaN
may be
returned if the skewness is not defined for the current values of the distribution.skewness
in class ContinuousDistribution
Copyright © 2017. All rights reserved.