Introduction to Stochastic Models Shlomo Ta’asan Carnegie Mellon University.

Slides:



Advertisements
Similar presentations
BU BU Decision Models Simulation1 Simulation Summer 2013.
Advertisements

Probability II (2 nd Lesson) By Samuel Chukwuemeka (Samdom For Peace)
Probability Distributions CSLU 2850.Lo1 Spring 2008 Cameron McInally Fordham University May contain work from the Creative Commons.
7.3 Introduction to Probability This presentation is copyright by Paul Hendrick © , Paul Hendrick All rights reserved.
Physics 114: Lecture 9 Probability Density Functions Dale E. Gary NJIT Physics Department.
Random Variables A random variable is a variable (usually we use x), that has a single numerical value, determined by chance, for each outcome of a procedure.
Probabilistic Modeling of Molecular Evolution Using Excel, AgentSheets, and R Jeff Krause (Shodor)
 Monday, 10/28/02, Slide #1 CS106 Introduction to CS1 Monday, 10/28/02  QUESTIONS on HW 03??  Today: Generating random numbers  Reading & exercises:
The Chemotactic Paradox Amie Cubbon Denise Gutermuth.
Maximum likelihood estimates What are they and why do we care? Relationship to AIC and other model selection criteria.
Analysis of Boolean Functions Fourier Analysis, Projections, Influence, Junta, Etc… And (some) applications Slides prepared with help of Ricky Rosen.
CSE 221: Probabilistic Analysis of Computer Systems Topics covered: Discrete random variables Probability mass function Distribution function (Secs )
Probability theory Much inspired by the presentation of Kren and Samuelsson.
Discrete Event Simulation How to generate RV according to a specified distribution? geometric Poisson etc. Example of a DEVS: repair problem.
Random Variables A Random Variable assigns a numerical value to all possible outcomes of a random experiment We do not consider the actual events but we.
CSE 221: Probabilistic Analysis of Computer Systems Topics covered: Multiple random variables Transform methods (Sec , 4.5.7)
Mathematical Modelling of Phage Dynamics: Applications in STEC studies Tom Evans.
C82MCP Diploma Statistics School of Psychology University of Nottingham 1 Overview Parameters and Statistics Probabilities The Binomial Probability Test.
The Arkin model of the lysis- lysogeny decision of phage lambda Tom Evans.
1 Introduction to Biostatistics (PUBHLTH 540) Sampling.
Probability Theory: Counting in Terms of Proportions Great Theoretical Ideas In Computer Science Steven Rudich, Anupam GuptaCS Spring 2004 Lecture.
Joint Distribution of two or More Random Variables
Prof. SankarReview of Random Process1 Probability Sample Space (S) –Collection of all possible outcomes of a random experiment Sample Point –Each outcome.
Warm up The probability of event A is given by P(A) = n(A) = 8 = 2 n(S) What could event A be? What is the Sample Space, S?
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProbability.
1 9/8/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
Suppose a given particle has a 0.01 probability of decaying in any given  sec. Does this mean if we wait 100  sec it will definitely have decayed? If.
1 9/23/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
Modeling and Simulation CS 313
Sullivan – Fundamentals of Statistics – 2 nd Edition – Chapter 5 Section 1 – Slide 1 of 33 Chapter 5 Section 1 Probability Rules.
Probability Rules!. ● Probability relates short-term results to long-term results ● An example  A short term result – what is the chance of getting a.
Probability Distributions. Essential Question: What is a probability distribution and how is it displayed?
1.2 – Random Samples Simple Random Sample – Every sample of size n from the population has an equal chance of being selected – Every member of the population.
CIS 2033 based on Dekking et al. A Modern Introduction to Probability and Statistics Michael Baron. Probability and Statistics for Computer Scientists,
Introduction to Behavioral Statistics Probability, The Binomial Distribution and the Normal Curve.
Introduction to ODE Modeling Shlomo Ta’asan Carnegie Mellon University.
Modeling frameworks Today, compare:Deterministic Compartmental Models (DCM) Stochastic Pairwise Models (SPM) for (I, SI, SIR, SIS) Rest of the week: Focus.
Mathematical Modeling of Signal Transduction Pathways Biplab Bose IIT Guwahati.
The Cosmic Ray Observatory Project High Energy Physics Group The University of Nebraska-Lincoln Counting Random Events A “fair” coin is flipped at the.
CS433 Modeling and Simulation Lecture 03 – Part 01 Probability Review 1 Dr. Anis Koubâa Al-Imam Mohammad Ibn Saud University
NLP. Introduction to NLP Very important for language processing Example in speech recognition: –“recognize speech” vs “wreck a nice beach” Example in.
Simulating Probabilistic Behaviour
Lecture 2 Molecular dynamics simulates a system by numerically following the path of all particles in phase space as a function of time the time T must.
Introduction to the Essentials of Excel COMP 066.
Introduction.
An Agent Epidemic Model Toward a general model. Objectives n An epidemic is any attribute that is passed from one person to others in society è disease,
The generalization of Bayes for continuous densities is that we have some density f(y|  ) where y and  are vectors of data and parameters with  being.
Random Variables Ch. 6. Flip a fair coin 4 times. List all the possible outcomes. Let X be the number of heads. A probability model describes the possible.
Sampling and estimation Petter Mostad
PROBABILITY AND STATISTICS WEEK 4 Onur Doğan. Random Variable Random Variable. Let S be the sample space for an experiment. A real-valued function that.
Discrete Random Variables. Introduction In previous lectures we established a foundation of the probability theory; we applied the probability theory.
MATH 256 Probability and Random Processes Yrd. Doç. Dr. Didem Kivanc Tureli 14/10/2011Lecture 3 OKAN UNIVERSITY.
SS r SS r This model characterizes how S(t) is changing.
Chapter 4 - Random Variables Todd Barr 22 Jan 2010 Geog 3000.
Introduction. What is probability? Probability is the chance that a given event will occur. Examples Probability that it will rain tomorrow. Probability.
Probability Distribution. Probability Distributions: Overview To understand probability distributions, it is important to understand variables and random.
The normal approximation for probability histograms.
Introduction Sample surveys involve chance error. Here we will study how to find the likely size of the chance error in a percentage, for simple random.
CIS 2033 based on Dekking et al. A Modern Introduction to Probability and Statistics B: Michael Baron. Probability and Statistics for Computer Scientists,
Discrete and Continuous Random Variables
Probability II (2nd Lesson)
CS005 Introduction to Programming
Introduction to Probability and Statistics
Probability, Part I.
I flip a coin two times. What is the sample space?
Probability of a single event
Section 1 – Discrete and Continuous Random Variables
Independence and Counting
Independence and Counting
Independence and Counting
Presentation transcript:

Introduction to Stochastic Models Shlomo Ta’asan Carnegie Mellon University

Download StochasticModels.zip tsb.mssm.edu/summerschool/index.php/Introduction_to_stochastic_modeling

How to work with Probabilities? Simplest model: Tossing a fair coin P (Head) = 1/2 ; P (Tail) = 1/2 How to toss a coin using matlab? rand - generates a random number between 0 and 1 rand(100,1) generate 100 random numbers 100*rand generate a random number between 0 and 100 (decimal numbers) We also need to know how to do something (kill the cell) with probability P r = rand if r < P cell dies end

The models Reactions Random Walks Chemotaxis Macrophage Looking for Bacteria

Stochastic Models for Reactions

Modeling Reactions A -> 0 per event A count goes down by 1. A -> B per event A count goes down by 1, B count goes up by 1 A + B -> C per event: A,B count go down by 1, C count goes up by 1 Model in two ways: 1. ABM: modeling of each molecule, 1 it exists, 0 is it deleted. for each agent we perform an action with some probability 2. probabilistic model for total number of molecules in each group. Na, Nb, etc the total number of molecules of type A,B, … we change Na, Nb etc by one according to some probability

Our first real ABM: A-> 0 A cell dies with probability p during time interval dt. P(A-> 0; dt) = p * dt For simulation we need a counter for time, and a variable to monitor if the cell is dead or alive. Use a variable x for this. x = 1 cell is alive x = 0 cell is dead What if we have many cells? What are the questions we can ask about this model? population size as a function of time, average time to extinction, fluctuation in time to extinction  Matlab code: realABM_A.m

