1 / 21

Probability and Markov Models

Probability and Markov Models. Reading. Chapter 1 in the book. Chapter 3 pages 46-51. Definition: Random Process. A RANDOM PROCESS is something that has a “random” outcome: Roll a die, flip a coin, roll 2 dice Observe orthologous base pair in 2 seqs Measure an mRNA level Weigh a person.

oksana
Download Presentation

Probability and Markov Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Probability and Markov Models

  2. Reading • Chapter 1 in the book. • Chapter 3 pages 46-51.

  3. Definition: Random Process A RANDOM PROCESS is something that has a “random” outcome: • Roll a die, flip a coin, roll 2 dice • Observe orthologous base pair in 2 seqs • Measure an mRNA level • Weigh a person

  4. Definition: Experiment In probability theory, an EXPERIMENT is a single observation of a random process.

  5. Definition: Event An EVENT is a set of possible outcomes of an experiment. • An ELEMENTARY EVENT is whatever you decide it is. For example: • The outcome of 1 roll of a die • The outcomes of n rolls of a die • The residue at position 237 in a protein • The residues at position 237 in a family of proteins • The weight of a person • Elementary events must be non-overlapping!

  6. Compound Events A COMPOUND EVENT is a set of one or more elementary events. For example, you might define two compound events in a die-rolling experiment: E=“roll less than 3”, F=“roll greater than or equal to 3”. Then, E = {1, 2} and F = {3, 4, 5,6}.

  7. Defn: Sample Space The SAMPLE SPACE is the set of all ELEMENTARY EVENTS. • So the sample space is the “universe” of all possible outcomes of the experiment. • This is written: • Ω = { Ei} • For example, for rolls of a die, you might have: • Ω = {1, 2, 3, 4, 5, 6}

  8. Discrete vs. Continuous Events • The sample space might be INFINITE. For example, the weight of person can be any real number greater than 0. • Some events are DISCRETE: countable • Base pairs, residues, die rolls • Other events are CONTINUOUS: eg, real numbers • Weights, alignment scores, mRNA levels

  9. Ω Ω E E F F E U F E ∩ F The Axioms of Probability Let E and F be events. Then the axioms of probability are: • Pr(E) ≥ 0 • Pr(Ω) = 1 • Pr(E U F) = Pr(E) + Pr(F) if (E ∩ F) = empty set • Pr(E | F) Pr(F) = Pr (E ∩ F) Probability Is like “area” in Venn diagrams

  10. Notation Joint Probability: Pr(E,F) The probability of E and F Conditional probability: Pr(E | F) The probability of E given F

  11. Conditional Probability and Bayes’ Rule Conditional probability can be defined as: Pr(E | F) = Pr (E,F) / Pr(F) Bayes’ Rule can be used to reverse the roles of E and F: Pr(F | E) = Pr (E|F) Pr(F) / Pr(E)

  12. Sequence Models • Observed biological sequences (DNA, RNA, protein) can be thought of as the outcomes of random processes. • So, it makes sense to model sequences using probabilistic models. • You can think of a sequence model as a little machine that randomly generates sequences.

  13. A Simple Sequence Model • Imagine a tetrahedral (four-sided) die with the letters A, C, G and T on its sides. • You roll the die 100 times and write down the letters that come up (down, actually). • This is a simple random sequence model.

  14. Zero-order Markov Model • The four-sided die model is called a 0-order Markov model. • It can be drawn thus: p=1 Transition probability 0-order Markov Sequence model M qA qC qG qT Emission Probabilites

  15. p S 1 1-p E M qA qC qG qT Complete 0-order Markov Sequence model Complete 0-order Markov Model • To model the length of the sequences that the model can generate, we need to add “start” and “end” states.

  16. This Markov model can generateany DNA sequence. Associated with each sequence is a path and a probability. Start in state S: P = 1 Move to state M: P=1·P Print “x”: P = qX·P Move to state M: P=p·P or to state E: P=(1-p) ·P If in state M, go to 3. If in state E, stop. Sequence: GCAGCT Path: S, M, M, M, M, M, M, E P=1·qG·p·qC·p·qA·p·qG·p·qC·p·qT·(1-p) p S E M 1 1-p qA qC qG qT Generating a Sequence

  17. Using a 0-order Markov Model This model can generate any DNA sequence, so it can be used to model DNA. • We used it when we created scoring matrices for sequence alignment as the background model. • It’s a pretty dumb model, though. • DNA is not very well modeled by a 0-order Markov model because the probability of seeing, say, a “G” following a “C” is usually different than a “G” following an “A”, (e.g, in CpG islands.) • So we need a better models: higher order Markov models.

  18. This simple sequence model is called a 0-order Markovmodel because the probability distribution of the next letter to be generated doesn’t depend on any (zero) of the letters preceding it. The Markov Property: Let X = X1X2…XL be a sequence. In an n-order Markov sequence model, the probability distribution of the next letter depends on the previous n letters generated. 0-order: Pr(Xi|X1X2…Xi-1)=Pr(Xi) 1-order: Pr(Xi|X1X2…Xi-1)=Pr(Xi|Xi-1) n-order: Pr(Xi|X1X2…Xi-1)=Pr(Xi|Xi-1Xi-2…Xi-n) p S E M 1 1-p qA qC qG qT Markov Model “Order”

  19. Pr(G|G) Pr(C|C) Pr(A|A) Pr(T|T) Pr(T|A) G C A T Pr(A) Pr(T|G) S E Pr(C|A) Pr(G) Pr(C|G) A 1-order Markov Sequence Model In a first-order Markov sequence model, the probability of the next letter depends on what the previous letter generated was. We can model this by making a state for each letter. Each state always emits the letter it is labeled with. (Not all transitions are shown.)

  20. A 2-order Markov Model • To make a second order Markov sequence model, each state is labelled with two letters. It emits the second letter in its label. • There would have to be sixteen states: AA, AC, AG, AT, CA, CG, CT etc., plus four states for the first letter in the sequence: A, C, G, T • Each state would have transitions only to states whose first letter matched their second letter.

  21. Pr(A|AA) AA Part of a 2-order Model • Each state “remembers” what the previous letter emitted was in its label. Pr(T|AA) AT E Pr(G|AA) Pr(C|AA) AG AC

More Related