Question: 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

 1) Write a function def prob_drunk_given_positive(prob_drunk_prior, false_positive_rate): You should only truly

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? 2) Explore scipy.stats.bayes_mvs Read its documentation, and experiment with it on data you've tested in other ways earlier this week. Create a visualization comparing the results of a Bayesian approach to a traditional/frequentist approach. (with a large sample size they should look close to identical, however, take this opportunity to practice visualizing condfidence intervals in general. The following are some potential ways that you could visualize confidence intervals on your graph: o Matplotlib Error Bars Seaborn barplot with error bars o Vertical ines to show bounds of confidence interval o Confidence Intervals on Box Plots 3) In your own words, summarize the difference between Bayesian and Frequentist statistics

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!