We give necessary and sufficient conditions for an orthogonal series to converge in the mean-squares to a nonnegative function. We present many examples and applications, in analysis and probability. In particular, we give necessary and sufficient conditions for a Lancaster-type of expansion $$ \sum _{n\ge 0}c_{n}\alpha _{n}(x)\beta _{n}(y)$$
∑
n
≥
0
c
n
α
n
(
x
)
β
n
(
y
)
with two sets of orthogonal polynomials $$\left\{ \alpha _{n}\right\} $$
α
n
and $$\left\{ \beta _{n}\right\} $$
β
n
to converge in means-squares to a nonnegative bivariate function. In particular, we study the properties of the set $$C(\alpha ,\beta )$$
C
(
α
,
β
)
of the sequences $$\left\{ c_{n}\right\} ,$$
c
n
,
for which the above-mentioned series converge to a nonnegative function and give conditions for the membership to it. Further, we show that the class of bivariate distributions for which a Lancaster type expansion can be found, is the same as the class of distributions having all conditional moments in the form of polynomials in the conditioning random variable.