


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Homework 3 (20pts) Name_________________________________________ Due Mon Oct 6 by 5 pm (please bring to class or deliver to MBB 106)
Objectives:
Notes: You may work together on these problems, but each student must submit answers in his/her own words. It's always best to show all of your calculations & intermediate steps.
Introduction: We learned about hidden Markov models in class, but it’s difficult to really understand how they work until you have some practice working with them. This homework will give you practice calculating probabilities from an HMM.
The system has 3 states: B denotes the start state In denotes the state when we are in a CpG island Out denotes the state when we are outside of a CpG island
The transition probabilities between these states are shown in the diagram.
The emission probabilities are:
eOut(A) = eOut(C) = eOut(G) = eOut(T) = 0. for state In, eIn(A) = eIn(T) = 0. eIn(C) = eIn(G) = 0.
a) (5 pts) Calculate the probability:
What is the probability of the sequence (A, C, G) given that we are in a CpG island for all three nucleotides?
P(ACG|InInIn) = P(A|In) * P(In -> In) * P(C|In) * P(In -> In) * P(G|In) = 0.1 * 0.4 * 0.4 * 0.4 * 0. = 0.
I didn’t specify starting in the Begin state or not, so this answer is also acceptable:
P(ACG|BInInIn) = P(B -> In) * P(ACG|InInIn) = 0.5 * 0.00256 = 0.
What is the probability of the sequence (A, C, G) given that we are outside of a CpG island for all three nucleotides?
P(ACG|OutOutOut) = P(A|Out) * P(Out -> Out) * P(C|Out) * P(Out -> Out) * P(G|Out) = 0.25 * 0.8 * 0.25 * 0.8 * 0. = 0.
OR:
0.01 * P(B -> Out) = 0.01 * 0.5 = 0.
c) (5 pts) Finding the total probability of an observed sequence:
What is the total probability of the sequence (A, C, G)? Show your work.
A C G
In 0 =0.5 * 0.1 = 0.
=0.4 * sum {0.4 * 0. 0.2 * 0.125} = 0.
=0.4 * sum {0.4 * 0. 0.2 * 0.0325} = 0.
Out 0 = 0.5 * 0. = 0.
=0.25 * sum {0.6 * 0. 0.8 * 0.125} = 0.
=0.25 * sum {0.6 * 0. 0.8 * 0.0325} = 0.
The total probability is 0.00548 + 0.0092 = 0.01468.