But actually what I want to do is to select one item from the whole array according to the Pow(rate, n) and n is their number of order in array, in other words,
rate=0.43
a(1)=6
a(2)=3
a(3)=7
the chances of being selected for each of them will be
a(1)=Pow(0.43, 1)
a(2)=Pow(0.43, 2)
a(3)=Pow(0.43, 3)