Fertilizer Formulation and Light Exposure in a Factorial Greenhouse Trial
← Chapter 166
Capstone 7 · Technical Report
Technical Report

Fertilizer Formulation and Light Exposure in a Factorial Greenhouse Trial

A two-way analysis of variance with simple-effects decomposition of a significant interaction.

Author  John Fisher
Series  Statistics, Data Science and AI: A Visual Handbook
Design  2 × 3 between-subjects factorial, α = 0.05
Where this comes from
Chapter Chapter 166 · Two-Way ANOVA: Fertilizer and Sunlight
Part Part XXVII · Capstone Projects: Statistical Testing
Dataset capstone-plant-growth-two-factors.xlsx
Notebook View the analysis
Abstract. Objective. To estimate the effects of fertilizer formulation (Standard, Premium) and light exposure (Low, Medium, High) on plant growth, and to determine whether the fertilizer effect is conditional on light. Methods. A fully crossed 2 × 3 between-subjects factorial trial (n = 68 after cleaning) was analyzed by two-way ANOVA with Type II sums of squares. Residual normality was assessed by Shapiro-Wilk and equal variance across the six cells by Levene's test. Because the interaction was significant, simple effects of fertilizer were estimated within each light level using Welch's t-test. Results. Assumptions were satisfied (Shapiro-Wilk p = 0.12; Levene p = 0.89). Both main effects were significant, light F(2, 62) = 96.50, p < 0.001, partial η² = 0.757; fertilizer F(1, 62) = 14.96, p = 0.0003, partial η² = 0.194. Critically, the interaction was significant, F(2, 62) = 9.74, p = 0.0002, partial η² = 0.239. Simple effects showed no fertilizer benefit at low light (-1.05 cm, p = 0.53), a non-significant advantage at medium light (+2.31 cm, p = 0.080), and a large advantage at high light (+7.68 cm, 95% CI [4.89, 10.47], p < 0.001, d = 2.41). Conclusions. The fertilizer main effect is not interpretable in isolation; the formulation confers benefit only under high light. Reporting the marginal effect would misrepresent the result for most growing conditions.

Keywords: factorial ANOVA; interaction; simple effects; partial eta-squared; Type II sums of squares; conditional effects.

1. Introduction

Factorial designs cross two or more factors so that each is evaluated at every level of the others. Beyond efficiency, the decisive advantage is that they estimate the interaction: whether the effect of one factor varies across levels of another. Separate one-factor experiments cannot recover this quantity at all, and in its presence a marginal (main) effect is a weighted average over conditions in which the true effect differs.

This trial crossed fertilizer formulation with light exposure. The three null hypotheses are equality of fertilizer marginal means, equality of light marginal means, and additivity (no interaction), each evaluated at α = 0.05.

2. Data

Records comprise a plant identifier, fertilizer formulation, light level, and growth in centimetres, with twelve plants allocated to each of the six cells. Both factor labels were recorded with inconsistent capitalization and were normalized before analysis; duplicates, missing values, and out-of-range measurements were then removed (Table 1). Cleaning left slightly unequal cell counts, motivating Type II sums of squares.

Table 1. Data-cleaning provenance. Removed out-of-range values: {-3, 250} cm.
StepRuleRemovedRemaining
Raw export74
Normalize labelstrim and case-fold both factors074
De-duplicationdrop duplicate rows272
Missing outcomedrop blank growth_cm270
Range filterretain 0 ≤ growth ≤ 100268
Table 2. Cell means by light level and fertilizer. The Premium advantage is not constant across light.
LightStandard mean (n)Premium mean (n)Premium advantage
Low18.41 (n=9)17.36 (n=12)-1.05 cm
Medium24.99 (n=12)27.30 (n=12)+2.31 cm
High27.65 (n=12)35.33 (n=11)+7.68 cm

3. Methods

The model growth ~ fertilizer × light was fitted by ordinary least squares and evaluated by two-way ANOVA with Type II sums of squares, appropriate for a nearly balanced design and invariant to term order in the absence of a strong imbalance. Residual normality was assessed by the Shapiro-Wilk test and a normal quantile-quantile plot, and homoscedasticity by Levene's test applied across all six treatment cells, supported by a residual-versus-fitted plot. Effect sizes are partial eta-squared. Because the interaction was significant, the fertilizer contrast was decomposed into simple effects estimated within each light level by Welch's t-test with Cohen's d. Analyses used statsmodels and SciPy in Python 3.

4. Results

Model diagnostics support the analysis: residuals were consistent with normality (W = 0.972, p = 0.123) and cell variances were homogeneous (Levene W = 0.341, p = 0.8859), with cell standard deviations spanning only 2.92 to 3.83 cm. The residual-versus-fitted plot showed neither heteroscedastic funnelling nor curvature.

A quantile-quantile plot of residuals following the diagonal, and residuals against fitted values scattered evenly around zero with no funnel or curve.
Figure 1. Normal Q-Q plot of model residuals (left) and residuals against fitted values (right).
Table 3. Two-way ANOVA (Type II sums of squares) for growth by fertilizer and light.
TermSum of squaresdfFpPartial η²
Light2106.61296.50< 0.0010.757
Fertilizer163.24114.960.00030.194
Fertilizer × Light212.6929.740.00020.239
Residual676.7662

