To understand the depletion phenomenon and entropy effect on the distribution of particles in a two-component system, first, we use a theoretical model to study two extreme cases. We assume either all the large or small spheres lay adjacent to the wall, and for each case, we calculate excess entropy of the system -the difference between the entropy of the real and ideal system under the same temperature and pressure. Then we employ the molecular dynamics method to investigate the effect of energy and entropy and their competition on the distribution of particles in the dynamical systems with different interacting potentials. To do this, we studied different variations from systems with Lennard-Jones potential for walls and particles to systems with reflective walls and hard spheres.