Efficient Probabilistic Model: A-> 0 A cell dies with probability p during time interval dt. P(A-> 0; dt) = p * dt We model the total number of agents, Na, instead of each agent. We pick dt small enough such that only one cell can die (i.e the probability that two die is very small, so we ignore it) The only event in this model: Na -> Na -1 (when one of the agents dies) P( Na -> Na – 1) = p*Na*dt This is much faster than the real ABM model. Sometimes it is enough to do this type of models. Sometimes we need a full ABM model Lets do the simulation! Matlab Code ABM_A.m

Stochastic-SIR Population has three groups: Susceptible, Infected and Recovered The dynamics is expressed in the reactions S + I -> I + I (probability: r*dt) event 1 I -> R (probability: a*dt) event 2 When to expect epidemic? A relation between parameters Ns, Ni, Nr population size for Susceptible, Infected and Recovered. We pick dt small enough such that only one event will happen, The probability of events P( S+I -> I + I) = r*Ns*Ni*dtevent 1 happens just once during dt P(I -> R) = a*dt*Nievent 2 happens just once during dt Since probabilities are < 1, dt should be small enough. More precisely, We want the sum of all probabilities to be less than 1. !!!

Stochastic-SIR cont. Each event changes the variables of the model Ns, Ni, Nr. Event 1: S + I -> I + I  Ns -> Ns -1 and Ni -> Ni + 1 Event 2: I -> R  Ni -> Ni – 1 and Nr -> Nr + 1 P( Ns -> Ns -1 & Ni -> Ni + 1) = r*Ns*Ni*dt P( Ni -> Ni -1 & Nr -> Nr + 1) = a*dt*Ni Now lets simulate it. Matlab Code: ABM_SIR.m How does it compare with the ODE model? Notice the finite time to eradicate infection in this model. Compare to the ODE.

Stochastic vs. ODE Reaction: A + 2 X  3X A  X Multiple steady states! ODE Stochastic model Stochastic models do more than just adding noise to results of an ODE!!

Modeling cell movement

Random Walks A basic random walk in 2D: P( x-> x+1, y->y) = ¼ P( x-> x-1, y->y) = ¼ P( x-> x, y->y-1) = ¼ P( x-> x, y->y+1) = ¼ Pick a random number, r. if r between 0 and ¼ go right If r between ¼ and ½ go left, if r is between ½ and ¾ go down, if r between ¾ and 1 go up. Questions: If we start at (0,0), where will we be after n steps? in different places each time How to describe this? Probability distribution Lets simulate it: Matlab code randomWalk.m - ABM for bacterial movement ¼ ¼ ¼ ¼

Stochastic Modeling of Chemotaxis 1 st Ingredient: Bacterium performs a biased random walk based on the gradient (gX,gY) of the chemoattractant molecules. P( x-> x+1, y->y) = ¼ + gX P( x-> x-1, y->y) = ¼ - gX P( x-> x, y->y+1) = ¼ + gY P( x-> x, y->y-1) = ¼ - gY Simulation similar to previous random walk.. 2 nd Ingredient: Chemoattractant molecules diffuse (spread) we model them using concentration at every lattice point C(I,j) Evolution: an average between value at (I,j) and values at nbrs C new (i,j) = 0.6*C old (i,j) + 0.1*(C old (i+1,j)+C old (i-1,j)+C old (I,j+1)+C old (i,j-1)) Matlab code: Chemotaxis.m ¼ +gY ¼ +gX ¼ -gY ¼ -gX

A Macrophage looking for Bacteria 1 st Ingredient: Bacterium performs a simple random walk and releases chemoattractant molecules. 2 nd Ingredient: Chemoattractant molecules diffuse C new (i,j) = 0.6*C old (i,j) + 0.1*(C old (i+1,j)+C old (i-1,j)+C old (I,j+1)+C old (i,j-1)) 3 rd Ingredient: Macrophage performs a random walk based on chemoattractant molecules and kills bacteria as they are reached. Matlab code: Phagocytosis.m ¼ +gY ¼ +gX ¼ -gY ¼ -gX ¼ ¼ ¼ ¼

The End