The interaction is significant, F(2, 62) = 9.74, p = 0.0002, partial η² = 0.239. This determines the interpretation of everything above it: the fertilizer main effect, though significant, is a marginal average over conditions in which the true effect differs in both sign and magnitude, and is therefore not the appropriate summary. Light exerts the dominant influence (partial η² = 0.757) under either formulation.

Individual plant growth by light level and fertilizer, and an interaction plot whose lines start together at low light and diverge at high light.
Figure 2. Observed growth by cell (left) and the interaction plot of cell means (right). Non-parallel profiles indicate the interaction.
Table 4. Simple effects of fertilizer estimated within each light level (Welch's t-test).
Light levelPremium − Standard95% CIpCohen's dDecision
Low-1.05 cm[-4.52, 2.41]0.529-0.28retain H₀
Medium+2.31 cm[-0.30, 4.92]0.080+0.75retain H₀
High+7.68 cm[4.89, 10.47]< 0.001+2.41reject H₀
The Premium minus Standard difference at each light level with confidence intervals; only the high-light interval clears zero.
Figure 3. Simple effects with 95% confidence intervals. Only the high-light contrast excludes zero.

The decomposition is unambiguous. At low light the formulations are indistinguishable, with the point estimate nominally favoring Standard. At medium light the advantage is positive but its interval includes zero. At high light the advantage is 7.68 cm with a confidence interval well clear of zero and a very large standardized effect (d = 2.41).

5. Interval estimates for the simple effects

Table 5. Simple-effect estimates with Welch intervals at each level of light, and the interaction effect size.
Light levelPremium − Standard95% CIInterpretation
Low−1.05 cm−4.52 to +2.41no benefit demonstrated
Medium+2.31 cm−0.30 to +4.92unresolved
High+7.68 cm+4.89 to +10.47benefit established
Partial η², interaction0.2390.106 to 0.437percentile bootstrap

The interaction establishes that the fertilizer effect is conditional on light level; the simple-effect intervals quantify that conditionality in the units of the outcome. Under high light the benefit is bounded between approximately 4.9 and 10.5 cm. Under low light the interval includes negative values, so a decrement cannot be excluded.

Expressed this way the analysis yields three distinct recommendations rather than a single omnibus verdict, which is the practical justification for interpreting the interaction before the main effects. The averaged main effect of fertilizer describes no cultivation condition actually present in the experiment.

It should be noted that this is the only design in the series in which treatment levels were assigned by the investigator rather than observed. Reverse causation is precluded by temporal ordering and confounding is addressed by allocation, so causal language is warranted here in a way it is not elsewhere in the series. The warrant derives from the design and not from any property of the analysis.

6. Discussion

The substantive conclusion is conditional: the Premium formulation confers a growth advantage only under high light exposure. Under the tested low-light condition it confers none. Reporting the significant fertilizer main effect without qualification would communicate a general benefit that the data specifically contradict for two of the three conditions studied, and would misdirect purchasing decisions for growers operating in lower-light environments. This is the practical reason interactions are examined before main effects rather than alongside them.

Several limitations bound the inference. The light factor was manipulated at three discrete levels, so the fanning profile should not be extrapolated beyond the tested range; the mechanism implied, that the formulation supplies a nutrient that becomes limiting only when photosynthetic capacity is high, is a hypothesis this design suggests rather than establishes. The trial was conducted under uniform greenhouse conditions, so temperature, irrigation, and soil were controlled rather than representative, and effects conditional on light are plausibly conditional on these as well. Cleaning produced modest cell imbalance; Type II sums of squares were used accordingly, and under severe imbalance the choice of sums-of-squares type can materially alter main-effect tests and should always be reported.

Finally, the economic dimension belongs in the report. A formulation that helps only under high light carries a cost that is not recovered in other conditions, so the analytical result translates into a targeted rather than a blanket recommendation.

7. Conclusion

Growth was influenced by light (partial η² = 0.757) and, conditionally, by fertilizer formulation. The fertilizer × light interaction was significant, F(2, 62) = 9.74, p = 0.0002, and simple-effects decomposition localized the entire fertilizer benefit to the high-light condition (+7.68 cm, p < 0.001), with no detectable benefit at low or medium light. The marginal fertilizer effect should not be reported as a general finding.

References

  • Fisher, R. A. (1935). The Design of Experiments. Oliver & Boyd.
  • Levene, H. (1960). Robust tests for equality of variances. In Contributions to Probability and Statistics (pp. 278–292). Stanford University Press.
  • Welch, B. L. (1947). The generalization of Student's problem when several different population variances are involved. Biometrika, 34(1–2), 28–35.
  • Langsrud, Ø. (2003). ANOVA for unbalanced data: Use Type II instead of Type III sums of squares. Statistics and Computing, 13(2), 163–167.
  • Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences (2nd ed.). Lawrence Erlbaum.
  • Rothman, K. J., Greenland, S., & Lash, T. L. (2008). Modern Epidemiology (3rd ed.), ch. 5 on effect-measure modification. Lippincott.

Reproducibility

The dataset (capstone-plant-growth-two-factors.xlsx) and an executable notebook reproducing every statistic, table, and figure accompany the chapter. Analyses use NumPy, pandas, SciPy, statsmodels, and Matplotlib.

From Statistics, Data Science and AI: A Visual Handbook by John Fisher. Every statistic, table, and figure in this report is reproduced by the companion notebook.