Empirical Bayes estimation of the binomial parameter ${\theta}$ is considered when the sample size in each component problem is random. The result is applied to the lot acceptance sampling problem in the presence of various kinds of costs including cost for sampling.