The problem of approximating an unknown function from data and deriving reliable interval estimates is important in many fields of science and technology. In this paper, an algorithm is proposed to solve this problem, based on a sparsification technique and a nonparametric set membership analysis. Assuming that the noise affecting the data is bounded and the unknown function satisfies a mild regularity assumption, it is shown that the algorithm provides an approximation with suitable optimality properties, together with tight interval estimates. An innovative approach to fault detection, based on the derived interval estimates, is then proposed, overcoming some relevant problems proper of the 'classical' techniques. The approach is applied in a simulation study to solve the challenging problem of fault detection for a new class of wind energy generators, which uses kites to capture the power from high-altitude winds.