top of page

STAT3405: Introduction to Bayesian Computing and Statistics STAT4066: Bayesian Computing and Statistics

For solutions, purchase a LIVE CHAT plan or contact us

11:59pm on Tuesday, 16 August 2022.

Task 1: Assume you meet 30 people during a day. Each person has a disease called conditioni-
tis with probability 0.0001, and whether any one person has the disease is independent of any
of the others having the disease. Assume further that with probability 0.5 you become infected
with this disease whenever you come in contact with a person who has the disease.
Using a simulation study, or otherwise, answer the following questions:
1. What is the probability that you become infected with the disease on any one particular
day?
2. Assuming all your days follow this pattern, and that whether you become infected on any
one day is independent of what happens on other days, what is the probability that you
will contract conditionitis at least once over a period of 365 days (i.e. a year)?
Task 2: Consider the following network of roads and assume you have to travel each morning
from A to B. On the tra?c report, you hear the current travel times (in hours) between the
various nodes so that you can pick each morning the fastest route.
A
X
Y
B
By collecting data diligently over a period of times, you realise that the travel time from
• A to X is exponentially distributed with rate parameter ? AX = 4,
• A to Y is exponentially distributed with rate parameter ? AY = 2.5,
• X to Y is always the same as that from Y to X, and it is exponentially distributed with
rate parameter ? XY = 10,
• X to B is exponentially distributed with rate parameter ? XB = 3; and
• Y to B is exponentially distributed with rate parameter ? YB = 5.
Assuming you are taking on every day the fastest route. Using a simulation study, or otherwise,
answer the following questions:
1. What is your average travel time in the morning?
2. With which probability is each of the four possible routes from A to B taken?
3. What is the probability that you have to travel more than half an hour?
Hint: In BUGS, you can use the dexp command to sample random variates from an exponential
distribution with a given rate; they call the parameter lambda (?) in their documentation.
In Stan, you can use the exponential rng command to sample random variates from an expo-
nential distribution with a given rate; they call the parameter beta (?) in their documentation.

For solutions, purchase a LIVE CHAT plan or contact us

Limited time offer:

Follow us on Instagram and tag 10 friends for a $50 voucher! No minimum purchase required.

bottom of page