The problem of nonparametric regression function estimation is considered using the complete orthonormal system of trigonometric functions or Legendre polynomials , k=0,1,..., for the observation model , i=1,...,n, where the are independent random variables with zero mean value and finite variance, and the observation points , i=1,...,n, form a random sample from a distribution with density . Sufficient and necessary conditions are obtained for consistency in the sense of the errors , ,...