|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uah.math.distributions.IntervalData
public class IntervalData
This class defines a simple implementation of an interval data distribution. The data distribution is based on a specified domain (that is, a partition of an interval). When values are added, frequency counts for the subintervals are computed and various statistic updated.
Constructor Summary | |
---|---|
IntervalData()
This default constructor creates a new data distribution on the interval [0, 1] with subintervals of length 0.1, and the default name "X". |
|
IntervalData(Domain d)
This special constructor creates a new data distribution with a specified domain and the default name "X". |
|
IntervalData(Domain d,
java.lang.String n)
This general constructor creates a new data distribution with a specified domain and a specified name. |
|
IntervalData(double a,
double b,
double w)
This spcial constructor creates a new data distribution with a specified (continuous) domain and the name "X". |
|
IntervalData(double a,
double b,
double w,
java.lang.String n)
This general constructor creates a new data distribution with a specified (continuous) domain and a specified name. |
Method Summary | |
---|---|
double |
getDensity(double x)
This method returns the density of the data distribution at a given value. |
Domain |
getDomain()
This method returns the domain. |
double |
getDomainValue(double x)
This method returns the domain value (midpoint) closest to given value of x. |
int |
getFreq(double x)
This method returns the frequency of the class containing a given value. |
int[] |
getFrequencies()
|
double |
getIntervalMean()
This method returns the mean of the frequency distribution. |
double |
getIntervalSD()
This method returns the interval standard deviation. |
double |
getIntervalVariance()
This method returns the variance of the frequency distribution. |
double |
getMAD()
This method computes the mean absoulte deviation from the median. |
double |
getMaxDensity()
This method returns the maximum density of the data set. |
int |
getMaxFreq()
This method returns the maximum frequency of the data set. |
double |
getMaxRelFreq()
This method returns the maximum relative frequency of the data set. |
double |
getMaxValue()
This method returns the maximum value of the data set. |
double |
getMean()
This method returns the true mean of the data set. |
double |
getMedian()
This method computes the median of the entire data set. |
double |
getMedian(double a,
double b)
This method computes the median of the values in the data set between two specified values. |
double |
getMinValue()
This method returns the minimum value of the data set. |
double |
getMode()
This method returns the mode of the distribution, if it is unique. |
java.lang.String |
getName()
This method gets the name of the data set. |
double |
getQuartile(int i)
This method returns the quartiles of the data set. |
double |
getRelFreq(double x)
This method returns the relative frequency of the class containing a given value. |
double |
getSD()
This method returns the standard deviation of the data set treated as a sample (that is, the sum is divided by n − 1 where n is the number of points. |
double |
getSDP()
This method returns the standard deviation of the data set treated as a population (that is, the sum is divided by the number of points n rather than n − 1). |
int |
getSize()
This method returns the number of points in the data set. |
double |
getValue()
This method returns the current value of the data set. |
double |
getVariance()
This method returns the variance of the data set treated as a sample (that is, the sum is divided by n − 1 where n is the number of points). |
double |
getVarianceP()
This method returns the variance of the data set treated as a population (that is, the sum is divided by the number of points n rather than n − 1). |
void |
reset()
This method resets the data set. |
void |
setDomain(Domain d)
This method sets the domain of the data set. |
void |
setName(java.lang.String n)
This method sets the name of the data set. |
void |
setValue(double x)
This method adds a new number to the data set and re-computes the mean, mean square, minimum and maximum values, the frequency distribution, and the mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntervalData(Domain d, java.lang.String n)
d
- the domainn
- the namepublic IntervalData(double a, double b, double w, java.lang.String n)
a
- the lower boundb
- the upper boundw
- the step sizen
- the namepublic IntervalData(Domain d)
d
- the domainpublic IntervalData(double a, double b, double w)
a
- the lower boundb
- the upper boundw
- the step sizepublic IntervalData()
Method Detail |
---|
public void setDomain(Domain d)
d
- the domainpublic Domain getDomain()
public void setName(java.lang.String n)
n
- the namepublic java.lang.String getName()
public void reset()
public void setValue(double x)
x
- the number to be added to the data setpublic double getValue()
public double getDomainValue(double x)
x
- a real number
public int getFreq(double x)
x
- a real number
public int[] getFrequencies()
public double getRelFreq(double x)
x
- a real number
public double getDensity(double x)
x
- a real number
public double getMean()
public double getIntervalMean()
public double getVarianceP()
public double getSDP()
public double getVariance()
public double getSD()
public double getIntervalVariance()
public double getIntervalSD()
public double getMinValue()
public double getMaxValue()
public double getMedian(double a, double b)
a
- the lower valueb
- the upper value
public double getMedian()
public double getQuartile(int i)
i
- the index of the quartile (1, 2, or 3)
public double getMAD()
public int getSize()
public int getMaxFreq()
public double getMaxRelFreq()
public double getMaxDensity()
public double getMode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |