discreteGoodnessOfFit

fun ReportBuilder.discreteGoodnessOfFit(fit: PMFFitData, caption: String? = null, confidenceLevel: Double = 0.95)(source)

Appends a self-contained section reporting the goodness-of-fit results for a single DiscretePMFGoodnessOfFit.

Produces (inside a section titled caption or gof.distribution.toString()):

  1. Overview paragraph — distribution, estimated parameters, DOF, index of dispersion

  2. Chi-Squared Bin Table — Bin Label | P(Bin) | Observed | Expected | Note; Note column flags bins where expected count is less than 5

  3. Goodness of Fit Test — test summary DataTable (DOF, statistic, p-value, conclusion at the given confidenceLevel)

  4. Dispersion Tests — index of dispersion and Poisson variance test statistic from DiscreteDistributionGOFIfc

  5. Distribution Comparison sub-section — PMFComparisonPlot overlaying the empirical PMF (from the fit's data) against the theoretical PMF (from the fitted distribution)

Parameters

fit

the PMFFitData to report (the goodness-of-fit object plus the data)

caption

optional section title; defaults to the fitted distribution's name

confidenceLevel

significance level for the GOF test conclusion; must be in (0, 1)


fun ReportBuilder.discreteGoodnessOfFit(gof: DiscretePMFGoodnessOfFit, modeler: PMFModeler, caption: String? = null, confidenceLevel: Double = 0.95)(source)

Backward-compatible overload that renders the discrete goodness-of-fit section for a live DiscretePMFGoodnessOfFit, using modeler for the PMF comparison plot's empirical data. Delegates to the PMFFitData renderer.