jhplot.stat
Class Anova
- java.lang.Object
-
- jhplot.stat.Anova
-
public class Anova extends java.lang.ObjectClass for performing simple 1-way ANOVA. For multi-way ANOVA, try mathematica.
-
-
Constructor Summary
Constructors Constructor and Description Anova(double[][] p_data)Creates a newAnovainstance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetDOF1()The first degree of freedom is equal to the number of sample groups, minus 1.intgetDOF2()The second degree of freedom is equal to the total number of data points, minus the number of samples.doublegetF()Returns the F-value for your data.double[]getMeans()Returns an array of means for all of your sample groups.doublegetP()Returns the p-value that your data is all drawn from a single distribution.static voidmain(java.lang.String[] argv)voidprintData()Prettyprints your data and the results of the ANOVA.voidprintResults()Pretty prints your results.
-
-
-
Constructor Detail
-
Anova
public Anova(double[][] p_data)
Creates a newAnovainstance. Pass in the samples as an array of double arrays. Naturally, they may have different sizes.- Parameters:
p_data- adouble[][]value
-
-
Method Detail
-
printData
public void printData()
Prettyprints your data and the results of the ANOVA.
-
printResults
public void printResults()
Pretty prints your results.
-
getP
public double getP()
Returns the p-value that your data is all drawn from a single distribution. Lowerpmeans you have an effect that is more likely to be significant.- Returns:
- a
doublevalue
-
getF
public double getF()
Returns the F-value for your data. Sometimes people like to give this along with the p-value in publications.- Returns:
- a
doublevalue
-
getDOF1
public int getDOF1()
The first degree of freedom is equal to the number of sample groups, minus 1.- Returns:
- an
intvalue
-
getDOF2
public int getDOF2()
The second degree of freedom is equal to the total number of data points, minus the number of samples.- Returns:
- an
intvalue
-
getMeans
public double[] getMeans()
Returns an array of means for all of your sample groups.- Returns:
- a
double[]value
-
main
public static void main(java.lang.String[] argv)
-
-
DMelt 3.0 © DataMelt by jWork.ORG