My data:
data
Out[84]:
array([ 1.79, 1.93, 1.81, 1.79, 3.87, 5.75, 7.25, 5.03, 11.11,
11.53, 13.79, 4.41, 4.68, 7.9 , 3.49, 1.8 , 1.85, 2.02,
1.81, 2.33, 2.13, 1.92, 1.74, 1.84])
I defined three ranges/bins in which each element can be:
b = 3
binsize = (Max-Min)/b
d = {}
for i in range(0,b):
upperlimit = Min + (i+1)*binsize
d["Bin "+str(i)+" upper limit"] = upperlimit
d
Out[83]:
{'Bin 0 upper limit': 5.756666666666667,
'Bin 1 upper limit': 9.773333333333333,
'Bin 2 upper limit': 13.790000000000001}
So Bin 0 goes from Min to 5.756 Bin 1 from 5.756 to 9.7733 Bin 2 from 9.7733 to 13.79
I would like to calculate the probability, given an element X, that X+1 will be in a certain bin. The transition probability from one bin to another so to say. How would I do that? I am struggling a bit to wrap my head around that.
So basically, at any point in time t (first element of the array is in t=0, last in t=23) I want to know what the transition probability of going from one bin to another is