public class PairedStats extends Object implements RevisionHandler
Modifier and Type | Field and Description |
---|---|
double |
correlation
The correlation coefficient
|
double |
count
The number of data points seen
|
double |
differencesProbability
The probability of obtaining the observed differences
|
int |
differencesSignificance
A significance indicator:
0 if the differences are not significant
> 0 if x significantly greater than y
< 0 if x significantly less than y
|
Stats |
differencesStats
The stats associated with the paired differences
|
protected int |
m_degreesOfFreedom
The degrees of freedom (if set programmatically)
|
double |
sigLevel
The significance level for comparisons
|
Stats |
xStats
The stats associated with the data in column 1
|
double |
xySum
The sum of the products
|
Stats |
yStats
The stats associated with the data in column 2
|
Constructor and Description |
---|
PairedStats(double sig)
Creates a new PairedStats object with the supplied significance level.
|
Modifier and Type | Method and Description |
---|---|
void |
add(double[] value1,
double[] value2)
Adds an array of observed pair of values.
|
void |
add(double value1,
double value2)
Add an observed pair of values.
|
void |
calculateDerived()
Calculates the derived statistics (significance etc).
|
int |
getDegreesOfFreedom()
Gets the degrees of freedom.
|
String |
getRevision()
Returns the revision string.
|
static void |
main(String[] args)
Tests the paired stats object from the command line.
|
void |
setDegreesOfFreedom(int d)
Sets the degrees of freedom (if calibration is required).
|
void |
subtract(double[] value1,
double[] value2)
Removes an array of observed pair of values.
|
void |
subtract(double value1,
double value2)
Removes an observed pair of values.
|
String |
toString()
Returns statistics on the paired comparison.
|
public Stats xStats
public Stats yStats
public Stats differencesStats
public double differencesProbability
public double correlation
public double xySum
public double count
public int differencesSignificance
public double sigLevel
protected int m_degreesOfFreedom
public PairedStats(double sig)
sig
- the significance level for comparisonspublic void setDegreesOfFreedom(int d)
public int getDegreesOfFreedom()
public void add(double value1, double value2)
value1
- the value from column 1value2
- the value from column 2public void subtract(double value1, double value2)
value1
- the value from column 1value2
- the value from column 2public void add(double[] value1, double[] value2)
value1
- the array containing values from column 1value2
- the array containing values from column 2public void subtract(double[] value1, double[] value2)
value1
- the array containing values from column 1value2
- the array containing values from column 2public void calculateDerived()
public String toString()
public String getRevision()
getRevision
in interface RevisionHandler
public static void main(String[] args)
args
- ignored.Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.