public class ConfidenceCalculator extends Tally
ConfidenceCalculator
class has the same functionality as the
Tally
class. Additionally, it calculates a confidence interval for
the mean of the samples passed to the ConfidenceCalculator
.
Note that the confidence interval computation assumes that the samples
are (approximately) identically and independently distributed. Observe
that the confidence interval estimations of this class are meaningless should
this assumption not hold!Tally
UNDEFINED
Constructor and Description |
---|
ConfidenceCalculator(Model ownerModel,
java.lang.String name,
boolean showInReport,
boolean showInTrace)
Constructor for a ConfidenceCalculator object that has no connection to a
ValueSupplier . |
ConfidenceCalculator(Model ownerModel,
java.lang.String name,
ValueSupplier valSup,
boolean showInReport,
boolean showInTrace)
Constructor for a ConfidenceCalculator object that is connected to a
ValueSupplier . |
Modifier and Type | Method and Description |
---|---|
Reporter |
createDefaultReporter()
Returns a Reporter to produce a report about this ConfidenceCalculator.
|
double |
getConfidenceIntervalOfMeanLowerBound()
Calculates the lower bound of the confidence interval of the mean.
|
double |
getConfidenceIntervalOfMeanUpperBound()
Calculates the upper bound of the confidence interval of the mean.
|
double |
getConfidenceLevel()
Returns the confidence level.
|
void |
setConfidenceLevel(double level)
Sets the confidence level; default value is 0.95.
|
getMean, getStdDev, reset, update, update, update
getLastValue, getMaximum, getMinimum, update
getShowTimeSpansInReport, getUnit, setShowTimeSpansInReport
getUnitText, round, setUnit
getCorrespondingSchedulable, getDescription, getObservations, getReporter, incrementObservations, incrementObservations, reportIsOn, reportOff, reportOn, resetAt, setCorrespondingSchedulable, setDescription, setReporter
current, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
getName, getQuotedName, toString
public ConfidenceCalculator(Model ownerModel, java.lang.String name, ValueSupplier valSup, boolean showInReport, boolean showInTrace)
ValueSupplier
. The confidence level is set to 0.95.ownerModel
- Model : The model this ConfidenceCalculator is associated toname
- java.lang.String : The name of this ConfidenceCalculator
objectvalSup
- ValueSupplier : The ValueSupplier providing the value for this
ConfidenceCalculator. The given ValueSupplier will be observed
by this ConfidenceCalculator object.showInReport
- boolean : Flag for showing the report about this
ConfidenceCalculator.showInTrace
- boolean : Flag for showing the trace output of this
ConfidenceCalculator.public ConfidenceCalculator(Model ownerModel, java.lang.String name, boolean showInReport, boolean showInTrace)
ValueSupplier
. The confidence level is set to 0.95.ownerModel
- Model : The model this ConfidenceCalculator is associated toname
- java.lang.String : The name of this ConfidenceCalculator
objectshowInReport
- boolean : Flag for showing the report about this
ConfidenceCalculator.showInTrace
- boolean : Flag for showing the trace output of this
ConfidenceCalculator.public Reporter createDefaultReporter()
createDefaultReporter
in class Tally
public void setConfidenceLevel(double level)
Note: The confidence interval computation assumes that the input values are (approximately) identically and independently distributed.
level
- double : the confidence levelpublic double getConfidenceLevel()
public double getConfidenceIntervalOfMeanUpperBound()
public double getConfidenceIntervalOfMeanLowerBound()