Mathematical Modelling of Confidence Ellipses and Computational Validation of their Implementation in the LFTools Plugin: A Case Study Using GWDBrazil
Keywords: Confidence Ellipse, Spatial Statistics, Covariance Matrix, QGIS, GWDBrazil
Abstract. Confidence ellipses are widely used in spatial analysis to summarize the central tendency, dispersion and directional structure of bivariate point distributions. Although conceptually grounded in the covariance matrix and the properties of the bivariate normal distribution, their computational implementation in GIS environments requires rigorous validation to ensure statistical consistency and reproducibility. This study presents the mathematical formulation, algorithmic design and empirical evaluation of the Confidence Ellipses tool implemented in the LFTools plugin for QGIS. The method is based on covariance–variance estimation, eigenvalue decomposition and Chi-square scaling, enabling the generation of ellipses corresponding to confidence levels of 68%, 90%, 95% and 99%. A controlled validation using 100,000 Gaussian random points confirmed the numerical accuracy of the tool, with observed proportions of points inside the ellipses deviating less than 0.05% from theoretical expectations. A real-world application using 351,256 groundwater wells from the Groundwater Well Database for Brazil (GWDBrazil) demonstrated the tool’s capacity to represent complex spatial patterns, including anisotropy, clustering and non-Gaussian behavior. The results indicate that the LFTools implementation is mathematically sound, computationally robust and suitable for scientific use in spatial statistics and environmental analysis. Future research may extend this framework to multiscale, non-parametric and space–time formulations, enabling deeper characterization of spatial phenomena across regions, whether in Brazil or throughout the world.
