Testing Workflow: Exploratory Data Analysis Before Hypothesis Testing

Unoccupied meeting table with a magnifying glass over coloured cards and a corkboard in the background

A significant p-value seems conclusive at first glance. However, its meaning depends on whether the data have been prepared correctly, whether individual cases distort the results, and whether the chosen procedure is appropriate for the level of measurement, distribution, and study design. Exploratory data analysis before hypothesis testing: a systematic review process does not eliminate every uncertainty, but it creates the foundation for reasoned and transparent decisions.

For theses, dissertations, and publications, this phase is more than a technical intermediate step. It separates data errors from actual findings and helps you plan the subsequent presentation of results transparently. The order is crucial: first understand the data, then test the hypotheses.

Why the review process comes before hypothesis testing

Confirmatory tests examine hypotheses formulated in advance. For example, your hypothesis might state that an intervention reduces depression scores more than a control condition. A t-test, analysis of variance, or regression model provides formal evidence for this.

Exploratory data analysis pursues a different goal: it describes the available data, checks their plausibility, and makes anomalies visible. This includes missing values, impossible value ranges, skewed distributions, outliers, or unexpected group differences. These findings do not automatically determine whether a hypothesis is correct or incorrect. Rather, they show under what conditions a hypothesis test remains meaningfully interpretable.

This distinction is methodologically relevant. Anyone who formulates a new hypothesis after examining numerous patterns and then tests it with the same data should label this as an exploratory analysis. Otherwise, it is easy to create the impression that a result has been independently confirmed. Exploratory analyses are by no means less valuable. They serve hypothesis generation and can provide important clues, especially in new research fields.

Exploratory data analysis before hypothesis testing: the review process

A good process follows the logic of your research question, not a rigid checklist. Nevertheless, several review steps have proven effective. At each step, document what you checked, which criterion you used, and what consequence resulted from it. This way, your analysis remains transparent even months later.

1. Check the dataset, variables, and coding

Start with the structure of the dataset. Check whether each row actually represents a unit of analysis and whether there are duplicate cases. Next, check variable names, levels of measurement, and coding. Errors occur frequently, especially with questionnaire data: a missing answer is accidentally saved as 0, a Likert scale is coded in different directions, or a reverse-coded item was not recoded.

Frequency tables for categorical variables, as well as minimum, maximum, mean, and standard deviation for metric variables, are useful. If age in an adult sample is 250 years or a sum score falls outside the theoretically possible range, it is not an interesting outlier, but first a reason to check. Only correct it if the original information is clearly identifiable. Otherwise, the decision must be documented as a missing or invalid value.

2. Treat missing values professionally rather than reflexively

Missing values are not just a tedious data problem. Their pattern can influence the validity of the results. First, you should determine how many values are missing per variable and per case. Next, check whether missingness occurs more frequently in certain groups, at certain measurement times, or in certain response categories.

A complete case analysis, in which all individuals with at least one missing value are excluded, is easy to implement. However, it can significantly reduce the sample size and lead to bias. It may be appropriate when there are few plausibly missing data points. For more extensive or systematic missingness, other methods may be appropriate depending on the research question, such as multiple imputation or models that account for incomplete data.

It is important: Do not replace missing values with the mean across the board. This approach artificially reduces variability and can weaken associations. Which method is appropriate depends on the proportion and mechanism of the missing data, as well as your analysis model.

3. Make distributions and group differences visible

Descriptive statistics show the general situation and variability, but not the shape of a distribution. Therefore, supplement them with histograms, boxplots, and, for group comparisons, separate graphics for each group. This way, you can identify skewness, ceiling effects, floor effects, or multiple peaks in the distribution more quickly than with a single test statistic.

A normality test alone is not a sufficient basis for decision-making. In large samples, it can flag even minimal, practically irrelevant deviations as statistically significant. In small samples, on the other hand, it often lacks sufficient power. Therefore, assess the graphic, descriptive statistics, sample size, and planned procedure together.

