What you see is not what you get!: Detecting Simpson's Paradoxes during Data Exploration

Yue Guo, Carsten Binnig, Tim KraskaHILDA@SIGMOD 2017

TL;DR

This paper introduces algorithms to automatically detect Simpson's Paradoxes, a statistical phenomenon where aggregate trends reverse when data is broken down into subgroups. By developing efficient, interactive detection methods, the authors aim to prevent users of visual data exploration tools from drawing incorrect conclusions.

What Problem Does This Paper Address?

Visual data exploration tools like Tableau and Vizdom empower users to quickly uncover patterns and test hypotheses. However, these tools can inadvertently lead users astray by masking subtle statistical pitfalls. One such pitfall is Simpson's Paradox, where an overall trend in aggregated data is misleading and reverses when the data is segmented by a hidden variable. For instance, a visualization might suggest a certain treatment is effective overall, but when analyzed by patient subgroups (e.g., by age or severity), the treatment might actually be less effective or even harmful. This paradox can lead to flawed decision-making, especially when users rely solely on high-level visualizations without deeper investigation. The paper addresses the challenge of automatically detecting these paradoxes in real-time during interactive data exploration sessions, ensuring users are alerted to potential misinterpretations.

Methods

The authors propose a suite of algorithms to detect Simpson's Paradoxes. They start with a Naïve Algorithm that enumerates all possible subgroup combinations to find a reversing trend. To address the computational cost of this approach, they introduce several optimizations:

  • One-pass Algorithm / Row and Column: This optimizes the naïve approach by processing the data in a single pass, either row-wise or column-wise, to compute aggregates more efficiently.
  • Approximate Algorithm: This technique uses ideas from approximate query processing to estimate trends and confidence intervals. By avoiding reading the entire dataset and using confidence intervals that can overlap (indicating uncertainty), it significantly speeds up detection, especially for large datasets.
  • Steered Approximate Algorithm: This is the most advanced optimization. It frames the detection process as a k-armed bandit problem. Candidate subgroup attributes are treated as "arms," and the algorithm learns which attributes are most likely to reveal a paradox, prioritizing exploration of these promising avenues. This "steering" allows the algorithm to find paradoxes much faster by focusing on the most likely candidates first.

Datasets

The primary dataset used for evaluation is a real-world dataset of US flight records from 1987-2008, containing approximately 120 million records and occupying 12 GB uncompressed. This dataset was chosen for its large size and the need for efficient processing.

Key Insights and Ideas

  • Visualizations can be deceptive: The core insight is that even seemingly clear trends in aggregated data can be entirely misleading due to Simpson's Paradox, highlighting the need for automated checks.
  • Interactive detection is crucial: For data exploration tools, detecting paradoxes needs to happen in real-time to be useful. Slow detection mechanisms defeat the purpose of interactive exploration.
  • Approximation and steering are key to scalability: Handling massive datasets and a large number of potential subgroups requires moving beyond brute-force enumeration. Approximate algorithms and intelligent steering (like the k-armed bandit approach) are essential for achieving interactive speeds.
  • Simpson's Paradox is a common pitfall: The paper emphasizes that this is not a rare edge case but a significant risk in data analysis, as demonstrated by the UC Berkeley admissions example.

Key Results

The paper demonstrates that their proposed algorithms can detect Simpson's Paradoxes at interactive speeds. Specifically:

  • The Steered Approximate Algorithm is shown to be the most efficient, with runtimes that are least sensitive to the number of candidate attributes and data size.
  • For a dataset with 6 candidate attributes, the Naïve Algorithm took over 2 seconds, while the One-Pass Algorithm was approximately 6x faster and achieved interactive latencies (under 500ms).
  • The Approximate and Steered Algorithms showed minimal performance degradation even when varying the data size, remaining largely independent of it and staying within interactive thresholds.

Limitations and Future Work

  • Statistical Significance: The authors acknowledge that detecting a large number of potential paradoxes increases the chance of flagging random occurrences. Future work aims to focus on detecting statistically significant Simpson's Paradoxes, which is related to hypothesis testing and visual recommenders.
  • Detecting Other Pitfalls: The techniques developed, particularly the bandit-based approach, could potentially be adapted to detect other statistical pitfalls, such as pseudoreplication in life sciences data.
  • Memoization for Multiple Pitfalls: To efficiently test for various pitfalls, the authors suggest memoizing intermediate results from detection algorithms.

Summary updated

BibTeX
@inproceedings{guo2017what,
  author = {Yue Guo and Carsten Binnig and Tim Kraska},
  title = {{What you see is not what you get!: Detecting Simpson's Paradoxes during Data Exploration}},
  booktitle = {HILDA@SIGMOD},
  year = {2017},
  doi = {10.1145/3077257.3077266},
}
Figure