*2.4. Statistical Analysis*

All data were expressed as means ± one standard deviation of the mean. Differences between the treatments were examined using a two-way analysis of variance (ANOVA), with statistical differences considered when *p* < 0.05. All statistical analyses were carried out using SPSS, version 20.0 (SPSS Institute, Chicago, IL, USA). Biochar and soil basic properties, plant heavy metals, microbial diversity, heavy metals present in various soil fractions, and soil enzyme activities were analyzed using principle component analysis (PCA, using SPSS), and PCA was also used to determine correlation coefficients (r) between all of these factors.

The Shannon index (*H*) of the operational taxonomic units (OTU) for soil microbial community diversity was calculated as:

$$H = \sum\_{i=1}^{S\_{cb}} \frac{n\_i}{N} \ln \frac{n\_i}{N} \tag{1}$$

where *Sobs* was the OTU detection number, *ni* was the number of the *i*th OTU, and *N* was the sum of all sequence numbers. A bioconcentration factor (BCF) was determined as the above-ground Cd or Pb concentration/soil Cd or Pb concentration. A translocation factor (TF) was determined by the above-ground plant Cd or Pb concentration/root Cd or Pb concentration.
