你有没有想过,如果世界上每个人手中的财富都只有100元,每天每个人都要随机给另外一个人 1 元钱。
20000天后,这个世界的财富分配情况会是什么样呢?
你能猜到最后的答案么?
结果展示:
由此可见,即使全世界的财富重新平均分配,随着时间的推移,哪怕是在随机交换的情况下,也会最终出现少数人掌握大量财富的现象。
当然,为了保证财富总量的恒定和实验简化,我们此次实验中并没有引入负债理念,当一个人手中的金钱数等于0时,他就会跳过本次给予金钱的环节。
那么在每个人起跑线完全不对等的现实中,财富的分配又会是什么样的呢?
下一期我们将在起跑线存在差异的基础上再次进行实验。
附:实验代码
import random
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif'] = ['STZhongsong']
if __name__ == '__main__':
people = np.full(100, 100)
for i in range(20000):
for j in range(len(people)):
if people[j] == 0:
continue
people[j] -= 1
index = j
while index == j:
index = random.randint(0, len(people)-1)
people[index] += 1
people.sort()
x = np.arange(0, len(people))
plt.figure(figsize=(10, 6))
plt.bar(x, people, align="edge")
plt.ylabel('元')
plt.show()
s0 = sum(people)
s1 = sum(people[-10:])
print(str(len(people[-10:]) / len(people) * 100) + "% 的人掌握的财富比例:")
print(str(s1 / s0 * 100) + '%')
页面更新:2024-03-01
本站资料均由网友自行发布提供,仅用于学习交流。如有版权问题,请与我联系,QQ:4156828
© CopyRight 2008-2024 All Rights Reserved. Powered By bs178.com 闽ICP备11008920号-3
闽公网安备35020302034844号