|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.stats.distribution.univariate.TDistribution
public class TDistribution
Student's t distribution is the probability distribution of t, where
x̄ - μ
t = ------------
s / sqrt(N)
x̄ is the sample mean;
μ is the population mean;
s is the square root of the sample variance;
N is the sample size;
The importance of the Student's distribution is when (as in nearly all practical statistical work) the population standard deviation is unknown and has to be estimated from the data. This is especially true when the sample size is small. When the sample size is large, the Student's distribution converges to the Normal distribution.
The R equivalent functions are dt, pt, qt, rt.
| Field Summary | |
|---|---|
double |
v
the degree of freedom |
| Constructor Summary | |
|---|---|
TDistribution(double v)
Construct a Student's t distribution. |
|
| Method Summary | |
|---|---|
double |
cdf(double x)
The cumulative distribution function. |
double |
density(double x)
The density function, which, if exists, is the derivative of F. |
double |
entropy()
Get the entropy of this distribution. |
double |
kurtosis()
Get the excess kurtosis of this distribution. |
double |
mean()
Get the mean of this distribution. |
double |
median()
Get the median of this distribution. |
double |
moment(double x)
The moment generating function, which is the expected value of
etX
This may not always exist. |
double |
quantile(double u)
The inverse of the cumulative distribution function. |
double |
skew()
Get the skewness of this distribution. |
double |
variance()
Get the variance of this distribution. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final double v
| Constructor Detail |
|---|
public TDistribution(double v)
v - the degree of freedom| Method Detail |
|---|
public double mean()
mean in interface UnivariateDistributionjava.lang.UnsupportedOperationException - when v <= 1public double median()
UnivariateDistribution
median in interface UnivariateDistributionpublic double variance()
variance in interface UnivariateDistributionjava.lang.UnsupportedOperationException - when v < 2public double skew()
skew in interface UnivariateDistributionjava.lang.UnsupportedOperationException - when v <= 3public double kurtosis()
kurtosis in interface UnivariateDistributionjava.lang.UnsupportedOperationException - when v <= 4public double entropy()
UnivariateDistribution
entropy in interface UnivariateDistributionpublic double cdf(double x)
UnivariateDistribution
F(x) = Pr(X <= x)
cdf in interface UnivariateDistributionx - x
F(x) = Pr(X <= x)public double density(double x)
UnivariateDistributionF.
It describes the density of probability at each point in the sample space.
f(x) = dF(X) / dx
This may not always exist. For the discrete cases, this is the probability mass function. It gives the probability that a discrete random variable is exactly equal to some value.
density in interface UnivariateDistributionx - x
F(x) = Pr(X <= x)public double quantile(double u)
UnivariateDistribution
F-1(u) = x, such that
Pr(X <= x) = u
This may not always exist.
quantile in interface UnivariateDistributionu - u
F-1(u)public double moment(double x)
UnivariateDistribution
etX
This may not always exist.
moment in interface UnivariateDistributionx - x
E(exp(tX))
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||