LabKit MATLAB Workbench

history

T-Test Wizard adds table selection and first-versus-each comparisons

id: LK-20260718-ttest-wizard-and-table-workspace
date: 2026-07-19
sequence: 135
type: feat
compatibility: compatible
component: `labkit_TTestWizard_app` | `new -> 1.0.0`
component: `labkit.ui` | `7.5.1 -> 7.6.0`
scope: Statistics
scope: CSV exchange
scope: App Framework presentation

Context

Laboratory comparison data appeared as manually maintained workbook blocks, same-shape files, and rectangular App exports containing identifiers beside numeric metrics. Schema-first mapping made unfamiliar sources harder to use. The required workflow also included several treatments compared with one control, while the first implementation boundary held only A and B.

Runtime presentation could update table values but not their spreadsheet headers or collapse unused workspace panels. An App therefore could not show an unfamiliar table faithfully while giving each wizard step the full workspace.

Decision and rationale

Display CSV, TSV, XLSX, and XLS sources as visible cell grids. Let the user append each numeric selection as an ordered durable group. The first group is the explicit reference; one chosen t-test specification is then applied to every later group versus that first group.

Keep Data, Test/Plot, and Export controls short. Put Data and Plot in user-selectable right-side workspace pages, merge result review with the test, and keep completed comparisons as immutable snapshots. Plot controls consume those snapshots and cannot recalculate the result family.

Keep CSV as a low-constraint rectangular interchange boundary. Known producers may add conveniences later, but visible cell selection remains the fallback.

Changes

User and data impact

Users can select any number of groups from an unfamiliar readable table without defining a schema or removing unrelated text. Running creates one comparison row for every group after the first. Paired testing follows displayed row order for each comparison with the first group.

The App exports ordinary CSVs instead of requiring another program to decode a project MAT file. Imported sources are not modified.

Compatibility and migration

The App and Statistics family are additive. Version-1 T-Test Wizard projects migrate A to group 1 and B to group 2, preserving labels, values, and source metadata. An earlier completed A/B result remains a one-row result family.

labkit.ui remains compatible with >=7 <8. Existing presentation structs that omit dynamic table headers and visibility behave as before.

No multiple-comparison correction is silently introduced. This preserves the meaning of each requested t-test and makes the limitation explicit.

Validation

Unit tests cover mixed-cell extraction, source preservation, Welch/pooled/ paired reference values, first-versus-each ordering, result-family identity, and multi-group CSV round trips.

A focused framework GUI check proves rapid selections commit only the final range and repeated file-context presentation does not duplicate plot titles. A hidden App GUI workflow covers three captured ranges, batch group changes, two comparisons with the first group, equal-height source/editor tables, native Data/Plot pages, compact stale-plot messaging, bar/box selection, boxed grid-free rendering, and both exports. Framework GUI tests cover native workspace pages, invalid page composition, dynamic table headers, missing-cell display, full-width previews, collapsed hidden rows, and invalid presentation diagnostics.

Representative private workbook structures informed the visual and workflow requirements without copying paths, filenames, identifiers, or values into the repository.

Evidence

Known limitations and follow-up

Version 1.0.0 does not infer experimental units, independence, pairing, exclusions, or groups from filenames. It does not apply multiple-comparison correction, ANOVA, nonparametric tests, regression, or mixed modeling. Automatic numeric-column suggestions remain a possible convenience only after real use demonstrates a stable need.