Not every hypothesis test requires a perfectly normally distributed raw variable. In a linear regression model, for example, the normality assumption primarily concerns the residuals, i.e., the differences between observed and predicted values. In an analysis of variance, homogeneity of variance and the distribution within groups are also relevant. The correct check therefore always depends on the model.

4. Check outliers without removing undesirable values

Outliers are observations that differ significantly from the rest of the data pattern. They can arise from data entry errors, but they can also represent real and substantively important cases. An exceptionally high treatment success is not automatically incorrect just because it changes the group mean.

Therefore, check outliers in two stages. First: Is the value technically or professionally impossible? Then, a correction or exclusion is usually justifiable. Second: Is the value possible but influential? In regression analyses, descriptive statistics such as Cook's Distance, leverage values, and standardized residuals are helpful. In group comparisons, boxplots and case reviews provide initial clues.

If a plausible case strongly influences the result, you should not delete it without explanation. Instead, report a sensitivity analysis: Does the central conclusion change if the case is kept or excluded from the model? This approach makes your decision transparent and shows how robust the finding is.

5. Assess assumptions according to the analysis model

Only now do you systematically check the model assumptions. For an independent t-test, independent observations, a meaningful metric dependent variable, and an appropriate variance structure are relevant, among others. When variances are substantially unequal, the Welch t-test is often a better choice than the classic t-test.

For correlations, the shape of the relationship plays a central role. A Pearson correlation coefficient describes a linear relationship; for monotonic but non-linear relationships or ordinal data, Spearman's rank correlation may be more appropriate. In logistic regression, the dependent variable must be dichotomous, while in linear regression, multicollinearity, linearity, and residual patterns deserve special attention.

The consequence of a violated assumption is not automatically a non-parametric test. Depending on the situation, transformations, an adjusted model, bootstrapping-based confidence intervals, or a different estimation method may be appropriate. The same applies here: the choice must fit the research question and the data structure, not just a single test statistic.

What you should state in the methods section

The review process should be included in your work in a condensed form. Readers should be able to see which data cleaning was performed, how missing values were handled, and whether outliers or model assumptions were checked. Depending on the format, extensive tables, graphics, or additional sensitivity analyses can be moved to the appendix.

Be specific. Instead of "The data were cleaned," it is more transparent to state: "Values outside the theoretical scale range were coded as invalid; missing values were not imputed." Instead of "The assumptions were met," you should state which assumption you assessed using which check and what adjustment was made in case of deviations.

At the same time, avoid over-documentation without added value. Not every graphic and every test needs to be in the main text. What matters are the decisions that influence your results or their interpretation.

A practical example

Suppose you are comparing students' test anxiety before and after coaching. Before the paired t-test, you first check whether the individuals are correctly assigned to both measurement times. Then you check the value range of the anxiety questionnaire and the proportion of missing answers.

A histogram of the difference scores shows a slight skew but no extreme cases. A single value stands out in the boxplot. The case review shows: The person actually deteriorated significantly, and the entry is plausible. You keep the case and, if necessary, add a sensitivity analysis. Next, you assess whether the difference scores are sufficiently appropriate for the planned test. Only then do you interpret the mean difference, confidence interval, effect size, and p-value together.

This interplay is particularly crucial: A p-value does not answer whether an effect is practically relevant. The effect size describes the magnitude, while the confidence interval describes the precision of the estimate. The exploratory preliminary check ensures that these descriptive statistics are based on a transparent data foundation.

If you are unsure which anomalies actually require an adjustment to your analysis plan, individual statistical advice can help you document the review process in a way that is appropriate for your design. You can discuss your approach and data structure confidentially using the Easy Statistik contact form.


Put knowledge into practice

From explanation
to your own analysis.

Would you like to know which method suits your project? We review your plans free of charge and give you a clear recommendation.

Your question deserves a personal answer.

Describe your project. We will assess free of charge what support would be right for you.

This site is protected by hCaptcha and the hCaptcha Privacy Policy and Terms of Service apply.