|
JMSLTM Numerical Library 4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.imsl.stat.TableOneWay
Tallies observations into a one-way frequency table.
Constructor Summary | |
TableOneWay(double[] x,
int nIntervals)
Constructor for TableOneWay . |
Method Summary | |
double[] |
getFrequencyTable()
Returns the one-way frequency table. |
double[] |
getFrequencyTable(double lower_bound,
double upper_bound)
Returns a one-way frequency table using known bounds. |
double[] |
getFrequencyTableUsingClassmarks(double[] classmarks)
Returns the one-way frequency table using class marks. |
double[] |
getFrequencyTableUsingCutpoints(double[] cutpoints)
Returns the one-way frequency table using cutpoints. |
double |
getMaximum()
Returns maximum value of x . |
double |
getMinimum()
Returns the minimum value of x . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TableOneWay(double[] x, int nIntervals)
TableOneWay
.
x
- A double
array containing
the observations.nIntervals
- An int
scalar containing the
number of intervals (bins).Method Detail |
public double[] getFrequencyTable()
nIntervals
intervals of equal length are used with the initial interval
starting with the minimum value in x
and the last interval
ending with the maximum value in x
. The initial interval is
closed on the left and the right. The remaining intervals are
open on the left and the closed on the right. Each interval is
of length (max-min)/nIntervals
, where max
is the
maximum value of x and min
is the minimum value of x
.
double
array containing the one-way frequency
table.public double[] getFrequencyTable(double lower_bound, double upper_bound)
lower_bound
as its right endpoint. The last interval is open on the left
and includes all values greater than upper_bound
.
The remaining nIntervals - 2
intervals are each
of length
(upper_bound - lower_bound)/ (nIntervals - 2)
and are open on the left and closed on the right.
nIntervals
must be greater than or equal to 3.
lower_bound
- double
specifies the right endpoint.upper_bound
- double
specifies the left endpoint.
double
array containing the one-way frequency
table.public double[] getFrequencyTableUsingClassmarks(double[] classmarks)
classmarks
of length nIntervals
.
The class marks are the midpoints of each of the nIntervals
.
Each interval is assumed to have length classmarks[1] - classmarks[0]
.
nIntervals
must be greater than or equal to 2.
classmarks
- double
array containing either the cutpoints or
the class marks.
double
array containing the one-way frequency
table.public double[] getFrequencyTableUsingCutpoints(double[] cutpoints)
cutpoints
of length nIntervals
-1. This
option allows unequal interval lengths. The initial interval
is closed on the right and includes the initial cutpoint as
its right endpoint. The last interval is open on the left
and includes all values greater than the last cutpoint.
The remaining nIntervals
-2 intervals are open
on the left and closed on the right. Argument nIntervals
must be greater than or equal to 3 for this option.
cutpoints
- double
array containing the cutpoints.
double
array containing the one-way frequency
table.public double getMaximum()
x
.
double
containing the maximum
data bound.public double getMinimum()
x
.
double
containing the minimum
data bound.
|
JMSLTM Numerical Library 4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |