Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 .
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions

Question

Design a health and safety policy.

Answered: 1 week ago