@PublicationReference(author="Wikipedia", title="F-distribution", type=WebPage, year=2009, url="http://en.wikipedia.org/wiki/F-distribution") public class SnedecorFDistribution extends AbstractClosedFormUnivariateDistribution<java.lang.Double>
Modifier and Type | Class and Description |
---|---|
static class |
SnedecorFDistribution.CDF
CDF of the F-distribution.
|
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_V1
Default value of v1, 3.0.
|
static double |
DEFAULT_V2
Default value of v2, 5.0.
|
Constructor and Description |
---|
SnedecorFDistribution()
Default constructor
|
SnedecorFDistribution(double v1,
double v2)
Creates a new instance of CumulativeDistribution
|
SnedecorFDistribution(SnedecorFDistribution other)
Copy Constructor
|
Modifier and Type | Method and Description |
---|---|
SnedecorFDistribution |
clone()
This makes public the clone method on the
Object class and
removes the exception that it throws. |
void |
convertFromVector(Vector parameters)
Converts the object from a Vector of parameters.
|
Vector |
convertToVector()
Converts the object to a vector.
|
SnedecorFDistribution.CDF |
getCDF()
Gets the CDF of a scalar distribution.
|
java.lang.Double |
getMaxSupport()
Gets the minimum support (domain or input) of the distribution.
|
java.lang.Double |
getMean()
Gets the arithmetic mean, or "first central moment" or "expectation",
of the distribution.
|
double |
getMeanAsDouble()
Gets the mean of the distribution as a double.
|
java.lang.Double |
getMinSupport()
Gets the minimum support (domain or input) of the distribution.
|
double |
getV1()
Getter for v1
|
double |
getV2()
Getter for v2
|
double |
getVariance()
Gets the variance of the distribution.
|
void |
sampleInto(java.util.Random random,
int sampleCount,
java.util.Collection<? super java.lang.Double> output)
Draws multiple random samples from the distribution and puts the result
into the given collection.
|
void |
setV1(double v1)
Setter for v1
|
void |
setV2(double v2)
Setter for v2
|
sample, sample
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
sample, sample
public static final double DEFAULT_V1
public static final double DEFAULT_V2
public SnedecorFDistribution()
public SnedecorFDistribution(double v1, double v2)
v1
- First degree of freedomv2
- Second degree of freedompublic SnedecorFDistribution(SnedecorFDistribution other)
other
- CumulativeDistribution to copypublic SnedecorFDistribution clone()
AbstractCloneableSerializable
Object
class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone()
to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil
may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone()
as the basis for your implementation.clone
in interface Vectorizable
clone
in interface CloneableSerializable
clone
in class AbstractClosedFormUnivariateDistribution<java.lang.Double>
public double getV1()
public void setV1(double v1)
v1
- First degree of freedompublic double getV2()
public void setV2(double v2)
v2
- Second degree of freedompublic java.lang.Double getMean()
DistributionWithMean
public double getMeanAsDouble()
UnivariateDistribution
public double getVariance()
UnivariateDistribution
public Vector convertToVector()
Vectorizable
public void convertFromVector(Vector parameters)
Vectorizable
parameters
- The parameters to incorporate.public void sampleInto(java.util.Random random, int sampleCount, java.util.Collection<? super java.lang.Double> output)
Distribution
random
- Random number generator to use.sampleCount
- The number of samples to draw. Cannot be negative.output
- The collection to add the samples into.public SnedecorFDistribution.CDF getCDF()
UnivariateDistribution
public java.lang.Double getMinSupport()
UnivariateDistribution
public java.lang.Double getMaxSupport()
UnivariateDistribution