Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

An exploratory analysis from question to report

This chapter connects the pieces into an exploratory workflow on the Adult census-income dataset. We ask which descriptively simple groups have a higher share of the >50K income label? Then we change the question to working hours. The examples describe associations in this historical dataset, not current population estimates or effects of changing an individual’s attributes.

Load data and state the scope

Adult is fetched from OpenML on first use and cached under user_guide/data-cache/ when run from the book folder. This workflow reuses the introductory chapter’s data cache and the same sample and descriptor selection. The model-audit workflow uses an offline scikit-learn loader.

Analysis rows: 3000
Loading...

The deterministic sample keeps this book example small. The source dataset has a census sampling-weight column, fnlwgt; it is not a property that should define a subgroup and is excluded. The measures used here count rows equally, so the analysis is of these sampled records, not a survey-weighted inference.

Select descriptors deliberately. For example, education and education-num encode closely related information; we retain only the former. Keep missing descriptor values so that explicit missingness conditions can be considered.

Formulate the first task

Loading...

Two conditions keep descriptions short; one hundred rows avoids a list dominated by tiny groups; WRAcc values enrichment supported by substantial coverage. These choices define the exploratory question and should be recorded with the results.

Inspect redundancy before reporting

Loading...
<Figure size 800x385 with 1 Axes>
<Figure size 750x450 with 2 Axes>

Low pairwise overlap does not mean independent findings. The descriptions can still reflect related social and economic structure. Read the actual members and consider whether categories are broad, ambiguous, or proxies for omitted variables.

A compact, reproducible finding

Description: [age ≤ 67 ∧ marital-status=Married-civ-spouse]
Rows: 1323 of 3000
>50K share: 47.1%; dataset: 24.3%
Increase: 22.8 percentage points
Discovery WRAcc: 0.1005; status: exploratory, not holdout-validated

This statement separates description, scope, effect, and score. It reports percentage points rather than calling a rate difference a percent increase. Keep all selected descriptions available alongside the summary so that the analyst’s selection is visible.

Suppose the interest is now unusually long working weeks. Working hours becomes the target and must leave the descriptor space. We also keep the income label out to focus on the remaining demographic/work categories.

Loading...
<Figure size 800x400 with 1 Axes>

The resulting descriptions answer a new question. It would be misleading to reuse the income-ranked list and call it the best working-hours list merely because working hours can be computed for those same groups.

From exploration to a subsequent study

The workflow can suggest hypotheses and reveal data-quality issues. For a confirmatory analysis, reserve validation rows before selecting descriptions or cuts, and predefine how the resulting candidates will be tested. A new question suggested by this exploratory analysis is a reason for a new validation plan, not a reason to reinterpret these discovery scores as confirmation.

Experiment. Replace WRAcc with StandardQF(0.5), keeping the sample, conditions, constraints, and overlap filter fixed. Write a short comparison that explains which groups became smaller, more enriched, or less redundant.