  The presence of terms that violate quark-hadron duality in the expansion of
QCD Green's functions is a generally accepted fact. Recently, a new approach
was proposed for the study of duality violations (DVs), which exploits the
existence of a rigorous lower bound on the functional distance, measured in a
certain norm, between a "true" correlator and its approximant calculated
theoretically along a contour in the complex energy plane. In the present paper
we pursue the investigation of functional-analysis based tests towards their
application to real spectral function data. We derive a closed analytic
expression for the minimal functional distance based on the general weighted
$L^2$ norm and discuss its relation with the distance measured in $L^\infty$
norm. Using fake data sets obtained from a realistic toy model in which we
allow for covariances inspired from the publicly available ALEPH spectral
functions, we obtain by Monte Carlo simulations the statistical distribution of
the strength parameter that measures the magnitude of the DV term added to the
usual operator product expansion (OPE). The results show that, if the region
with large errors near the end-point of the spectrum in $\tau$ decays is
excluded, the functional-analysis based tests using either $L^2$ or $L^\infty$
norms are able to detect, in a statistically significant way, the presence of
DVs in realistic spectral function pseudodata.
