this is mathematical question for programming needs…
whats the way to calculate probability if you have some data like this
40000
32423432
3423423
4543535
354545
the lowest number is lets say 40000 and the biggest is 32423432
those numbers are given in some txt file like a input parameter and i need to generate a xml file that will be in this format
<number="40000" probability="0.0">
<number="32423432" probability="1.0">
<number="354545" probability="0.4532">
i wrote the program with the input parametars and i use TinyXML to generate the xml file but im having problems with the formula…
so if anyone halp thanks!
If you want a linear scaling (mapping) then this will work (using doubles):
Note this gives a value of 0.0097 for a number of 354545, so maybe you don’t want it to be linear, in which case you need to give more details.