The quality of manufactured components in different batches may be different because of the influence of various stochastic factors. This paper studies the optimal allocation of redundancies drawn from these randomly selected batches to <inline-formula> system composed of independent but nonidentical components. When the total number of redundancies is fixed, we show how the theory of majorization can be used to solve the problem of optimal redundancy allocation problem in system. We give an investigation on how the batches heterogeneity affects the reliability of system.