Re: Cumulative probability that random walk variable exceeds
- To: mathgroup at smc.vnet.net
- Subject: [mg104863] Re: [mg104834] Cumulative probability that random walk variable exceeds
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Thu, 12 Nov 2009 06:02:27 -0500 (EST)
- References: <200911110928.EAA29352@smc.vnet.net>
Kelly Jones wrote: > How can I use Mathematica to solve this problem? > > Let x[t] be a normally-distributed random variable with mean 0 and > standard deviation Sqrt[t]. > > In other words, x[0] is 0, x[1] follows the standard normal > distribution, x[2] follows the normal distribution with mean 0 and > standard deviation Sqrt[2], etc. > > It's easy to compute the probability that x[5] > 2 (for example). > > How do I compute the probability that x[t] > 2 for 0 <= t <= 5. > > In other words, the probablity that x[t] surpassed 2 at some point > between t=0 and t=5, even though x[5] may be less than 2 itself. Notes: > > % My goal: predicting whether a continuous random walk will exceed a > given value in a given period of time. > > % I realize that saying things like "x[5] may be less than 2" is > sloppy, since x[5] is a distribution, not a value. Hopefully, my > meaning is clear. > > % I tried doing this by adding/integrating probabilities like this > (psuedo-code): > > P(x[t] > 2 for 0 <= t <= 5) = Integral[P(x[t] > 2),{t,0,5}] > > but this overcounts if x[t] > 2 for multiple values of t. Should be something like integrating 1-CDF[...,2] from 0 to 5, then divide by length of integration range (which of course is just 5). In[9]:= Integrate[f[t, 2], {t, 0, 5}]/5 Out[9]= 1/5*(-(Sqrt[(10/Pi)]/E^(2/5)) - 9/2*(-1 + Erf[Sqrt[2/5]])) In[8]:= N[%] Out[8]= 0.0947972 This assumes your t is uniformly distributed. It also assumes I know what I'm talking (writing) about, which in this instance is iffy at best. Daniel Lichtblau Wolfram Research
- References:
- Cumulative probability that random walk variable exceeds given value
- From: Kelly Jones <kelly.terry.jones@gmail.com>
- Cumulative probability that random walk variable exceeds given value