|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectpapaya.Descriptive.Pooled
public static class Descriptive.Pooled
Class for computing the pooled mean and variance of data sequences
| Method Summary | |
|---|---|
static float |
mean(float[] means,
int[] sizes)
Returns the pooled mean of a k data sequences. |
static float |
mean(float mean1,
int size1,
float mean2,
int size2)
Returns the pooled mean of two data sequences. |
static float |
var(float[] variances,
int[] sizes,
boolean unbiased)
Returns the pooled variance of k data sequences. |
static float |
var(float variance1,
int size1,
float variance2,
int size2,
boolean unbiased)
Returns the pooled variance of two data sequences. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static float mean(float mean1,
int size1,
float mean2,
int size2)
(size1 * mean1 + size2 * mean2) / (size1 + size2).
size1 - the number of elements in data sequence 1.mean1 - the mean of data sequence 1.size2 - the number of elements in data sequence 2.mean2 - the mean of data sequence 2.
public static float mean(float[] means,
int[] sizes)
k data sequences.
That is (size1 * mean1 + size2 * mean1 + ... + sizek * meank) / (size1 + size2 + ... + sizek).
public static float var(float variance1,
int size1,
float variance2,
int size2,
boolean unbiased)
unbiasedPooledVar = Sum( (size_i -1)*variance_i ) / Sum( (size_i-1) ),while the biased pooled variance is computed using
biasedPooledVar = Sum( (size_i)*variance_i ) / Sum(size_i), For more than 2 datasets, usevar(float[],int[],boolean).
size1 - the number of elements in data sequence 1.variance1 - the variance of data sequence 1.size2 - the number of elements in data sequence 2.variance2 - the variance of data sequence 2.unbiased - set to true to return the unbiased pooled variance,
false to return the biased version.
public static float var(float[] variances,
int[] sizes,
boolean unbiased)
k data sequences. The unbiased estimate of the
pooled variance is computed as
unbiasedPooledVar = Sum( (sizes[i] -1)*variances[i] ) / Sum( (sizes[i]-1) ),while the biased pooled variance is computed using
biasedPooledVar = Sum( (sizes[i])*variances[i] ) / Sum(sizes[i]),
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||