3 ms·
By "naive" random walk, I'm referring to how one would _implement_ a random walk that's restricted to a given range. The most straightforward way to do it is to
by idealmedtech 4y ago
By "naive" random walk, I'm referring to how one would _implement_ a random walk that's restricted to a given range. The most straightforward way to do it is to "clip" any values that would exit the given range by simply coercing them to the bound, eg:
if next_value > upper_bound:
next_value = upper_bound
if next_value < lower_bound:
next_value = lower_bound
This works fine, but serves to concentrate probability mass near the boundaries, so it's no longer uniformly distributed. By reflecting across boundaries rather than coercing, you're effectively flattening that concentration. If you coerce, you also reduce the expected value, which may or may not be a desirable property.