Asymptotic Behavior of the Sample Mean of a Function of the Wiener Process and the MacDonald Function