drasys.or.stat
Class PopulationMean

java.lang.Object
  |
  +--drasys.or.stat.PopulationMean

public class PopulationMean
extends java.lang.Object

Estimate the population mean and confidence interval from a sample. The population is assumed to be normally distributed. Also computes the sample size required for for a given confidence.

References:

Mathematical Statistics : Basic Ideas and Selected Topics
    Peter J. Bickel / Hardcover / Published 1991
Introduction to Mathematical Statistics
    Robert V. Hogg, Allen T. Craig (Contributor) / Hardcover / Published 1995
Mathematical Statistics With Applications
    Dennis D. Wackerly, et al / Hardcover / Published 1996
Probability and Statistics
    Morris H. Degroot / Hardcover / Published 1986
Numerical Recipes in C : The Art of Scientific Computing
    William H. Press, et al / Hardcover / Published 1993


Constructor Summary
PopulationMean(int sampleSize, double sampleMean, double populationStd)
          Create an estimator from explicit statistics.
PopulationMean(VectorI sample)
          Create an estimator from a sample.
 
Method Summary
 double getLowerBound(double confidenceLevel)
          Computes the lower bound of the confidence interval.
 double getMean()
          Returns the mean.
 double getStd()
          Returns the standard deviation.
 double getUpperBound(double confidenceLevel)
          Computes the upper bound of the confidence interval.
static int sampleSize(double std, double confidenceLevel, double confidenceInterval)
          Computes the sample size needed for the given arguments.
 double size()
          Returns the size of the sample.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopulationMean

public PopulationMean(int sampleSize,
                      double sampleMean,
                      double populationStd)
Create an estimator from explicit statistics.

PopulationMean

public PopulationMean(VectorI sample)
Create an estimator from a sample.
Method Detail

sampleSize

public static int sampleSize(double std,
                             double confidenceLevel,
                             double confidenceInterval)
Computes the sample size needed for the given arguments. This assumes the population is normally distributed. The population mean will be bounded by (mean - CI) and (mean + CI).

size

public double size()
Returns the size of the sample.

getMean

public double getMean()
Returns the mean.

getStd

public double getStd()
Returns the standard deviation.

getLowerBound

public double getLowerBound(double confidenceLevel)
Computes the lower bound of the confidence interval.

getUpperBound

public double getUpperBound(double confidenceLevel)
Computes the upper bound of the confidence interval.


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com