Lecture 1 Bayesian inference and maximum likelihood. (Idż na całość). The law of dependent propability. T heorem of Bayes. Total probability. P(A|B1). P(A|B2). P(B1). P(B3). P(B2). (Idż na całość).
Bayesian inference and maximum likelihood
(Idż na całość)
The law of dependent propability
Theorem of Bayes
(Idż na całość)
Assume we choose gate 1 (G1) at the first choice. We are looking for the probability p(G1|M3) that the car is behind gate 1 if we know that the moderator opened gate 3 (M3).
We study the occurrence of the damselfly Calopteryx splendens at small rivers. We know from the literature that C. splendens occurs at about 10% of all rivers. Occurrence depends on water quality.
Suppose we have five quality classes that occur in 10% (class I), 15% (class II), 27% (class III), 43% (class IV), and 5% (class V) of all rivers. The probability to find Calopteryx in these five classes is 1% (class I), 7% (class II), 14% (class III), 31% (class IV), and 47% (class V).
To which class belongs probably a river if we find Calopteryx?
p(class II|A) = 0.051, p(class III|A) = 0.183, p(class IV|A) = 0.647, p(class V|A) = 0.114
Bayes and forensic
Let’s take a standard DNA test for identifying persons. The test has a precision of more than 99%.
What is the probability that we identify the wrong person?
False positive fallacy
Error of the prosecutor
The forensic version of Bayes theorem
The error of the advocate
In the process against the basketball star E. O. Simpson, one of his advocates (a Harvard professor) argued that Simpson sometimes has beaten his wife. However, only very few man who beat their wives later murder them (about 0.1%).
Assume a hawk searches a terrain for prey
Let p(suc) be the probability to find a prey. Assume he spots a number of pixel at a time that can be model by squares. Hence he surveys a grid. Of course he knows where to search. That means he knows a priori probabilities for each square of the virtual grid (p(prey). However there is another probability for each square, the probability p(suc|prey) to find the prey. Our hawk will now systematically modify his a priori probabilities p(prey) depending on his successive failures and search where he assumes the highest probability of success.
Foto: Peter Schild
Now let AT be the total area of search and AE the empty part without prey. k denotes the number of successful hunts within the part of the area with prey. Hence p(suc|prey) = k / (AT-AE)
Gains and costs
Assume a parasitic wasps that attacks clutches of aphids.
These clutches are of different quality (size, exposition).
The wasp visits one clutch after another.
However, because it has of course competitors it has to choose after a certain time.
How long should the wasp search to make the best choice that means to attack the best clutch in the given situation?
Foto: R. Long
We define gain and cost functions and apply the odds strategy
Stop when the sum of the odds > 1
The wasp should attack that clutch (at position r) that is better than the best of the previous r-1. The probability that the second best clutch is within the first r trials is p2 = r/(a-1) where a is the position of the best clutch
For our clutch example r = 7.358.
This called the 1/e-stopping rule
Suppose you studied 50 patients in a clinical trial and detected at 30 of them the presence of a certain bacterial disease.
What is the most probable frequency of this disease in the population?
log likelihood estimator ln(Lp)