The Cauchy-Schwartz inequality states $\Big [\int g(x)h(x)dx \Big]^2 <= \Big [ \int g^2(x)dx \Big ]\Big [\int h^2(x)dx) \Big ]$The Cauchy-Scwhartz inequality holds for sums of continuous and discrete random variables. The inequality can be used for [[expectation]] by including a pdf or pmf as follows $\Big (E[g(X)h(X)] \Big)^2 <= E\Big [g^2(X) \Big] E \Big [h^2(X) \Big]$