Understand the idea
If a spreadsheet already shows 'Group A: mean = 24.3' and 'Group B: mean = 27.1' with no individual rows behind them, a t-test cannot be run on those two numbers alone; a t-test needs to know how much INDIVIDUAL measurements within each group varied, not just where the group centers landed.
This happens often with data that arrives pre-aggregated: a report showing category totals, a dashboard export with only percentages, or a table someone built by hand from a bigger dataset. The original row-level detail is gone, and no amount of clever statistics can recover the within-group spread that was never recorded.
The fix is to go back to the row-level data if it exists anywhere, or, if only summary statistics (mean, SD, n per group) are available, use a method built specifically for THAT input rather than force-fitting a raw-data test onto aggregated numbers.
A table of totals or averages per group is called aggregated data or grouped data, and a pre-summarized table like this has already thrown away the row-by-row spread most tests need. The ecological fallacy is the mistake of assuming that a pattern seen between group averages also holds for the individuals inside the groups.
Practitioner explanation
A standard two-sample t-test's standard error requires each group's own variance, which is unrecoverable from group means alone; if a summary table additionally reports each group's SD and n, a summary-statistics t-test formula (recomputing the same test from means, SDs and n rather than raw rows) gives an IDENTICAL result to running it on the original rows: the information loss is specifically in tables that report only the center (mean, median, percentage) with no measure of spread or sample size.
A related and more insidious version of this problem is the ECOLOGICAL FALLACY: running a correlation or regression on GROUP-LEVEL aggregates (e.g. country-level averages) and interpreting the result as if it held at the individual level, when the individual-level relationship can be weaker, stronger, or even reversed in sign relative to the aggregate-level one.
KernelStats runs a summary-table check on loaded tables: it scores column names (Mean, SD, Median, Q1, CV%) together with structural evidence (an n-like column summing far past the row count, Q1 <= median <= Q3, CV = 100 x SD / Mean, one row per group combination) and flags the table as pre-aggregated, and it detects totals rows such as 'ALL' that re-count the rows above them (a row that exceeds the column's other values by a margin and sits in a totals position or carries a totals label), warning on every card run on that table with the original row numbers and the instruction to exclude the row before analyzing; the warning only discloses, it never drops a row itself, it falls silent for a row you have already excluded through row state, and there is no one-click exclusion yet. KernelStats has no summary-statistics t-test; when only means, SDs and n per group exist, compute the test from those numbers directly (the pooled or Welch formula, or SciPy's t-test-from-summary-statistics function in Python), never by fabricating row-level data to satisfy a raw-data tool.
When to use it
Consider it when
Recognize a summary table (one row per group or category, with only aggregate columns like mean/count/percentage and no individual measurements) before attempting to run a standard test on it.
Use caution when
Do not run a raw-data hypothesis test's formula directly on aggregated rows as if each row were an individual observation: the resulting standard errors and p-values are meaningless for that mismatch.
Common misconceptions
Misconception
A regression run on group-level averages tells you about the relationship between the variables at the individual level.
Correction
This is the ecological fallacy: a relationship observed among group AVERAGES can differ in strength or even direction from the relationship among individuals within those groups. Aggregated data answers a question about aggregates, not about individuals.
References
- NIST/SEMATECH e-Handbook of Statistical Methods, §7.3.1 Do two processes have the same mean? (summary-statistics form), NIST/SEMATECH (2012), §7.3.1.
