1package umontreal.ssj.mcqmctools;
3import umontreal.ssj.rng.RandomStream;
4import umontreal.ssj.stat.*;
5import umontreal.ssj.stat.list.ListOfTallies;
6import umontreal.ssj.stat.list.lincv.*;
7import umontreal.ssj.util.Chrono;
8import umontreal.ssj.util.PrintfFormat;
29 for (
int i = 0; i < n; i++) {
52 for (
int i = 0; i < n; i++) {
66 for (
int i = 0; i < n; i++) {
82 for (
int i = 0; i < n; i++) {
115 double meanC = statC.
average();
118 double beta = covCX / varC;
119 mean[1] = mean[0] - beta * meanC;
120 variance[1] = variance[0] + beta * beta * varC - 2 * beta * covCX;
138 for (
int i = 0; i < n; i++) {
157 for (
int i = 0; i < n; i++) {
173 Tally statValue,
double level,
int d,
Chrono timer) {
180 str.
append(
"Variance per run: ");
193 Tally statValue,
double level,
int d) {
229 double[] centerAndRadius =
new double[2];
233 double[] varCV =
new double[1];
235 str.
append(
"Variance per run with CV: " + varCV[0] +
"\n");
236 str.
append(
"Center of CI: " + centerAndRadius[0] +
"\n");
237 str.
append(
"Radius of CI: " + centerAndRadius[1] +
"\n");
255 double[] variance,
double level,
int d,
Chrono timer) {
262 str.
append(
"Average, no CV: " + mean[0] +
"\n");
263 str.
append(
"Average with CV: " + mean[1] +
"\n");
264 str.
append(
"Variance, no CV: " + variance[0] +
"\n");
265 str.
append(
"Variance with CV: " + variance[1] +
"\n");
This class is a variant of Tally for which the individual observations are stored in a list implement...
double covariance(TallyStore t2)
Returns the sample covariance of the observations contained in this tally, and the other tally t2.
void init()
Initializes the statistical collector.
void add(double x)
Adds one observation x to this probe.
double average()
Returns the average value of the observations since the last initialization.
void setConfidenceIntervalStudent()
Indicates that a confidence interval on the true mean, based on the normality assumption,...
double variance()
Returns the sample variance of the observations since the last initialization.
void init()
Initializes the statistical collector.
void add(double x)
Gives a new observation x to the statistical collector.
String report()
Returns a formatted string that contains a report on this probe.
void init()
Initializes this list of statistical probes by calling umontreal.ssj.stat.StatProbe....
Represents a list of tally statistical collectors.
void add(double[] x)
Adds the observation x[i] in tally i of this list, for i = 0,…, size() - 1.
Represents a list of tallies with control variables that inherits the functionalities of a list of ta...
void add(double[] x, double[] c)
Adds a new observation to this list of tallies.
void varianceWithCV(double[] v)
Fills the given array with the variance of each component of.
void covarianceWithCV(DoubleMatrix2D covCV)
Computes the sample covariance of by replacing ,.
double averageWithCV(int i)
Returns the average of the th component of.
void confidenceIntervalStudentWithCV(int i, double level, double[] centerAndRadius)
Computes a confidence interval for the th component of.
void estimateBeta()
Estimates the matrix from the observations currently in this list of tallies.
String format()
Converts the CPU time used by the program since its last call to init for this AbstractChrono to a St...
void init()
Initializes this AbstractChrono to zero.
The Chrono class extends the umontreal.ssj.util.AbstractChrono class and computes the CPU time for th...
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...
void resetNextSubstream()
Reinitializes the stream to the beginning of its next substream:
void resetStartSubstream()
Reinitializes the stream to the beginning of its current substream: