Question: Simulating a random walk on a filament. Consider a protein that moves along an actin filament starting at position x = 0 . At every

Simulating a random walk on a filament.
Consider a protein that moves along an actin filament starting at position x=0. At every
timestep, it has an equal probability to go right or left, incrementing or decrementing x by
one unit. When it returns to x=0, it falls off and the process stops.
(a) Implement a function that will simulate this walker from its initial state to when it falls
off. The function should output two values: the maximal absolute displacement |x|max
that the walker attained, and the time t at which it fell off.
(b) Run the above simulation 100 times to generate a distribution of |x|max,t pairs. (Note:
this may take a while, depending on the "luck" of your random number generator!).
Construct a plot of |x|max vs t. Does it look linear? What about |x|max vs t2? What
does this mean about how long we would need to wait for it to go twice the greatest
|x|max that you observed?
(c) Plot the histogram of t on a regular scale. What do you observe? Does this make sense?
Why or why not?
(d) Now plot the histogram on a log-log scale (i.e., the histogram of log(t) with a logarithmic
y axis).
Hint: the following code will put the counts for each bin into the variable n, and the
edge for each bin in variable bin:
You can modify the above so that plt.hist computes the histogram of log(x), and
plt.scatter plots log(n) rather than n.
(e) The "time of first return" for a random walk in 1-D (which is what your value t is
measuring) follows a power law distribution. Either by eye or using regression, use your
results from part (d) to estimate the scale parameter .
 Simulating a random walk on a filament. Consider a protein that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!