IS2000 Homework 2
New Due Date: October 10
Joint probability table for use in problems 1-6.
p(x=1,y=1) = 0.1 p(x=1,y=2) = 0.2 p(x=1,y=3) = 0.3
p(x=2,y=1) = 0.1 p(x=2,y=2) = 0.1 p(x=2,y=3) = 0.2
1. Compute p(x=1) and p(x=2). Compute E[x].
2. Compute p(y=1), p(y=2), and p(y=3). Compute E[y].
3. Compute p(x|y) for all values of x and y (6 probabilities in all).
4. Compute p(y|x) for all values of x and y (6 probabilities in all).
5. Compute E[x+y] and compare with E[x] + E[y].
6. Compute E[xy] and compare with E[x]E[y].
7. Compute the logarithm of 10 in base 2, base 4, and base 10.
8. Generate codes for 4 symbols (a, b, c, and d) with the following
lengths and robustness to error:
- A 3-bit code that can detect single errors.
- A 10-bit code that can correct double errors.
9. Given the probabilities p(a)=0.7, and p(b)=p(c)=p(d)=0.1, find an
efficient code and compute its average length.
10. Suppose the overall probability of an individual having disease A
is 0.0002, and there is a test for the disease with sensitivity 0.99, and
specificity 0.98.
- What is the probability that a person with a positive
test result actually has A?
- How would this change for a patient with the same test result who
belongs to a high-risk population of which 10% have the disease?