javanpst.tests.goodness.K_STest
Class K_STest
- java.lang.Object
-
- javanpst.tests.StatisticalTest
-
- javanpst.tests.goodness.K_STest.K_STest
-
public class K_STest extends StatisticalTest
The K_S test. The Kolmogorov-Smirnov test for one sample can be used to adjust a given sample to a continuous distribution This version allows to adjust to several distributions , (Normal, Exponential, Uniform, Chi-Square, Laplace, Logistic, Gamma and Weibull) but they have to be completely defined
-
-
Constructor Summary
Constructors Constructor and Description K_STest()Default builderK_STest(NumericSequence newSequence)Builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadjustChiSquare(int freedom)Sets adjustment to a Chi-square distribution fully definedvoidadjustExponential(double m)Sets adjustment to a Exponential distribution fully definedvoidadjustGamma(double K, double lambda)Sets adjustment to a Gamma distribution fully definedvoidadjustLaplace(double mean, double scale)Sets adjustment to a Laplace distribution fully definedvoidadjustLogistic(double mean, double S)Sets adjustment to a Logistic distribution fully definedvoidadjustNormal(double m, double s)Sets adjustment to a Normal distribution, specifying mean and sigma.voidadjustUniform(double start, double end)Sets adjustment to a Uniform distribution fully definedvoidadjustWeibull(double K, double lambda)Sets adjustment to a Weibull distribution fully definedvoidclearData()Clears the data stored in the testvoiddoTest()Performs the testdoublegetDn()Get Dn statisticdoublegetPValue()Get p-value of the testjava.lang.StringprintData()Prints the data stored in the testjava.lang.StringprintReport()Prints a report with the results of the testvoidsetData(NumericSequence newSequence)Load data to test.-
Methods inherited from class javanpst.tests.StatisticalTest
isDataReady, isPerformed
-
-
-
-
Constructor Detail
-
K_STest
public K_STest()
Default builder
-
K_STest
public K_STest(NumericSequence newSequence)
Builder. Load data to test.- Parameters:
newSequence- data to test.
-
-
Method Detail
-
clearData
public void clearData()
Clears the data stored in the test- Specified by:
clearDatain classStatisticalTest
-
setData
public void setData(NumericSequence newSequence)
Load data to test.- Parameters:
newSequence- data to test.
-
adjustNormal
public void adjustNormal(double m, double s)Sets adjustment to a Normal distribution, specifying mean and sigma.- Parameters:
m- mean of the distributions- sigma parameter of the distribution
-
adjustExponential
public void adjustExponential(double m)
Sets adjustment to a Exponential distribution fully defined- Parameters:
m- mean of the distribution
-
adjustUniform
public void adjustUniform(double start, double end)Sets adjustment to a Uniform distribution fully defined- Parameters:
start- lower limit of the distributionend- upper limit of the distribution
-
adjustChiSquare
public void adjustChiSquare(int freedom)
Sets adjustment to a Chi-square distribution fully defined- Parameters:
freedom- number of degrees of freedom
-
adjustGamma
public void adjustGamma(double K, double lambda)Sets adjustment to a Gamma distribution fully defined- Parameters:
K- K parameter of the distributionlambda- lambda parameter of the distribution
-
adjustLaplace
public void adjustLaplace(double mean, double scale)Sets adjustment to a Laplace distribution fully defined- Parameters:
mean- mean of the distributionscale- scale parameter of the distribution
-
adjustLogistic
public void adjustLogistic(double mean, double S)Sets adjustment to a Logistic distribution fully defined- Parameters:
mean- mean of the distributionS- S parameter of the distribution
-
adjustWeibull
public void adjustWeibull(double K, double lambda)Sets adjustment to a Weibull distribution fully defined- Parameters:
K- K parameter of the distributionlambda- lambda parameter of the distribution
-
doTest
public void doTest()
Performs the test- Specified by:
doTestin classStatisticalTest
-
getDn
public double getDn()
Get Dn statistic- Returns:
- Dn Statistic
-
getPValue
public double getPValue()
Get p-value of the test- Returns:
- p-value computed
-
printData
public java.lang.String printData()
Prints the data stored in the test- Specified by:
printDatain classStatisticalTest- Returns:
- Data stored
-
printReport
public java.lang.String printReport()
Prints a report with the results of the test- Specified by:
printReportin classStatisticalTest- Returns:
- Output report
-
-
DMelt 3.0 © DataMelt by jWork.ORG