23 Sep Write a Python program that calculates: a.) The average trade size. b.) The probability that the next trade be a size of 1. c.) The probability that the next trade will be between 5 and 10,
Write a Python program that calculates:
a.) The average trade size.
b.) The probability that the next trade be a size of 1.
c.) The probability that the next trade will be between 5 and 10, inclusive.
Data is attached as a file.
Trade Times in Seconds | Trade Sizes |
0 | |
0.836 | 1 |
3.965 | 33 |
6.489 | 8 |
13.418 | 10 |
13.681 | 4 |
14.019 | 14 |
14.33 | 10 |
16.743 | 2 |
16.995 | 5 |
18.369 | 6 |
20.473 | 4 |
22.504 | 15 |
23.161 | 1 |
25.785 | 1 |
28.93 | 5 |
28.976 | 15 |
34.489 | 3 |
36.373 | 13 |
38.131 | 5 |
39.884 | 5 |
41.537 | 10 |
44.385 | 20 |
49.242 | 30 |
50.799 | 33 |
51.802 | 4 |
52.117 | 100 |
52.495 | 10 |
54.526 | 20 |
55.682 | 10 |
59.214 | 5 |
62.534 | 2 |
63.741 | 9 |
65.34 | 6 |
66.393 | 10 |
68.419 | 1 |
70.067 | 12 |
73.779 | 2 |
77.769 | 1 |
79.218 | 10 |
82.234 | 10 |
82.657 | 1 |
85.733 | 3 |
85.838 | 1 |
86.581 | 3 |
88.17 | 1 |
88.377 | 9 |
89.076 | 1 |
90.253 | 1 |
98.592 | 30 |
99.307 | 10 |
99.625 | 12 |
102.413 | 30 |
103.072 | 5 |
105.791 | 1 |
108.354 | 10 |
118.234 | 25 |
118.775 | 1 |
120.339 | 20 |
121.933 | 1 |
122.997 | 1 |
124.272 | 29 |
127.882 | 10 |
132.686 | 1 |
133.241 | 71 |
133.931 | 1 |
136.491 | 15 |
137.381 | 12 |
141.454 | 11 |
142.995 | 29 |
144.525 | 1 |
150.855 | 25 |
156.484 | 10 |
157.174 | 7 |
158.574 | 5 |
159.959 | 4 |
166.188 | 25 |
167.114 | 30 |
169.955 | 8 |
170.085 | 7 |
171.246 | 8 |
175.247 | 5 |
175.847 | 1 |
175.848 | 1 |
177.142 | 1 |
180.828 | 9 |
180.941 | 1 |
181.59 | 1 |
181.721 | 20 |
192.079 | 12 |
195.744 | 1 |
197.263 | 20 |
199.016 | 1 |
199.646 | 1 |
201.379 | 9 |
209.309 | 12 |
210.803 | 2 |
212.437 | 13 |
212.756 | 10 |
213.199 | 3 |