drasys.or.stat
Class PopulationProportion

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

public class PopulationProportion
extends java.lang.Object

Estimate the population proportion and confidence interval from a sample.

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
PopulationProportion(boolean[] sample)
          Create an estimator with a boolean valued sample.
PopulationProportion(int[] sample)
          Create an estimator with an integer valued sample.
PopulationProportion(int[] sample, int minSuccess)
          Create an estimator with an integer valued sample.
PopulationProportion(int sampleSize, int successCount)
          Create an estimator with explicit statistics.
PopulationProportion(VectorI sample)
          Create an estimator with a real valued sample.
PopulationProportion(VectorI sample, double minSuccess)
          Create an estimator with a real valued sample.
 
Method Summary
 double getLowerBound(double confidenceLevel)
          Computes the lower bound of the confidence interval.
 double getProportion()
          Returns the estimate of the proportion of successes in the population.
 double getUpperBound(double confidenceLevel)
          Computes the upper bound of the confidence interval.
 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

PopulationProportion

public PopulationProportion(int sampleSize,
                            int successCount)
Create an estimator with explicit statistics.

PopulationProportion

public PopulationProportion(boolean[] sample)
Create an estimator with a boolean valued sample. Sample values of 'true' are counted as successes.

PopulationProportion

public PopulationProportion(VectorI sample)
Create an estimator with a real valued sample. Sample values greater than zero are counted as successes.

PopulationProportion

public PopulationProportion(VectorI sample,
                            double minSuccess)
Create an estimator with a real valued sample. Sample values greater than or equal to 'minSuccess' are counted as successes.

PopulationProportion

public PopulationProportion(int[] sample)
Create an estimator with an integer valued sample. Sample values greater than zero are counted as successes.

PopulationProportion

public PopulationProportion(int[] sample,
                            int minSuccess)
Create an estimator with an integer valued sample. Sample values greater than or equal to 'minSuccess' are counted as successes.
Method Detail

size

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

getProportion

public double getProportion()
Returns the estimate of the proportion of successes in the population.

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