[latexpage]
Lecture 1
1D Random Walk
 $\delta =$ distance unit
 $\tau =$ time unit
 Unbiased random walk: $\mathrm{Prob(left \quad step)} = \mathrm{Prob(right \quad step)} = 0.5$
 Biased random walk: $\mathrm{Prob(left \quad step)} \neq \mathrm{Prob(right \quad step)}$
Applications of Randomness in Biology
Macromolecule structures
 Entropy = the number of ways someting can be arranged
 Equilibrium systems vs. nonequilibrium systems
 Order of magnitude estimates ⇒ sanity checks
 Forceextension experiment ⇒ entropy vs. energy
Chemotaxis = movement in response to chemicals
 E coli example ⇒ flagella rotation
 Counterclockwise spin ⇒ propel straight
 Clockwise spin ⇒ “tumble”
Diffusion – biased vs. unbiased
Molecular motors
 Kinesin on microtubules
 Polymerase on DNA (during DNA replication)
 Ribosome on RNA (during RNA synthesis)
Ion channels – amount of time spent open vs. closed
Noisy cellular reaction networks
 Bursting ⇒ off state vs. on state
 Timeaveraging ⇒ protein translation/degradation
 Propogation ⇒ gene activation
Reactiondiffusion and biological pattern formation (e.g., BZ reactions)
Viral evolution – high mutation rate (compared to higherorder organisms)
Extinction
 Extinction vs. reintroduction of disease in a local population
 Critical community size = population size needed to sustain infection without exinction
 Small local populations ⇒ more stochastic
Lecture 2
Review of the average, variance, and standard deviation
Consider the following set of data points: 1, 1, 2, 3, 4, 5, 5, 5, 6, 7, 7, 8
 Here, the number of data points is $N=12$
 Average = point that data points are centered about
 The mean average is defined as follows:
