Question: First Hitting Time of a random process

Hi all you out there.

I have an UNSORTED sequence  L of floats with elements in the range [a, b > a].
Let c some number such that c < b.
I want to find the smallest k such that L[k] > c.

This problem is related to the search of the "First Hitting Point" (or "First Passage Time") of a random process.
The attached file provides a notional example.
It contains a procedure named FirstHittingPassage which doesn't satisfies me for it is based on an unsmart  "confusion" between an Array and a list.

Would you have a smarter way to proceed ?

Thanks in advance

FirstHittingTime.mw

 

Please Wait...