integerFrequency

fun ReportBuilder.integerFrequency(freq: IntegerFrequency, caption: String? = null, confidenceLevel: Double = 0.95, showStatistics: Boolean = true)(source)

Appends a self-contained section that reports the frequency distribution, summary statistics on the observed integer values, and a frequency bar plot.

Produces (inside a section titled caption or freq.name):

  1. A ksl.utilities.io.report.ast.ReportNode.Paragraph summarising the observed integer range, distinct value count, total observations, and over/underflow counts.

  2. A DataTable ("Frequency Table") with columns: Value | Label | Count | Cum Count | % | Cum %

  3. A ksl.utilities.io.report.ast.ReportNode.StatTable ("Statistics on Observed Values") built from IntegerFrequency.statistic — the explicit bridge from IntegerFrequency (not StatisticIfc) to the StatTable node.

  4. A ksl.utilities.io.report.ast.ReportNode.PlotNode for the frequency bar chart.

Usage:

val doc = report("Number-in-System Analysis") {
integerFrequency(serverCountFrequency)
}

Parameters

freq

the integer frequency tabulation to report

caption

optional section title; defaults to freq.name

confidenceLevel

confidence level for the StatTable half-width and CI; must be in (0, 1)

showStatistics

when true (default) a ksl.utilities.io.report.ast.ReportNode.StatPropertyTable is included summarising the statistics on the observed integer values. Set to false when the statistics on the raw integer values have no meaningful interpretation — e.g. rank-frequency distributions where the frequency table and plot already tell the complete story.