[SOLVED] R network Bayesian MGTS7526 Assignment 2 Risk Modelling Assignment Sheet The total length of your assignment should not exceed eight (8) pages. 1. Horse Race (10 marks)

$25

File Name: R_network_Bayesian_MGTS7526_Assignment_2__Risk_Modelling_Assignment_Sheet_The_total_length_of_your_assignment_should_not_exceed_eight_(8)_pages._1._Horse_Race_(10_marks).zip
File Size: 1591.98 KB

5/5 - (1 vote)

MGTS7526 Assignment 2 Risk Modelling Assignment Sheet The total length of your assignment should not exceed eight (8) pages. 1. Horse Race (10 marks)
Lets assume that there is a race between two horses: Fleetfoot and Dogmeat, and you want to determine which horse to bet on. Fleetfoot and Dogmeat have raced against each other on twelve previous occasions, all two-horse races. Of these last twelve races, Dogmeat won five and Fleetfoot won the other seven. Therefore, all other things being equal, the probability of Dogmeat winning the next race can be estimated as 5/12 or 0.417 or 41.7%. However, on three of Dogmeats previous five wins, it had rained before the race. It had rained only once on any of the days that he lost. On the day of the race in question, it is raining.
Construct a Bayesian network to show the probability of Dogmeat winning the race. Explain your Bayesian network and how you obtained your answer.
2. Meat Test (10 marks)
Minced meat purchased in the supermarket may be infected with bacteria. On average, infection occurs once in 600 packages of meat. A test with a positive or negative result can be used to test for infection. If the meat is clean, the test result will be negative in 499 out of 500 cases, and if the meat is infected, the test result will be positive in 499 out of 500 cases.
Construct a Bayesian Network to show the probability of a package of meat being infected given a positive test result. Explain your Bayesian network and how you obtained your answer.
3. Flower Breeding (20 marks)
You are a flower breeder. The plant you are breeding can either have red flowers or white flowers. You know that the colour of a flower depends on the genotype of the plant. The gene for red flowers (represented by R) is a dominant gene and the gene for white flowers (represented by r) in a recessive gene. Therefore, a plant with the genotype RR or Rr has red flowers, while a plant with the genotype rr has white flowers. Hence, the colour of a plants flowers is influenced by its genotype (as shown in Figure 1) and the probability of a plant having red or white flowers, given its genotype, is shown in Table 1.
Plant_1_Genotype
RR 33.3 Rr 33.3 rr 33.3
Plant_1_Flower_Colour
Red 50.0 White 50.0
Figure 1: Diagram showing that a plants genotype influences the colour of its flowers.
1

Table1: Probability of a plant having red or white flowers given its genotype.
When breeding flowers you know that the genotype (and therefore flower colour) of an offspring is influenced by the genotype of its parents (as shown in Figure 2).
Genotype
Probability of flower colour (%)
Red
White
RR
100
0
Rr
100
0
rr
0
100
Plant_1_Genotype
RR 33.3 Rr 33.3 rr 33.3
Plant_2_Genotype
RR 33.3 Rr 33.3 rr 33.3
O f f sp r i n g _ G e n o t y p e
RR 33.3 Rr 33.3 rr 33.3
Figure 2: Diagram showing that the genotype of an offspring is influenced by the genotype of its parents.
You also know that the following parent crosses are possible:
If two plants of genotype RR are mated, then the offspring will always be RR.
If two plants of genotype rr are mated, then the offspring will always be rr.
If a plant of genotype RR is mated with a plant of genotype Rr, then the
offspring will always get an R from one parent and may get an R or an r from
the other parent, which means it could be of genotype RR or Rr.
If a plant of genotype RR is mated with a plant of genotype rr, then the offspring will always get an R from one parent and will always get an r from
the other parent, which means it will always be of genotype Rr.
If a plant of genotype Rr is mated with a plant of genotype Rr, then the offspring may get an R or r from one parent and an R or r from the other
parent, which means it could be of genotype RR, Rr or rr.
If a plant of genotype Rr is mated with a plant of genotype rr, then the
offspring may get an R or r from one parent and will always get an r from the other parent, which means it could be of genotype Rr or rr.
For the above crosses, the probability of offspring being a particular genotype is given in Table 2.
2

