Go to the first, previous, next, last section, table of contents.


CNBatchMeans -- Evaluation by Batch Means

SYNOPSIS

#include <CNCL/BatchMeans.h>

TYPE

CN_BatchMeans

BASE CLASSES

CNStatistics

DERIVED CLASSES

None

RELATED CLASSES

None

DESCRIPTION

The class CNBatchMeans provides the statistical evaluation of random sequences by the Batch-Means method. Results are the distribution (d.f.) and complementary distribution function (c.d.f.) respectively, a histogram of relative frequencies, Bayes-error and confidence intervals of each point of the d.f and the c.d.f. respectively, and of the estimated mean and the variance of the group means.

The evaluation needs at least n * h values; n is the number of batches and h the size of the batches if the constructor for fixed length evaluation is used. The evaluation is controlled by the relative Bayes error of the estimated mean when the constructor for variable length evaluation is used. For further information refer to "Principles of Discrete Event Simulation" by G.S. Fishman, J. Wiley & Sons, New York, 1978 and to "Improved Simulation by Application of the Objetive Bayes-Statistics" by F. Schreiber, AEUE, Vol. 34, pp. 234-249, 1980.

Constructors:

CNBatchMeans();
CNBatchMeans( CNParam *param );
CNBatchMeans( double bottom, double top, long intervals,
long size_of_groups, long no_of_groups, short conf = 95,
const char* name = NIL, const char* text = NIL );
CNBatchMeans( double bottom, double top, long intervals,
long size_of_groups, double max_rel_err, short conf = 95,
const char* name = NIL, const char* text = NIL );
Initializes a CNBatchMeans evaluation.The Parameters are:
bottom
top
lower resp. upper limit of evaluated values; values beyond these limits are only counted;
Mmax_rel_err
defined maximum error for variable length evaluation
no_of_groups
number of groups (batches) for fixed length evaluation
size_of_groups
size of one group (batch)
intervals
number of intervals to use. The higher the interval number the finer is the resolution of the distribution function, but the bigger are the confidence intervals.
name, text
a name and a descriptive text to use for the evaluation

In addition to the member functions required by CNCL and CNStatistics, CNBatchMeans provides:

double bayes_err() const;
Returns the relative Bayes error of the mean.
double sigma() const;
Returns the deviation of the group means; can also be used as an error measure of the mean, e.g. its relative Bayes error.
double mean_confidence() const;
Returns the confidence interval of the mean.
long min_index() const;
long max_index() const;
Return min and max interval number (maps to one line of output of the print function).
long groups_done() const;
Returns the number of evaluated groups (batches). Can be used as a progress report.
const struct CNBatchMeans::resultline *get_result(long index);
Returns one line of the result (as output by print). The range for index is min_index <= index <= max_index. The fields of the struct resultline are x, fx -- d.f., gx -- c.d.f., rh -- rel. probability of x, ferr, gerr --- bayes error of d.f. resp. c.d.f., fconf, gconf -- confidence interval.
void change_error(double ne);
Allows to change the maximum relative error during evaluation.
double p(double x) const;
double f(double x) const;
double g(double x) const;
Return probability, value of distribution function or value of complementary distribution function associated with the interval x belongs to.
double correlation() const;
Returns the 1st order correlation coefficient of the batch means. It should be nearly 0 in order to trust the evaluation results.
virtual void print( Type type = CNStatistics::DF, ostream &strm = cout ) const;
The first argument chooses between the output of d.f (CNStatistics::DF, default) and c.d.f. (CNStatistics::CDF), the second is an user defined output stream.


Go to the first, previous, next, last section, table of contents.