Skip to main content
Workforce LibreTexts

5.9: Best Practices in EDA

  • Page ID
    48065
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\ket}[1]{\left| #1 \right>}\)
    \(\newcommand{\bra}[1]{\left< #1 \right|}\)
    \(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
    \(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
    \(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
    \(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
    \(\newcommand{\expect}[1]{\langle #1 \rangle}\)
    \(\newcommand{\dfn}[1]{\emph{\textbf{#1}}}\)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Best Practices in EDA

    Conducting EDA effectively requires not just tools, but also a thoughtful approach. Here are some best practices that combine practical tips and methodological principles [2]:

    Understand the Context and Purpose:

    • Before you even begin looking at data, be clear on the domain and the problem. EDA should be guided by the questions you ultimately want to answer or the decisions you need to make. For example, if the goal is to build a customer churn model, focus EDA on features that might relate to churn. Domain knowledge can suggest which patterns to look for. Collaborate with subject matter experts if possible to avoid misinterpreting data quirks. A solid grasp of the business or scientific context helps ensure your exploration is relevant and thorough.

    Be Systematic, but Not Rigid:

    • It’s good to follow a checklist or the general workflow (univariate → bivariate → multivariate), as this ensures you cover all bases. For instance, make sure every variable has been examined at least once. However, allow yourself to deviate and dig deeper when something interesting arises. EDA is iterative; you might loop back to re-examine a single variable after seeing a relationship. The key is to balance exhaustive coverage with investigative flexibility. One practical tip is to keep notes (in a notebook or a separate log) of what you have explored and what you found, so you don’t accidentally skip something important or forget an insight.

    Don’t Rush the Process:

    • Resist the temptation to jump into modeling or conclusions too quickly. Skipping or skimping on EDA can lead to costly mistakes later (like discovering issues after models are built). As one article metaphorically puts it, EDA is a journey that unfolds the data’s story; rushing through it can mean missing chapters of that story. Give yourself time to truly play with the data – try different plots, slice the data different ways, and double-check oddities. This patience will pay off in deeper insights and a more robust subsequent analysis. It’s often during the second or third pass over the data that you notice something subtle but important.

    Use a Balance of Visualization and Quantitative Analysis:

    • Visuals are incredibly powerful in EDA for revealing patterns to our eyes (humans are very good at detecting visual patterns). However, complement visuals with statistics. For example, after visualizing that one group seems higher than another, calculate the actual means and standard deviations to quantify that difference. Conversely, if you calculate a statistic (say correlation = 0.5), visualize that scatter plot to ensure it’s not driven by a weird outlier or a non-linear relation. Over-reliance on one or the other can mislead. A plot might suggest a pattern that is actually just random (our eyes can be fooled), and a statistical test might suggest significance that is practically meaningless. By cross-verifying insights both ways, you create a robust understanding. In summary: plot first, then put numbers to it; or compute stats, then visualize them. Both perspectives together give confidence in your interpretation.

    Keep an Eye on Biases:

    • EDA, being exploratory, has a risk – the analyst can find patterns that are spurious (especially if one goes on a fishing expedition in the data). Be aware of human biases such as seeing patterns in noise (apophenia) or confirmation bias (focusing on findings that confirm pre-existing beliefs). To mitigate this, maintain a healthy skepticism of surprising findings until they can be verified with fresh data or confirmatory analysis. Additionally, consider sampling bias or other data biases: is the data representative of the phenomenon you’re studying? EDA should include checking if the data covers the range of conditions expected, and noting if some segments are under- or over-represented. For example, if you're analyzing user behavior data but realize through EDA that 80% of your data comes from one country, that's a sampling bias to account for in conclusions.

    Document and Reproduce:

    • Treat EDA as an integral part of your research that needs documentation. Often in academic papers or reports, EDA is summarized or put in appendices, but it’s the backbone of the analysis. Take careful notes of what transformations or filtering you did (“removed 3 outliers above value X in variable Y” or “log-transformed Z to reduce skewness”). This documentation is invaluable for anyone reviewing your work or for yourself when you return later. It’s also good practice to set a random seed if you do any random subsampling or shuffling during EDA, to make results reproducible. Ensure that anyone with the data and your notebook/script can replicate all the figures and numbers you generated.

    Leverage Automations, But Don’t Abdicate to Them:

    • Automated EDA tools (like profiling packages) can quickly identify obvious things (e.g., "column A has 30% zeros, column B and C are highly correlated"). Use them as a starting point or a sanity check. However, they might not catch context-specific patterns or complex interactions that a human analyst can. They also won't ask why a pattern is there. Use automation to handle grunt work (like iterating through all univariate distributions) so that you can spend more time thinking about the implications of the patterns.

    Iterate with Feature Engineering:

    • Sometimes EDA leads you to create new features, which themselves should then be explored. For instance, you might derive a ratio or difference of two original features because you suspect it’s important. That new feature should then go through the same exploratory scrutiny: how is its distribution, does it correlate with outcome, etc. EDA and feature engineering often loop: explore → derive new feature → explore that → maybe derive more, and so on. Stop when adding more features or transformations yields diminishing returns in insight.

    Preserve Raw Data:

    • During EDA, you might make many changes to the data (imputations, outlier removals, etc.). Always keep a copy of the original raw data untouched. This way you can backtrack if needed. A best practice is to perform transformations in code (not manually in spreadsheets, for example), so that they are replicable, and apply them only as needed. For analysis beyond EDA (like final modeling), you might re-read the raw data and apply only the decided cleaning steps in a controlled manner. EDA is a sandbox – you might try extreme things like removing what seems like a weird subset – but later you should incorporate only what proved useful.

    Know When to Stop:

    • EDA could theoretically go on forever – there are infinite ways to slice data. In a practical sense, you have to decide when you’ve learned enough to proceed to the next stage (be it modeling or reporting). A good heuristic is: stop when you stop encountering new insights. If your last few hours of poking at the data have only reconfirmed what you already know, or patterns are repeating, you’ve likely hit the point of diminishing returns. At that time, compile your findings and move on to confirmatory analysis or whatever is next. Of course, if new data comes in or new questions arise, you can always return to EDA with a fresh perspective.

    By following these best practices, you ensure that your EDA is effective, efficient, and reliable. Good EDA is like preparing the foundation for a building – if it’s done well, everything built on top of it (models, decisions, interpretations) will be on solid ground.


    This page titled 5.9: Best Practices in EDA was last modified on Wed, 16 Sep 2026 23:31:09 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Felix Amoruwa.

    • Was this article helpful?