Chapter 1 - The Bayesics: Exercise solutions
Click on the arrow to see a solution.
Exercise 1.1
A university uses an automatic tool to detect plagiarism in student essays. The tool has a sensitivity of 0.95 (probability of flagging plagarism when the essay is plagiarized) and a specificity of 0.90 (probability of not flagging plagarism when the essay is not plagiarized). Assume that 1% of all students actually plagiarize. If a student is flagged by the tool, what is the probability that the student actually has plagiarized?
Exercise 1.2
Think about an event that you are uncertain about, for example the event that you favorite sports team wins their next game. Try to elicit your subjective probability for the event by considering a betting situation where you win $100 if the event occurs. Start with a price of $1 and ask yourself if you would be willing to take the bet. Then gradually increase the price of the bet until you are indifferent between taking the bet or not.
Exercise 1.3
Think about a political party that you care about. Elicit a histogram to represent your prior distribution for the party’s support in percent, \(0\leq \theta \leq 100\), in the next national election, by asking yourself questions about the probability of certain intervals. For example, what is the probability that the party’s support is below 10%? Between 10% and 20%? And so on. Make sure that the final histogram integrates to one over the full support, and plot it.
Exercise 1.4
Reproduce the first row of Figure by writing your own code in your favorite programming language.