<jupyter_start><jupyter_text>Introduction to Probability Mini-Lab: Basic Probability, Bayes' Rule, Decision Making Welcome to your next mini-lab! Go ahead an run the following cell to get started. You can do that by clicking on the cell and then clickcing `Run` on the top bar. You can also just press `Shift` + `Enter` to run the cell.<jupyter_code>import otter

grader = otter.Notebook("m5_l1_tests")<jupyter_output><empty_output><jupyter_text>As you've just learned, probability is a very powerful tool that all data scientists use in decision making. For this lab, we'll be looking at data presented by the [COVID Tracking Project](https://covidtracking.com/) and look at test numbers and test results from the United States on the date April 26th, 2020.According to this project, the total number of tests performed is 5,401,784 with 960,131 of those tests indicating a positive result for COVID-19. Now say let's say that an individual took a COVID-19 test in the United States at this time, assign `prob_positive` to the probability that a person will test positive for COVID-19. Don't overthink this just yet, the answer is as simple as you think!<jupyter_code>prob_positive = ...
prob_positive
grader.check("q1")<jupyter_output><empty_output><jupyter_text>Given this positive result, would you trust the test given to you and believe that this individual actually has COVID-19? Before you answer that question, know thatno test is 100% perfect or reliable. Every test has a *false positive* and *false negative* rate. A false positive means that the test says that a person has a disease when in reality they don't. Similarly, a false negative means that the test says that a person does not have a disease when in reality they do. COVID-19 false negative and false positve rates fluctuate between the test and news source, therefore, _we will not be using actual data for these values._ We'll instead be using fictitious data from a far off university called the University of Cubeifornia, Blockeley. Blockeley Univeristy (as the students call it) is located in Blockeley, Cubeifornia. With that said, let's assume that COVID-19 tests developed at Blockeley are very good and have a 5% false positive rate. Let's also assume that the test has a 10% false negative rate. Now given these numbers, let's say again that an individual takes a COVID-19 test. Assign `prob_negative` to the probability that a person actually does _not_ have COVID-19 _after receiving a negative test result_.<jupyter_code>prob_negative = ...
prob_negative
grader.check("q2")<jupyter_output><empty_output><jupyter_text>Given the false negative and false positive rates above, what is the probability that a person _actually_ has COVID-19 after taking a test, no matter what the result is? Assign `prob_actual` to this probability.<jupyter_code>prob_actual = ...
prob_actual
grader.check("q3")<jupyter_output><empty_output><jupyter_text>It's increasingly important to learn the ins and outs of how data is collected and used, especially in the real world. Not everything is simple and even something like disease testing can have an dash of complexity mixed in. With that said, congratulations on finishing! Run the next cell to make sure that you passed all of the test cases.<jupyter_code>grader.check_all()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0550707192296118, 'fraction_numerical': 0.014444778814324405, 'mean_word_length': 5.2481203007518795, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '70522', 'license': 'MIT', 'n_tokens_mistral': 909, 'n_tokens_neox': 854, 'n_words': 472, 'path': 'minilabs/introduction-to-probability/probability_minilab.ipynb', 'repo_name': 'ebaccay/inferentialthinking', 'size': '3323'}