Table 2: Probability of offspring genotypes given the genotypes of the parents
Parent Genotypes
Probability of Offspring Genotype (%)
RR
Rr
rr
100
0
0
0
0
100
50
50
0
0
100
0
25
50
25
0
50
50
Parent 1 RR
rr
RR RR Rr Rr
Parent 2 RR
rr
Rr rr Rr rr
Finally, for plants with unknown parent genotypes, you know that the probability of them being genotype Rr is 50%, while the probability of them being of genotype RR or rr is 25%.
Now suppose you have two plants. The genotypes of their parents are unknown; however the flowers of both plants are red. You mate these two plants to produce a first generation offspring. This offspring is then mated with a third plant, with white flowers, to produce a second generation offspring.
Construct a Bayesian Network and use it to determine the probability that the second generation offspring will have red flowers? Explain your Bayesian network and how you obtained your answer.
4. Horse Stud (20 marks)
You are the manager of a horse stud. A colt called John has been found to suffer from a life-threatening hereditary disease caused by a recessive gene. The disease is so serious that Johns parents, Henry and Irene, are taken out of the stud-breeding program. However, you still need to decide which of the remaining horses in the stud are likely to carry the disease-causing gene and therefore should be removed from the breeding program. You look through the stud records to retrace Johns family tree (Table 1).
Table 1: Johns family tree.
Mare
Stallion
Foal
Irene
Henry
John
Dorothy
Fred
Henry
Gwenn
Eric
Irene
Jill
Jack
Fred
Jill
Brian
Dorothy
Cecily
Brian
Eric
Cecily
Mike
Gwenn
You know that in order to have the disease, a horse must carry a double-recessive gene (aa). John is the only horse in the stud that has the disease so he can be the only horse of the genotype aa. Therefore, the remaining horses in the breeding program can either be carriers of the disease causing gene (aA) or pure (AA). You do some further research and find the probabilities of a foal being diseased (aa), a carrier (aA) or pure (AA), given the genotype of the father and mother (Table 2).
3

Table 2: Probability of a foal being diseased given the genotype of the father and mother.
We know that John is the only horse with the genotype aa, so for the other horses in the stud we can remove the probability of them being diseased (aa) and normalise the remaining probabilities so that they add to 100%. Hence, for the other horses in the stud, the probability of them being a carrier (aA) or pure (AA) given the genotype of the father and mother is shown in Table 3.
Table 3: Probability of a foal being a carrier or pure given the genotype of the father and mother.
For the horses without a recorded father or mother, we know that the frequency of occurrence of the recessive gene is 1 in every 100 horses.
Construct a Bayesian Network to help you determine which horses in the stud are most likely to be carriers of the disease-causing gene and should be culled from the breeding program. You have one further piece of information to assist your decision Fred has previously been tested for the disease-causing gene and he is not a carrier (he is pure). Which horse(s) will you cull from the breeding program? Explain your Bayesian network and how you obtained your answer.
Foal
Father Mother
aa
aA
AA
aA aA
25%
50%
25%
aA AA
0%
50%
50%
AA aA
0%
50%
50%
AA AA
0%
0%
100%
Foal
Father Mother
aA
AA
aA aA
67%
33%
aA AA
50%
50%
AA aA
50%
50%
AA AA
0%
100%
4

5. Who is Guilty? (30 Marks)
Judge Bolowski is presiding over a case where a house has been burgled. At the crime scene, it was found that a window had been broken and the fingerprints of a local (Rik) were found on this window. The items stolen from the burgled property were then found at the home of another local (Mike).
Both Rik and Mike protested their innocence and both have produced alibis.
Rik explained the presence of his fingerprints on the broken window as being the result of an incident that happened three days prior to the burglary. Rik and his friend (Vyvyan) were walking home from a restaurant when he thought he heard someone yell his name out from this property. Rik said that he responded to this by climbing on the same window that was now broken. Vyvyan says that he will testify that this true. However, the windows to the burgled property, including the window that was broken in the burglary, were reportedly cleaned just prior to the burglary taking place, which would have almost certainly removed any earlier fingerprints.
Mike said that he had no idea how the items from the burglary had turned up in his home as he had been away for the last two days camping in the forest with his friend (Neil) and that he had only just returned home. Neil says that he will testify that this is true.
Finally, an earlier conviction supposedly showed that Rik and Mike had worked together in the past, which led to the conviction of Rik as an accessory to robbery. This suggests that Rik and Mike work as a team.
Guilty Hypotheses
Based on this information Judge Bolowski determines that there are three distinct causal pathways:
Alibis
The Judge considers that the testimony of the alibis for Rik (Vyvyan) and Mike (Neil) be considered in determining which of these three guilty hypotheses is most likely. The Judge, however, is uncertain about the likelihood of the two events (Mike camping, Rik climbing on window 3 days earlier) occurring and the validity (accuracy) of the evidence provided by the alibis (Vyvyan and Neil). The Judge therefore applies the following priors:
P(Mike went camping = TRUE) = 50%
P(Rik climbed onto the window 2 days before the robbery = TRUE) = 50%
P(Accuracy of Vyvyans evidence = HIGH [i.e. high quality]) = 50%
P(Accuracy of Neils evidence = HIGH [i.e. high quality]) = 50%
1. Rik is guilty of the burglary and worked alone
2. Mike is guilty of the burglary and worked alone
3. Rik and Mike are guilty of the burglary and worked together
5

