Let (Y-i, theta(i)), i = 1 , . . . , n, be independent random vectors distributed as (Y, theta) similar to G*, where the marginal distribution of theta is completely unknown, and the conditional distribution of Y conditional on theta is known. It is desired to estimate G*, as well as E-G* h(Y, theta) for a given h, based on the observed Y-1 , . . . , Y-n. In this paper we suggest a method for these problems and discuss some of its applications. The method involves a quadratic programming step. It is computationally efficient and may handle large data sets, where the popular method that uses EM-algorithm is impractical. The general approach of empirical Bayes, together with our computational method, is demonstrated and applied to problems of treating non-response. Our approach is nonstandard and does not involve missing at random type of assumptions. We present simulations, as well as an analysis of a data set from the Labor Force Survey in Israel. We also suggest a method, that involves convex optimization for constructing confidence intervals for E-G* h under the above setup.