|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjstats.Mean
Static methods for calculating means and other measures of center.
| Constructor Summary | |
Mean()
|
|
| Method Summary | |
static double |
arithmeticMean(double[] values)
Calculate the arithmetic mean from an array of doubles. |
static double |
binomialMean(double probability,
long trials)
Calculate a binomial mean. |
static double |
geometricMean(double[] values)
Calculates the geometic mean. |
static double |
grandMean(double[] weights,
double[] means)
Calculates the grand mean. |
static double |
harmonicMean(double[] values)
Calculates a harmonic mean. |
static double |
hypergeometricMean(double n,
double a,
double b)
|
static double |
median(double[] values)
Computes a median of an array of values. |
static double |
midrange(double[] values)
Computes the midrange (the value exactly between the lowest and highest values) from an array of doubles. |
static double |
probabilityMean(double probability,
double[] values)
Calculates the mean of a probability distribution. |
static double |
weightedMean(double[] weights,
double[] values)
Caculate a weighted mean. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Mean()
| Method Detail |
public static double median(double[] values)
throws StatisticException
values - an array of doubles
StatisticException - for an empty array
public static double midrange(double[] values)
throws StatisticException
values - an array of doubles
StatisticException - for an empty array
public static double arithmeticMean(double[] values)
throws StatisticException
values - An array of doubles.
StatisticException - for empty array
public static double binomialMean(double probability,
long trials)
throws StatisticException
probability - trials -
StatisticException
public static double geometricMean(double[] values)
throws StatisticException
values - An array of doubles containing ratios.
StatisticException
public static double grandMean(double[] weights,
double[] means)
throws StatisticException
weights - An array of doubles containing weights that correspond to each of the means.means - An array of doubles containing means from different observations.
StatisticException
public static double harmonicMean(double[] values)
throws StatisticException
values - An array of doubles containing frequencies.
StatisticException
public static double hypergeometricMean(double n,
double a,
double b)
public static double probabilityMean(double probability,
double[] values)
throws StatisticException
probability - values -
StatisticException
public static double weightedMean(double[] weights,
double[] values)
throws StatisticException
weights - Weights to use when calculating the mean.values - Data on which to perform the weighted mean.
StatisticException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||