$\boxed{\mu = \left< x \right> = \frac{1}{N} \sum _{i=1}^{N}{ x_i}}$


 For our $N=12$ data points, $\left< x \right> = 4.5$
 Alternatively, we can find $\left< x \right>$ using the probabilities associated with each data point, $P(x_i)$
 For our $N=12$ data points…
 There are two data points (the first two listed) that have a value of 1
 ⇒ $P(x_1) = P(x_2) = 2/12$
 There is one data point (the third listed) with a value of 2
 ⇒ $P(x_3) = 1/12$
 There is one data point (the fourth listed) with a value of 3
 ⇒ $P(x_4) = 1/12$
 There is one data point (the fifth listed) with a value of 4
 ⇒ $P(x_5) = 1/12$
 There are three data points (the sixth, seventh, and eighth listed) with a value of 5
 ⇒ $P(x_6) = P(x_7) = P(x_8) = 3/12$
 There is one data point (the ninth listed) with a value of 6
 ⇒ $P(x_9) = 1/12$
 There are two data points (the tenth and eleventh listed) with a value of 7
 ⇒ $P(x_10) = P(x_11) = 2/12$
 There is one data point (the twelfth listed) with a value of 8
 ⇒ $P(x_12) = 1/12$
 There are two data points (the first two listed) that have a value of 1
 We can use this information and to determine $\left< x \right>$ using the following equation:
 $\boxed{\left< x \right> = \sum _{i=1}^{N}{ x_i \cdot P(x_i)}}$
 For our specific example, we would write,
 $\left< x \right> = 1(\frac{2}{12}) + 2(\frac{1}{12}) + 3(\frac{1}{12}) + 4(\frac{1}{12}) + 5(\frac{3}{12}) + 6(\frac{1}{12}) + 7(\frac{2}{12} + 8(\frac{1}{12}) = 4.5$
 For our $N=12$ data points…

Variance = measures how far the data points tend to be spread about the mean
 Mathematical expression:
$\boxed{\sigma ^2 = \left< (x – \mu)^2 \right> = \left< x^2 – 2x\mu + \mu ^2 \right> = \left<x^2 \right> – 2\mu \left< x \right> + \mu ^2}$
 Recall: $\mu = \left< x \right>$
 $\sigma ^2 = \left<x^2 \right> – 2 \left< x \right> \left< x \right> + \left< x \right> ^2 = \left<x^2 \right> – 2 \left< x \right> ^2 + \left< x \right> ^2 = $\left< x^2 \right> – (21) \left< x \right> ^2 = $\left< x^2 \right> – \left< x \right> ^2 $
 Thus, $\boxed{\sigma ^2 = \left< x^2 \right> – \left< x \right> ^2}$ (or, $\sigma ^2 = \left< x^2 \right> – \mu ^2$)
 IMPORTANTLY, $\left< x^2 \right>$ is DISTINCT from $\left< x \right> ^2$
 $\left< x^2 \right>$ denotes the average of a set of data points that have been squared from their original value
 $\left< x \right> ^2$ denotes squaring the average of a set of data points
 IMPORTANTLY, $\left< x^2 \right>$ is DISTINCT from $\left< x \right> ^2$
 Lets compute the variance for our $N=12$ data set we defined earlier: 1, 1, 2, 3, 4, 5, 5, 5, 6, 7, 7, 8
 First, we need to find $\left< x^2 \right>$:
 Let $m = 8$ denote the number of possible values a data point may obtain
 The mathematical expression for $\left< x^2 \right>$ is…
 $\left< x^2 \right> = \sum _{j=1}^{m}{ x_{j}^2 \cdot P(x_j)} = \frac{1}{N} \sum _{i=1}^{N}{ x_{i}^2}$
 Thus, for our example
 $\left< x^2 \right> = 1^2 (\frac{2}{12}) + 2^2 (\frac{1}{12}) + 3^2 (\frac{1}{12}) + 4^2 (\frac{1}{12}) + 5^2 (\frac{3}{12}) + 6^2 (\frac{1}{12}) + 7(\frac{2}{12}) + 8(\frac{1}{12}) \approx 25.333$
 Now, we can compute the variance for our data set:
 $\sigma ^2 = \left< x^2 \right> – \left< x \right> ^2 \approx 25.333 – (4.5)^2 \approx 5.0833$
 First, we need to find $\left< x^2 \right>$:
 Important notes on the variance formula:
 The variance formula contains a squared exponent to account for any possible negative data values ⇒ prevents data points from cancelling eachother out
 Although an operator such as the absolute value initially seems like an appropriate way to describe the variance of a data set, it does’nt always provide “good” answers (i.e., it can cause problems with certain data sets that squaring doesn’t create)
 The variance formula contains a squared exponent to account for any possible negative data values ⇒ prevents data points from cancelling eachother out
 Any measure of variance should have squared units with respect to the units used in the data set we are taking the variance of
 E.g., if our example data set has units in $\mathrm{mm}$, the units of the variance will be $\mathrm{mm^2}$
 However, interpreting values that has squared units of what we were originally measuring can be counterintuitive
 So, we usually calculate something called the standard deviation to get a better intuition when interpreting the variance of a data set
 Equation: $\boxed{\sigma = \sqrt{\sigma ^2} = \sqrt{\left< x^2 \right> – \left< x \right>^2}}$
 For our example data set, $sigma = \sqrt{5.08333 \mathrm{mm^2}} \approx 2.2546 \mathrm{mm}$ (units aren’t squared!)
 Takehomemessage: the standard deviation is better for gaining intuition about the spread of data than variance because it gives a value in units rather than units squared
 So, we usually calculate something called the standard deviation to get a better intuition when interpreting the variance of a data set
Review of probabilities
Suppose $A$ and $B$ are two independent events (i.e., the chances of event $B$ occuring are independent of whether event $A$ occurs and viceversa)
Some notations:
 Let $S$ denote the all possible events that can occur in some sample space
 $P(A \cap B)=$ the probability of event $A$ AND event $B$ occuring
 Ven Diagram (shaded region represents the case where both events occur):
 We can find the probability of multiple independent events occuring by multipliying the probabilities of each individual event together
 For our events $A$ and $B$, $\boxed{P(A \cap B)= P(A)P(B)}$
 Example: the probability of flipping two heads in a row if we flip a coin twice
 Let event $A$ be the event where the first coin toss is heads
 For an unbiased coin, $P(A) = 0.5$
 Let event $B$ be the event where the second coin toss is heads
 For an unbiased coin, $P(B) = 0.5$
 Since events $A$ and $B$ are independent of one another (our outcome of the second coin toss is independent of the outcome of our first coin toss and viceversa), we can use our expression for $P(A \cap B)$ to determine the probability of getting two heads:
 $P(A \cap B) = P(A)P(B) = 0.5 \cdot 0.5 = 0.25$
 Thus, there is a 25% chance of getting two heads after flipping an unbiased coin twice
 Let event $A$ be the event where the first coin toss is heads
 $P(A \cup B)=$ the probability of event $A$ OR event $B$ occuring
 Ven Diagram (shaded region represents cases where at least one of our two events of interest occur):
 We can find the probability of at least one of these two events occuring by summing the individual probabilities and subtracting any double counting
 For our events $A$ and $B$, $\boxed P(A \cup B) = P(A) + P(B) – P(A \cap B)$
 Example: if we roll two dice, what is the probability that at least one of die giving a even number?
 Let event $A$ be the event that the first die gives an even number
 $P(A) = 0.5$ is the probability of event $A$ occuring
 Let event $B$ be the event that the sescond die gives an even number
 $P(B) = 0.5$ is the probability of event $B$ occuring
 Note: if we just added $P(A)$ and $P(B)$ together to determine $P(A \cup B)$, we would be doublecounting the probability associated with both events $A$ and $B$ occuring ⇒ need to subtract $P(A \cap B)$ from our summed probabilities
 $P(A \cup B) = P(A) + P(B) – P(A \cap B)$
 First determine $P(A \cap B)$:
 $P(A) = 0.5$
 $P(B) = 0.5$
 $P(A \cup B) = P(A)P(B) = 0.5(0.5) = 0.25$
 $P(A \cup B) = 0.5 + 0.5 – 0.25 = 0.75$
 Thus, there is a 75% chance of rolling at least one even number if we roll two die
 First determine $P(A \cap B)$:
 $P(A \cup B) = P(A) + P(B) – P(A \cap B)$
 Let event $A$ be the event that the first die gives an even number
 $P(\mathrm{neither} A \mathrm{nor} B) = P(\mathrm{not} A) \cdot P(\mathrm{not} B)$
 Venn Diagram (shaded region represents all possible events besides events $A$ or $B$):
 Note: $P(A \cup B) = 1 – P(\mathrm{neither} A \mathrm{nor} B)$
 Often times, it is convienent to find the probability of something by considering the probability that the “opposite” of what you are trying to find and subtracting that probability from 1
 Example: use this strategy to compute the probability of rolling at least one even die if we roll two dice
 The “opposite” of rolling at least one even number is to roll two odd numbers
 Let $A$ denote the event where the first die gives an odd number
 $P(A) = 0.5$
 Let $B$ denote the event where the second die gives an odd number
 $P(B) = 0.5$
 Let $A$ denote the event where the first die gives an odd number
 Subtracting the product of the probabilities of our “opposite” events from 1 will give us the total probability of at least one “nonopposite” event occuring
 $P(\mathrm{at \\ least \\ one \\ even} = 1 – P(A)P(B) = 1 – 0.5(0.5) = 1 – 0.25 = 0.75$
 75% chance of rolling at least one even number (agrees with the probability we found for this earlier!)
 $P(\mathrm{at \\ least \\ one \\ even} = 1 – P(A)P(B) = 1 – 0.5(0.5) = 1 – 0.25 = 0.75$
 The “opposite” of rolling at least one even number is to roll two odd numbers
Sources
 Dr. Leah Shaw – BIOL 356: Random Walks in Biology, Lecture 1 (College of William and Mary)