실생활 계산

슈팅프라이스 확률 분포는 가격과 사람 밀도에만 관련

언제나19 2014. 4. 29. 01:33




가격 구간, 사람 수가 얼마나 되던 간에 밀도에만 관련이 있다는 것을 확인해 봤다.


500 slots, 10,000 people까지

50 slots, 1,000 people까지

2번 계산한 다음에

2번째 계산 결과를 x, y 10배로 늘려 봤더니, 그래프가 거의 일치한다.

import matplotlib.pyplot as plot

import os


n_0_hist_500_10000 = []

n_1_hist_500_10000 = []

n_0_hist_50_1000 = []

n_1_hist_50_1000 = []


execfile("blur_hist_500_10000.py")

execfile("blur_hist_50_1000.py")


n_0_hist_50_1000_x10 = []

n_1_hist_50_1000_x10 = []


people_x_range = range(0, len(n_0_hist_500_10000))


for i in people_x_range:

n_0_hist_50_1000_x10.append( n_0_hist_50_1000[i/10] * 10)

for i in people_x_range:

n_1_hist_50_1000_x10.append( n_1_hist_50_1000[i/10] * 10)


plot.scatter(people_x_range, n_0_hist_500_10000, c='red', lw=0, alpha=0.5)

plot.scatter(people_x_range, n_1_hist_500_10000, c='blue', lw=0, alpha=0.5)


plot.scatter(people_x_range, n_0_hist_50_1000_x10, c='green', lw=0, alpha=0.5)

plot.scatter(people_x_range, n_1_hist_50_1000_x10, c='yellow', lw=0, alpha=0.5)


plot.show()