Judge Bolowski also reasoned that the following conditional probabilities existed for the alibis:
Mike went camping
Accuracy of Neils evidence
Testimony that Mike went camping
True
False
True
High
90
10
True
Low
35
65
False
High
35
65
False
Low
5
95
Rik climbed onto the window
Accuracy of Vyvyans evidence
Testimony that Rik climbed window
True
False
True
High
90
10
True
Low
60
40
False
High
5
95
False
Low
30
70
Other evidence
The Judge sees the reported presence of Riks fingerprints on the broken window as important evidence. The Judge also believes that the accuracy of the finger print evidence and the evidence provided by the window cleaning company also be considered. The following priors to the accuracy of the fingerprint testing and evidence given that the window was cleaned just before the burglary:
P(Accuracy of fingerprinting = HIGH) = 95%
P(Accuracy of evidence of window cleaner = HIGH) = 80%
P(Window was cleaned = TRUE) = 95%
Judge Bolowski reasoned that the following conditional probabilities existed for the evidence:
Window was cleaned
Accuracy of evidence of window cleaner
Testimony that the window was cleaned
True
False
True
High
95
5
True
Low
50
50
False
High
5
95
False
Low
50
50
Fingerprints on window
Accuracy of fingerprinting
Fingerprints match Riks
True
False
True
High
95
5
True
Low
50
50
False
High
5
95
False
Low
50
50
Judge Bolowski also considers the following probabilities:
P(Mike broke the window = TRUE | Mike is the burglar = YES) = 50%
P(Mike broke the window = TRUE | Mike is the burglar = NO) = 50%
P(Rik is the burgler = YES) = 50%
P(Rik & Mike are the burglers = TRUE | Testimony that Mike went camping =
TRUE) = 5%
P(Rik & Mike are the burglers = TRUE | Testimony that Mike went camping =
FALSE) = 95%
6

P(Mike is the burglar = TRUE | Testimony that Mike went camping = TRUE) = 5%
P(Mike is the burglar = TRUE | Testimony that Mike went camping = FALSE) = 95%
P(Rik broke the window = TRUE) is 100% if Rik and/or Rik and Mike are guilty. Otherwise the probability for this child node = 0% (i.e. it is a deterministic node).
P(Riks fingerprints are on the window = TRUE) is 100% if Rik broke the window is True, or if the Testimony that Rik climbed window is True AND the Testimony that the window was cleaned is False. Otherwise the probability for this child node is 0% (i.e. deterministic node).
Construct a Bayesian network that Judge Bolowski can use to determine which of the three guilty hypotheses is more likely. Note that the basic structure for this BN is shown below. However, this structure is incomplete there are several nodes that need to be added to make sure that the BN functions correctly for the Judge (hint: refer back to the idioms of Module 5). Use only two states for each node.
From your BN, specify the probabilities that each of the three hypotheses is True. Explain your Bayesian Network, including the additions that you made to the basic structure, and how you obtained your answer.
Update your BN based on the assumption that Neils testimony that Mike went camping is 100% False, Vyvyans testimony that Rik climbed on the window is 100% True and that the accuracy of the finger print process is 100% Low. Specify the updated probabilities that each of the three guilty hypotheses is True. Explain where in your BN you entered your evidence and how you obtained your answer.
Figure 3: Diagram showing the basic structure for the Who is guilty? Bayesian Network. Note that all nodes should have two states. Also note that the network is incomplete, requiring several nodes to be added so that it functions correctly.
7

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] R network Bayesian MGTS7526 Assignment 2 Risk Modelling Assignment Sheet The total length of your assignment should not exceed eight (8) pages. 1. Horse Race (10 marks)
$25