1. Inference
There is a new diagnostic test for a disease that occurs in about 0.05% of the
population. The test is not perfect but will detect a person with the disease 99% of the time. It will, however, say that a person without the disease has the disease with about 3% of the time. A person is selected at random from the population and the test indicates that this person has the disease. What are the conditional probabilities that
(a) the person has the disease?
Copyright By PowCoder代写 加微信 powcoder
(b) the person does not have the disease?
2. Simulation
There is a sport being played. In order to win, your team must have 5 more points than the other team. You¡¯re both trying to score points at the same time, and on average 2 points are scored each minute. Your team wins 60% of points and the other team wins 40% of points.
You have a uniform random number generator, that produces numbers from 0 to 1
(a) What random process would be useful for simulating the difference in points?
(b) How would you simulate this with your random number generator?
(c) What random process would be useful for simulating when points are scored?
(d) How would you simulate this with your random number generator?
3. Markov chains
A Markov chain has the property that the current state only depends on the previous state. Suppose we use a Markov chain to model weather.
Let¡¯s assume each day the weather can take on one of three states: Rainy (R), Sunny (S) or Cloudy (C). The weather tomorrow depends only on the weather today.
Given the state transition probabilities are
(b) Suppose today¡¯s weather is rainy, what is the probability that it will stay rainy for the next 5 days?
(c) What is the expected length of time in the rainy state, given we started at a rainy state?
(d) What is the expected length of time in the sunny state, given we started at a sunny state?
Cloudy 0.4 0.3 0.3
0.2 0.6 0.2
0.1 0.1 0.8
(a) If today is sunny, what is the probability that the next 7 days will be (Sunny, Sunny, Rainy, Rainy, Sunny, Cloudy, Sunny)?
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com