Question: D = 1 # microns - ( 2 ) / ( s ) ; lengths are measured in microns T = 5 #s dt =
D# microns s; lengths are measured in microns
T#s
dt#s same as ms
: # three random walks
for in range:
xs ys rwdDTdt
pltplotxsys
pltgcasetaspect #sets the aspect ratio
pltxlabelx microns
pltylabely microns From trajectories to diffusion coefficients, part I: linear fit points
Let's call a set of independent trajectories with the parameters above one "experiment". From each experiment, we can calculate the MSD of the ten trajectories leftlangle rtrightrangle where rxy as before. Since the MSD for an extremely large number of trajectories, would approach D t a sensible estimate of D is hatD bestfit slope of r vs t divided by Bestfit" linear regression; in Python you can use scipy. stats.linregress. The 'hat' on the variable defined above signifies that it is an estimate of the true underlying D and in general will differ from D Write a program that uses this approach to estimate D
i Suppose we only have resources to generate one experiment in the real world, with independent tracks measured in that experiment. We want to know how well the estimate from the linear fit above, applied to a single experiment, might match the true value of D To do so simulate independent experiments each with independent trajectories and collect the estimate hatD from each experiment. Generate and submit a histogram of the hatD values you could use eg matplotlib. pyplot hist; you can choose the number of bins to make sure most bins have a few hits atleast Also calculate and report the mean and standard deviation of the estimates across the experiments. How does the average hatD from the experiments compare to the true value of D If you only ran one experiment, your estimate would fall within one standard deviation of the estimated mean about of the time, so the standard deviation provides an estimation of how accurate your linear fit procedure would be ii A friend argues, "why don't you perform a linear fit of rt against t for each of your ten trajectories, and then average the resulting ten estimates to get hatD for the experiment? You're averaging over more fits within each experiment, so you would get better statistics." What is the flaw in this argument? Repeat part i but now generate a D estimate from each experiment by perform ten fits for the individual trajectories and averaging over the resulting hatD values. Is the spread of D estimates over the experiments better, worse, or the same as in i
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
