Transport • There are only three ways that particles (such as molecules or organisms) can move from place to place: l (1) Convection or advection: mass movement. • E.g., E g fluid flow (2) Active transport: with expenditure of chemical energy. • E.g., across cell membranes via channel proteins: – Trans-membrane proteins found in the phospholipid bilayer membranes of living cells. • Movement of organisms under their own power. Transport (3) Diffusion: Diff i random d movement, t e.g. including: i l di • Brownian motion: – Biologist o og st Robert obe t Brown o first st wrote ote in tthe e 19 9th ce century tu y about the random motion of pollen grains in a dish of water. – Theory y developed p by y Albert Einstein and others. • Osmosis: – Net movement of solvent molecules through a partially permeable membrane into a region of higher solute concentration. • Random walk: – Mathematical formalization f off a path that consists off a succession of random steps. – Brownian motion: unbiased random walk. – Osmosis: biased random walk. Random walks • Examples of random walks: – Brownian motion: unbiased random walk. – Osmosis: biased random walk. walk – Genetic drift: unbiased random walk through a state space. – Natural selection: biased random walk through a state space. Diffusion • Diffusion model is used to describe random movement of many types of particles: – Molecules – Small aquatic organisms – Larger animals • Plays Pl iimportant t t role l iin many lif life processes: – – – – Directed movements along concentration gradients. Gas exchange across respiratory surfaces. Fluid exchange across excretory surfaces. Searching behavior of organisms. • Usually effective over small distances. – Rate is proportional to concentration difference between two regions. Random walk in one dimension • Suppose that we we’re re studying the random movement of a fish in a narrow stream (1D random swim). – Suppose pp that an individual fish moves at random to right g or left once every second (unbiased). • Jumps are of fixed step-length, s. • Initially assume that fish f always moves to the left f with probability 0.5, or to the right with probability 0.5. • Consecutive movements are independent of one another. • Binomial. – Possible questions: • What course would the fish f be likely to take? ? • What would be the distribution of its position after N seconds? • How do ‘decisions’ that individuals make translate into patterns of population abundance at different locations? Random walk in one dimension • Some instances (instantiations) of random walks: p( L) 0.5 Time p( R) 0.5 05 Displacement p p( L) 0.8 p( R) 0.2 Time Time p( L) 0.6 p( R) 0.4 Displacement Displacement Random walk in one dimension • Random walks over many realizations (instantiations): – Can be modeled by a binomial distribution. – Can be approximated pp byy a normal distribution. p( L) 0.5 p( R) 0.5 – Mean? – Variance (=standard deviation2)? Random walk in one dimension • Consider the number of right moves, R, in N seconds (steps), where p=Pr(R) is the probability of a rightward move. move • Equivalent to distribution of the number of ‘successes’ in N trials, where p probability y of success is p. – Binomial distribution: B(N, p). • X = position of fish relative to starting point: = Difference between numbers of rightward and leftward steps steps, – Times the size of the step, s: X R N R s 2 R N s Random walk in one dimension • Thus the distribution of position after N steps is a scaled binomial (multiplied by 2s), with mean displaced. p • Can estimate the mean position and the variance of position as time increases. • For binomial distribution B(N, p): – Mean: E [ ] = ‘expected value’ E R Np ( p) – Variance: var R Npq Np (1 • Substituting t for N to get time, we obtain: E X 2 E R N s 2 Np N s Ns 2 p 1 ts 2 p 1 var X 4 s 2 var R 4 s 2 Np 1 p 4 s 2tp 1 p s step length s 2 square of step length Random walk in one dimension • So, mean and variance of position change with time: E X ts 2 p 1 var X 4 s 2tp 1 p • If p = 0.5, 0 5 simplifies i lifi tto: EX 0 var X s 2t – Mean position over many realizations remains zero zero. – Variance of position increases linearly with time. Random walk in one dimension • Probabilities of each position in a simple unbiased random walk, with equal probabilities of moving left and d right: i ht Position (X) Time -5s 5s -4s 4s -3s 3s -2s 2s -s s 0 s 2s 3s 4s 5s t=0 1 t=1 0.5 0.5 t=2 0 25 0.25 05 0.5 0 25 0.25 t=3 0.125 0.375 0.375 0.125 t=4 0.0625 0.25 0.375 0.25 0.0625 t=50 0.031 03 0.156 0 56 0.313 0 3 3 0.313 0 3 3 0.156 0 56 0 03 0.031 • Assumes statistical independence across both position (x) and time (t) (t). Random walk in one dimension • Random walk on a 1D grid modeled exactly with a binomial distribution, and approximated by a normal distribution: Random walk in one dimension • Normal approximation: – Probability that the fish lies in the range x, x x after a te ttime e t iss given g e by by: 2 x ts 2 p 1 1 x Pr exp 2 8ts p 1 p 2 s 2 p 1 p t – Suppose: • N individuals released at t = 0. • Carry out independent random walks. – Then the expected density (concentration) of fish at a distance x from starting point is: 2 x ts 2 p 1 N u x, t exp 2 8ts p 1 p 2 s 2 p 1 p t Random walk in one dimension • In the special case of p 12 , density simplifies to: 2 N x u x, t exp 2 s 2 t 2ts • Based on properties of normal distribution: – 95% of cases lie within 1.96 standard deviations of the mean. – So expect to find, on average, 95% of the fish within Standard normal distribution 1.96 s t 0.4 0 35 0.35 of the origin at any time t. 50% (z=0.674) 0.3 f(X) 0.25 0.2 0.15 90% (z=1.645) 0.1 95% (z=1.960) 0.05 99% (z=2.576) 0 -3 -2 -1 0 1 z (standard deviation units) 2 3 Random walk in one dimension • Expected specific densities for unbiased random walks, based on normal approximation: p = 0.50; t = 5, 10, 20, 30, 50 0.18 0.16 0.14 Densiity 0.12 01 0.1 0.08 0.06 0.04 0.02 0 -20 -15 -10 -5 0 5 Position (x) 10 15 20 Random walk in one dimension • Expected specific densities for biased random walks, based on normal approximation: p = 0.30; t = 5, 10, 20, 30, 50 p = 0.75; t = 5, 10, 20, 30, 50 0.2 0.25 0.18 0.16 0.2 0.12 Densitty Densitty 0.14 0.1 0.08 0.15 0.1 0.06 0.04 0.05 0.02 0 -40 -35 -30 -25 -20 -15 -10 -5 0 0 Position (x) 0 5 10 15 20 25 Position (x) p Pr( R) 30 35 40 45 Random walk in one dimension • Can simulate random walks by (pseudo (pseudo-)randomly )randomly generating values {+1, –1} in proportion to the probabilities p and q p q=1-p p across t steps. p – Generate N independent random walks to provide N predictions of position x at time t. – Mean, standard deviation and variance of the N values provide descriptors of the distribution of x. t = 10 350 t = 10 p = 0.25 N = 1000 Mean = -4.94 Stdev = 2.68 Var = 7.16 300 250 t = 10 p = 0.50 N = 1000 Mean = 0.18 Stdev = 3.14 Var = 9.88 300 p = 0.75 N = 1000 Mean = 4.96 Stdev = 2.78 Var = 7.75 250 200 150 Frequency 200 Frequency Frequency 250 150 100 150 100 100 50 50 0 -12 200 -10 -8 -6 -4 -2 Position 0 2 4 6 0 -10 50 -8 -6 -4 -2 0 Position 2 4 6 8 10 0 -8 -6 -4 -2 0 2 Position 4 6 8 10 12 Random walk in two dimensions • Random walk in a plane results in same form of model and solution: – But in two variables (x (x,y) y) rather than one one. – Allows movement in four directions, at mutual right angles, g , with specified p p probabilities. – Examples of unbiased random walks: t = 100 t = 100 20 30 t = 100 10 15 20 10 5 5 0 y 0 y y 10 0 -5 -10 -5 -10 -20 -15 -30 -30 -20 -10 0 x 10 20 30 -20 -20 -10 10 -15 -10 -5 0 x 5 10 15 20 -10 -5 0 x 5 10 Random walk in two dimensions • As with 1D walks, density distributions of final positions for N walks can be simulated: px 0.5, p y 0.5 30 px 0.3, p y 0.5 Final positions at t = 50 px 0.7, p y 0.7 Final positions at t = 50 40 Final positions at t = 50 40 30 20 30 20 20 10 10 0 0 y 0 y y 10 -10 -10 -10 -20 -20 -30 30 -20 20 -30 -40 -30 -30 -20 -10 0 x 10 20 30 -40 -40 -30 -20 -10 0 x 10 20 30 40 -40 -30 -20 -10 0 x 10 20 30 40 Random walk in two dimensions • Bivariate solution is exactly multinomial, but can be approximated by bivariate normal distributions. – Marginal distributions are normal. – Extends to: • Correlated random walks. • Random R d walks lk iin k dimensions di i ((multivariate lti i t normall distributions). Bivariate normal distribution • 5-parameter distribution: f ( X ,Y ) 1 2 X Y 1 2 e X 2 Y 2 X X Y Y X Y 1 2 2 2 (1 ) X Y X Y 0.2 0.15 0.1 0.05 0 4 2 0 -2 Y-axis -4 -4 -3 -2 -1 X-axis 0 1 2 3 4 Diffusion in one dimension • Diffusion: continuous random movement of molecules or other particles. • Assume that molecules move along one dimension ( (x-axis): i ) – Concentration (density) of molecules at position x at time t: c(x, c(x t). t) – Number of molecules at time t in the interval (x1, x2): N x1 , x2 (t ) c x, t dt d x2 x1 Diffusion in one dimension • Molecules move randomly randomly, so number of molecules in a given interval changes with time. • Can express change as difference between net movement of molecules at the ends of the interval. • Flux: net number of molecules crossing x from the left to the right during a time interval of length ∆t: Flux J x, t t for random movement • Change in number of molecules in interval x0 , x0 x during the time interval t , t t : N x0 , x0 x t t N x0 , x0 x t J x0 , t t J x0 x, t t Diffusion in one dimension • Divide Di id b both th sides id b by ∆t and d llett ∆t → 0: 0 lim t 0 N x0 , x0 x t t N x0 , x0 x t t J x0 , t J x0 x, t • By definition: N x0 , x0 x t t N x0 , x0 x t d lim N x0 , x0 x t t 0 t dt d x0 x c x, t dx x dt 0 • This is the derivative of an integral. When c(x, t) is sufficiently smooth, can interchange differentiation and integration. Diffusion in one dimension x0 x c x, t d x0 x • Then: c x, t dx dx x0 dt x0 t • Putting this all together, we get: x0 x c x, t dx J x0 , t J x0 x, t x0 t • Divide both sides by ∆x and take the limit ∆x → 0: c x0 , t 1 x0 x c x, t – Left-hand side: lim dx x x 0 x 0 t t J x0 , t J x0 x, t J x0 , t – Right-hand side: lim x 0 x x c x0 , t J x0 , t – Together: t x Diffusion equation • Combining and simplifying simplifying, we get the diffusion equation: c x, t 2 c x, t c 2c D 2 D 2 t x t x – where D is a p positive diffusion constant (in units of distance2/time): x D 2 Conncentration (c) 2t • In words: rate of change of concentration at a point is proportional ti l tto th the ‘‘curvature’ t ’ iin th the relationship l ti hi off concentration to distance. Position (x) Diffusion equation c 2c D 2 t x • Diffusion Diff i equation ti is i ubiquitous bi it iin bi biology: l – Brownian motion and osmosis: descriptions of random movements of particles. – Change in allele frequencies due to random genetic drift. – Invasion of alien species into new habitats. – Chemotaxis: movement of organisms along chemical gradients. – Pattern formation in developing embryos along morphogen gradients. – Physics: heat equation describing diffusion of heat through a solid bar (c = temperature). – Represents a null hypothesis: must be rejected to show that movement or change is non-random. Diffusion equation c x, t 2 c x, t D t x 2 c x, t • For diffusion, we get Fick’s law: J x, t D x – Flux is linearly proportional to the change in concentration along the position axis axis. – Negative sign means that the net movement of molecules is from regions of high concentration to region of low concentration. – If no change in concentration, net movement is zero. Diffusion constant • Diffusion constant, constant =diffusion coefficient, coefficient =diffusivity: rate at which a diffusing substance is transported p between opposite pp faces of a unit cube of a system when there is unit concentration difference between them. Diffusion in one dimension • F For mostt purposes, the th diffusion diff i equation ti can be b solved analytically: c x, t 2 c x, t D t x 2 x2 1 c x, t exp 4 Dt 4 Dt • Compare with equation for the normal distribution: 2 x 1 f x exp 2 2 2 0, 2Dt Diffusion in one dimension • Rates of change of c(x,t) with time and curvature of c. c(x, t) t = 1, 2, 3, 4, 10, 20, 30, 40 x Diffusion in two dimensions • Diffusion equation generalizes easily to higher dimensions. • For diffusion in a plane: 2 c x , y , t 2 c x, y , t c x, y, t D 2 2 t x y 2 2 x y 1 exp c x, y , t 4 Dt 4 Dt • General prediction: area is linearly proportional to time. • Diffusion constant D is independent of number of dimensions. – Measures ability of particles to move through medium medium. Diffusion, random walk, and normal distributions • Normal distribution arises in two different ways: – 1D random walk: • Described exactly by a binomial distribution of stepwise movements. • Approximated by a normal distribution when N is large. • Extrapolates to multiple dimensions. – 1D diffusion equation: • Based on concept of flux: net number of molecules crossing x from the left to the right during a time interval of length ∆t. • Solution of the diffusion equation yields a model equivalent to a truncated normal distribution. • Extrapolates to multiple dimensions. Example: spread of muskrats • One of first applications of diffusion equation in ecology (Skellam 1951): – Several muskrats accidentally released in 1905 in central Germany. – Spread p to cover most of Germany y and Austria by y 1927. – Rate of spread is consistent with diffusion model: area Example: larval wanderings • M Movementt off flatworm fl t larvae l (Broadbent (B db t and d Kendall, 1953): – Larvae placed at center of series of concentric circles. – At each time interval, counted numbers of larvae within circles: –E Expressed d 2D diff diffusion i model d l in terms of polar coordinates such that linearity of terms is consistent i with i h model: d l Parenthetical topic: polar coordinates • Cartesian and polar coordinate systems: r x2 y 2 y arctan x x r cos y r sin • Typically used in models of animal dispersion.