Method · Statistics Library

Exploratory Data Analysis (one-click EDA)

One-click EDA profiles every selected variable, flags data-quality problems, maps the pairwise correlation and association structure, and (with a grouping column) auto-picks group comparisons, with every p-value honestly labeled exploratory and adjusted for the number of tests run.

Chapter 2: Describe and visualize dataReading 2.4

Understand the idea

Before you ask one specific, carefully chosen question of your data, it helps to look around first: what do the variables look like, is anything broken (duplicate rows, a column that is secretly all one value, a '999' that really means missing), what tends to move together, and do any groups look different at a glance? That look-around is exploratory data analysis, and this card runs all of it in one click.

The crucial word is EXPLORATORY. Every test this card runs (every correlation, every group comparison) is scored against the same dataset you are exploring, and you are implicitly running dozens of tests at once (one per variable pair, one per group comparison). Some of those will look 'significant' by pure chance, the same way rolling enough dice eventually turns up snake eyes. This card corrects for that (it adjusts the whole family of p-values, not just the ones that looked interesting) and still stamps every result EXPLORATORY, because a finding from looking around is a lead worth chasing, not proof of anything yet.

The honest next step after EDA is to write down, BEFORE looking further, exactly which finding you want to confirm, then test it, ideally on new data. A pattern found and confirmed on the same dataset the pattern was found in is the single most common way real research goes wrong.

One-click EDA is an auto EDA: a first round of data exploration that summarizes every column and flags problems before any formal test.

Practitioner explanation

The card runs, in order: (1) per-variable profiles via the same engine as Descriptive Summary, including a formal normality verdict and outlier counts by two independent rules (Tukey's 1.5xIQR fence and the MAD-based modified z-score, which stays robust when outliers have already inflated the SD); (2) a data-quality triage (duplicate rows, constant/all-missing columns, ID-like columns, sentinel-value patterns); (3) the pairwise correlation matrix over the numeric block plus a chi-square association test per categorical pair; (4) when a grouping column is supplied, an auto-picked comparison per numeric variable (two-sample t for 2 levels, one-way ANOVA for 3+) with its own assumption checks, surfacing the rank-based alternative (Mann-Whitney / Kruskal-Wallis) automatically when normality fails, the same assumption-autopilot mapping the standalone test cards use.

Multiplicity is treated as one family across the WHOLE card: every p-value it produces (correlations, chi-square associations, group tests) is corrected together, defaulting to Benjamini-Hochberg FDR (changeable with the FDR method option), with raw and adjusted verdicts reported side by side rather than adjusted-only, so nothing is hidden. This is a genuinely different posture from running each of those same tests individually on their own cards, where no cross-test correction applies: the EDA card is the one place in KernelStats that treats 'everything I looked at in one sitting' as the statistical family it actually is.

The 'garden of forking paths' problem is stated on the card, not merely footnoted: even FDR-adjusted, exploratory p-values only correct for the tests actually run, not for every test you WOULD have run had the data looked different (which variable to plot, which subgroup to slice), so a surviving result is a good candidate for a pre-registered confirmatory follow-up, not a confirmed finding by itself.

When to use it

Consider it when

First contact with a new dataset, or any time before committing to a specific confirmatory test, to see variable shapes, data-quality problems, the correlation/association structure, and candidate group differences, all with multiple-testing honesty built in.

Use caution when

As a substitute for a pre-planned, confirmatory analysis. A result that only shows up in the EDA card should be written down as a hypothesis and tested again, ideally on data not used to find it, before it is reported as a real finding, and never reported as confirmed on the strength of surviving FDR adjustment alone.

Formulas and symbols

Family-wise false-positive risk across m exploratory tests

P(at least one false positive)=1−(1−α)mP(\text{at least one false positive}) = 1-(1-\alpha)^{m}

At m = 30 simultaneous tests and alpha = 0.05 this is about 79%, which is why the whole family is FDR-adjusted rather than read at raw alpha.

Count of significant findings, raw vs FDR-adjusted

nsig, raw vs nsig, adjustedn_{\text{sig, raw}} \ \text{vs}\ n_{\text{sig, adjusted}}

Reported side by side so the multiplicity correction's effect is visible, not hidden behind a single adjusted-only number.

Assumptions and checks

  • EDA runs many descriptive summaries and pairwise tests on data already viewed, so any single small p-value turned up while scanning is a screening signal, not confirmatory evidence; treating it as a confirmed finding inflates the true false-positive rate across the whole scan.

    In KernelStats: Flagged directly, never as a passed check: the card carries an EXPLORATORY data warning and an honesty block (verdict EXPLORATORY, 'exploratory is not confirmatory') rather than an assumption row, so no green tick stands in for a disclaimer, and every p-value the card produces (correlations, categorical associations, group comparisons) is corrected as one family via Multiple Testing Correction (Benjamini-Hochberg by default), with raw and adjusted counts shown side by side. The correction covers only the tests actually run, not the forking paths of choices made after looking.

  • Independence of observations. Each embedded pairwise test (t-tests, ANOVAs, chi-square tests of association) carries its own assumptions (normality, equal variance, independence, adequate expected counts); a test that fails one of its own assumptions is only surfaced here by name, not re-derived in full.

    In KernelStats: Downstream: each embedded test's own assumption checks (Shapiro-Wilk, Levene's, expected-count guards, etc.). This master card surfaces only the ones that FAILED, capped at a fixed number of rows; see that specific method's own card and knowledge-base entry for the full mechanism.

Alternatives

  • Descriptive Summary. You only need the per-variable profile (center, spread, shape) without the correlation structure, group comparisons, or multiplicity machinery.
  • Correlation Matrix. You already know exactly which variables you want to relate and do not need the full data-quality triage or group-comparison sweep.
  • Two-Sample t-Test. You have pre-registered a SPECIFIC group comparison as your confirmatory analysis: run the dedicated test card, which is not part of the EDA's exploratory family and is not FDR-diluted by everything else you looked at.

Worked example

Scenario

A one-click EDA on the penguins dataset with species as the grouping column, exploring bill length, bill depth, flipper length, and body mass.

Result

All four numeric variables show significant species differences (raw and FDR-adjusted); bill depth fails its normality check for one species, so the card surfaces the Kruskal-Wallis alternative alongside the ANOVA; flipper length and body mass correlate at r = 0.87 (adjusted p < .001).

Interpretation

Species is clearly associated with all four measurements (a strong candidate for a confirmatory follow-up analysis), and because one variable failed normality, the rank-based result (not just the ANOVA) belongs in that follow-up's plan.

Dataset: penguins.csv

Common misconceptions

Misconception

A p-value that survives this card's FDR correction is a confirmed result.

Correction

FDR control only keeps the EXPECTED fraction of false leads among your discoveries small; it does not certify any individual one. A surviving result is a good candidate for a pre-registered confirmatory follow-up, ideally on new data, not a confirmed finding on its own.

Read more: Misconception: the p-value is the probability the null hypothesis is true

Misconception

If I only report the pairs or group comparisons that looked interesting in the EDA, I don't need to worry about the rest.

Correction

Selective reporting is exactly the problem multiplicity correction exists to prevent. The 'family' the FDR adjustment corrects is every test the card actually ran, not the subset that happened to look promising: reporting only the winners re-introduces the inflated false-positive rate the correction was supposed to remove.

References

  1. Exploratory Data Analysis, Tukey, J. W. (1977).
  2. The garden of forking paths: Why multiple comparisons can be a problem, even when there is no 'fishing expedition' or 'p-hacking' and the research hypothesis was posited ahead of time, Gelman, A. and Loken, E. (2013).