Explaining the Brazil Nut Effect