From 154b193da9f7301d8e199eab14882b71bccf70cc Mon Sep 17 00:00:00 2001 From: aaron Date: Tue, 30 Nov 2021 14:01:33 +0100 Subject: [PATCH] update numbers --- covidrisk.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/covidrisk.py b/covidrisk.py index d9e8390..c553ff1 100644 --- a/covidrisk.py +++ b/covidrisk.py @@ -16,10 +16,10 @@ def p_meet_positive_bayes(groupsize:int): ''' Bayesian approach ''' - n_positive_tests = 1073.754 # number of positive tests in the last 14 days - n_tests = 6316.2 # total number of tests in the last 14 days + n_positive_tests = 1863.6 # number of positive tests in the last 14 days + n_tests = 7366.1 # total number of tests in the last 14 days n_population = 100000 # sample size -> per 100k for switzerland - p_test_positive = 0.2 # probability of a positive person getting tested (0.5 is optimistic...) + p_test_positive = 0.3 # probability of a positive person getting tested (0.5 is optimistic...) p_positive_test = n_positive_tests / n_tests p_test = n_tests / n_population @@ -32,10 +32,11 @@ def plot_data(data): plt.title("probability of meeting a covid positive in groupsize of n") plt.xlabel("group size / n") plt.ylabel("probability") + plt.grid(linestyle='--', linewidth='0.1') plt.show() data = [] -for i in range(1, 300): +for i in range(1, 70): data.append(p_meet_positive_bayes(i)) print(f'The chance of meeting a positive in a group of {i} is: {p_meet_positive_bayes(i)}%')