Professional Documents
Culture Documents
examples
the probability my flight to Chicago will be on time
the probability this ticket will win the lottery
the probability it will rain tomorrow
examples
flight to Chicago: {on time, late, cancelled, accident}
weather tomorrow:
{rain, not rain} or
{sun, rain, snow} or
{sun, clouds, rain, snow, sleet} or…
Random Variables
random variable: a variable representing the outcome of an
experiment
example
X represents the outcome of my flight to Chicago
Pr(x) 1 0.2
x 0.1
Joint Distributions
joint probability distribution of two RVs: the function given
by Pr(X = x, Y = y)
read “X equals x and Y equals y”
example
x, y Pr(X = x, Y = y)
sunny, on-time probability that it’s sunny
0.20
and my flight is on time
rain, on-time 0.20
snow, on-time 0.05
sunny, late 0.10
rain, late 0.30
snow, late 0.15
Marginal Distributions
the marginal distribution of X is defined by
Pr( x) Pr( x, y)
y
x, y Pr(X = x, Y = y) x Pr(X = x)
sunny, on-time 0.20 sunny 0.3
rain, on-time 0.20 rain 0.5
snow, on-time 0.05 snow 0.2
sunny, late 0.10
rain, late 0.30
snow, late 0.15
Joint/Marginal Distributions
Two variable case
Ref: https://en.wikipedia.org/wiki/Marginal_distribution
Conditional Distributions
the conditional distribution of X given Y is defined as:
Pr( X x, Y y)
Pr( X x | Y y)
P(Y y)
x, y Pr(X = x, Y = y) x Pr(X = x)
sunny, on-time 0.20 sunny 0.3
rain, on-time 0.20 rain 0.5
snow, on-time 0.05 snow 0.2
sunny, late 0.10
y Pr(Y = y)
rain, late 0.30 on-time 0.45
snow, late 0.15 late 0.55
x, y Pr(X = x, Y = y) x Pr(X = x)
sunny, fly-United 0.27 sunny 0.3
rain, fly-United 0.45 rain 0.5
snow, fly-United 0.18 snow 0.2
sunny, fly-Northwest 0.03
y Pr(Y = y)
rain, fly-Northwest 0.05 fly-United 0.9
snow, fly-Northwest 0.02 fly-Northwest 0.1
• alternatively
Pr(x, y | z) Pr(x | z) Pr( y | z) for all x, y, z
Conditional Independence Example
Flu Fever Vomit Pr
true true true 0.04
true true false 0.04
true false true 0.01
true false false 0.01
false true true 0.009
false true false 0.081
false false true 0.081
false false false 0.729
Fever and Vomit are not independent: e.g. Pr( fever , vomit) Pr( fever ) Pr(vomit)
Fever and Vomit are conditionally independent given Flu:
Pr( fever , vomit | flu ) Pr( fever | flu ) Pr(vomit | flu )
Pr( fever , vomit | flu ) Pr( fever | flu ) Pr(vomit | flu )
etc.
Bayes Theorem
Pr( y | x) Pr( x) Pr( y | x) Pr( x)
Pr( x | y )
Pr( y ) Pr( y | x) Pr(x)
x
EX x Pr( x)
x
Egain ( Lottery )
gain ( winning ) Pr(winning ) gain (losing ) Pr(losing )
$100 0.001 $1 0.999
$0.899
Markov Models in Computational Biology
there are many cases in which we would like to represent the
statistical regularities of some class of sequences
genes
.38
A G
.16
.34
begin .12 transition probabilities
Pr( xi a | xi 1 g ) 0.16
Pr( xi c | xi 1 g ) 0.34
state
C T Pr( xi g | xi 1 g ) 0.38
Pr( xi t | xi 1 g ) 0.12
transition
Markov Chain Models
a Markov chain model (a triplicate) is defined by
a set of states
some states emit symbols
other states (e.g. the begin state) are silent
A G
begin
C T
A G
begin end
C T
Markov Chain Notation
the transition parameters can be denoted by
where
axi1xi Pr( xi | xi 1 )
Pr(D | )
i.e. make the data D look likely under the model
Maximum Likelihood Estimation
suppose we want to estimate the parameters Pr(a), Pr(c),
Pr(g), Pr(t)
and we’re given the sequences
accgcgctta
gcttagtgac
tagccgttac
then the maximum likelihood estimates are
6 7
Pr(a) 0.2 Pr( g ) 0.233
30 30
9 8
Pr(c) 0.3 Pr(t ) 0.267
30 30
Maximum Likelihood Estimation
suppose instead we saw the following sequences
gccgcgcttg
gcttggtggc
tggccgttgc
then the maximum likelihood estimates are
0 13
Pr(a) 0 Pr( g ) 0.433
30 30
9 8
Pr(c) 0.3 Pr(t ) 0.267
30 30
na pa m
Pr(a)
prior probability of a
ni m
i number of “virtual” instances
t ' st '
c
60,000 nucleotides
+ A C G T - A C G T
A .18 .27 .43 .12 A .30 .21 .28 .21
C .17 .37 .27 .19 C .32 .30 .08 .30
G .16 .34 .38 .12 G .25 .24 .30 .21
T .08 .36 .38 .18 T .18 .24 .29 .29
Markov Chains for Discrimination