Two-Way ANOVA in MedCalc with Shapiro–Wilk Test: A Step-by-Step Guide Using Blood Pressure Data

In biomedical and clinical research, it is often necessary to study the combined effects of two independent factors on a continuous outcome variable. For example, researchers may want to understand how different treatments affect blood pressure and whether these effects vary between males and females. In such situations, Two-Way Analysis of Variance (Two-Way ANOVA) is the most appropriate statistical technique.

Two-Way ANOVA allows researchers to:

  • Examine the main effect of each factor independently
  • Assess whether there is an interaction effect between factors
  • Improve statistical efficiency by analyzing multiple factors simultaneously

STUDY OBJECTIVE

The main objectives of this analysis are:

  1. To determine whether treatment type significantly affects systolic blood pressure
  2. To assess whether gender influences systolic blood pressure
  3. To evaluate whether there is a treatment × gender interaction effect
  4. To verify the normality assumption using the Shapiro–Wilk test

DATA DESCRIPTION

The dataset consists of 18 observations with the following variables:

Variable NameDescription
Systolic_BPSystolic blood pressure (mmHg)
TreatmentDrug A, Drug B, Drug C
GenderMale, Female

Each treatment group contains an equal number of male and female participants, ensuring a balanced factorial design, which is ideal for Two-Way ANOVA.

Download Dataset (Excel – Two-Way ANOVA Example)

8 KB

BOX PLOT VISUALIZATION

Box plot showing systolic blood pressure across treatments (Drug A, Drug B, Drug C) by gender.

The box plot visually demonstrates:

  • Increasing blood pressure from Drug A → Drug C
  • Higher systolic BP values in males compared to females
  • Clear separation between treatment groups

This visualization helps readers understand the data pattern before statistical testing.

STATISTICAL METHODOLOGY

Why Two-Way ANOVA?

Two-Way ANOVA is used when:

  • The dependent variable is continuous
  • There are two categorical independent variables
  • Data are approximately normally distributed
  • Variances are reasonably homogeneous

In this study:

  • Dependent variable: Systolic blood pressure
  • Factors: Treatment (3 levels) and Gender (2 levels)

ASSUMPTION CHECK: SHAPIRO–WILK TEST

Before performing ANOVA, it is essential to verify the normality of residuals.

Shapiro–Wilk Test Result

StatisticValue
W0.9043
P-value0.0684

Since P > 0.05, the null hypothesis of normality is accepted.

Conclusion:
The residuals follow an approximately normal distribution, satisfying one of the key assumptions of Two-Way ANOVA.

TWO-WAY ANOVA RESULTS (MEDCALC OUTPUT)

Levene’s Test for Homogeneity of Variance

TestP-value
Levene’s Test0.831

Because P > 0.05, the assumption of equal variances is satisfied.

Tests of Between-Subjects Effects

SourceDFF-valueP-value
Treatment2153.731< 0.001
Gender1210.615< 0.001
Treatment × Gender24.8850.028

INTERPRETATION OF RESULTS

1. Main Effect of Treatment

The treatment effect is highly significant (P < 0.001).

🔹 This indicates that systolic blood pressure differs significantly among Drug A, Drug B, and Drug C.

Mean Systolic BP by Treatment:

TreatmentMean BP (mmHg)
Drug A126.00
Drug B132.17
Drug C138.17

Blood pressure increases progressively from Drug A to Drug C.

2. Main Effect of Gender

Gender also shows a statistically significant effect (P < 0.001).

GenderMean BP (mmHg)
Female128.00
Male136.22

🔹 Males have significantly higher systolic blood pressure than females across treatments.

3. Interaction Effect (Treatment × Gender)

The interaction between treatment and gender is statistically significant (P = 0.028).

🔹 This means:

  • The effect of treatment on blood pressure differs between males and females
  • Treatment outcomes cannot be interpreted independently of gender

This interaction is clearly visible in the box plot, where male BP values increase more steeply across treatments than female values.

POST HOC COMPARISONS

Bonferroni-corrected pairwise comparisons indicate:

Drug A vs Drug B → Significant

Drug A vs Drug C → Significant

Drug B vs Drug C → Significant

All pairwise differences show P < 0.0001, confirming that each treatment group differs significantly from the others.

SUMMARY STATISTICS

VariableMeanSD
Systolic BP132.116.77

This reflects moderate variability in blood pressure measurements across the study population.

PRACTICAL IMPLICATIONS

  • Two-Way ANOVA provides richer insight than One-Way ANOVA
  • Gender should be considered when evaluating treatment efficacy
  • MedCalc offers an intuitive interface for factorial ANOVA
  • Visual tools (box plots) greatly enhance interpretation

CONCLUSION

This article demonstrated a complete Two-Way ANOVA analysis in MedCalc, using systolic blood pressure data to evaluate the effects of treatment, gender, and their interaction.

Key conclusions include:

  • Treatment significantly influences systolic blood pressure
  • Gender has a strong independent effect
  • A meaningful interaction exists between treatment and gender
  • All ANOVA assumptions were satisfied, including normality

Two-Way ANOVA is a powerful statistical method in medical and biological research, and MedCalc makes it accessible even for beginners. By combining statistical output with graphical visualization, researchers can confidently interpret complex experimental designs.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top