@@ -0,0 +1,564 @@
+import numpy as np%0A%0A%0Adef main():%0A    np.random.seed(0)%0A    bins = 50%0A    X = np.random.zipf(1.2, 1000)%0A    y = np.histogram(X%5BX%3Cbins%5D, bins, normed=True)%5B0%5D%0A    fn = np.polyfit(np.arange(bins), y, 3)%0A    print(fn)%0A%0A    np.random.seed(0)%0A    bins = 50%0A    samples = 1000%0A    X = %5Bnp.random.zipf(1.2, samples),%0A         np.random.zipf(1.3, samples),%0A         np.random.zipf(1.5, samples)%5D%0A    y = np.array(%5Bnp.histogram(x%5Bx%3Cb%5D, bins, normed=True)%5B0%5D for x in X%5D)%0A    fn = np.polyfit(np.arange(bins), y.T, 3)%0A    print(fn)%0A    %0A%0Aif __name__ == '__main__':%0A    main()%0A

Build curves for a single zipfian distribution and then 3 combined