Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We used pure math to apply Bayes Theorem to drug tests. Now write Python code to reproduce the results! This is purposefully open ended

We used pure math to apply Bayes Theorem to drug tests. Now write Python code to reproduce the results! This

We used pure math to apply Bayes Theorem to drug tests. Now write Python code to reproduce the results! This is purposefully open ended - you'll have to think about how you should represent probabilities and events. You can and should look things up. Specific goals/targets: 1) Write a function def_prob_drunk_given_positive(prob_drunk_prior, false_positive_rate): You should only truly need these two values in order to apply Bayes Theorem. In this example, imagine that individuals are taking a breathalyzer test with an 8% false positive rate, a 100% true positive rate, and that our prior belief about drunk driving in the population is 1/1000. What is the probability that a person is drunk after one positive breathalyzer test? What is the probability that a person is drunk after two positive breathalyzer tests? How many positive breathalyzer tests are needed in order to have a probability that's greater than 95% that a person is drunk beyond the legal limit?

Step by Step Solution

3.40 Rating (163 Votes )

There are 3 Steps involved in it

Step: 1

To apply Bayes Theorem to calculate the probability that a person is drunk given a positive breathal... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting Information Systems

Authors: George H. Bodnar, William S. Hopwood

11th Edition

0132871939, 978-0132871938

More Books

Students also viewed these Programming questions

Question

Total addressable market is calculated in: Group of answer choices

Answered: 1 week ago