update numbers
This commit is contained in:
@@ -16,10 +16,10 @@ def p_meet_positive_bayes(groupsize:int):
|
|||||||
'''
|
'''
|
||||||
Bayesian approach
|
Bayesian approach
|
||||||
'''
|
'''
|
||||||
n_positive_tests = 1073.754 # number of positive tests in the last 14 days
|
n_positive_tests = 1863.6 # number of positive tests in the last 14 days
|
||||||
n_tests = 6316.2 # total number of 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
|
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_positive_test = n_positive_tests / n_tests
|
||||||
p_test = n_tests / n_population
|
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.title("probability of meeting a covid positive in groupsize of n")
|
||||||
plt.xlabel("group size / n")
|
plt.xlabel("group size / n")
|
||||||
plt.ylabel("probability")
|
plt.ylabel("probability")
|
||||||
|
plt.grid(linestyle='--', linewidth='0.1')
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
data = []
|
data = []
|
||||||
for i in range(1, 300):
|
for i in range(1, 70):
|
||||||
data.append(p_meet_positive_bayes(i))
|
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)}%')
|
print(f'The chance of meeting a positive in a group of {i} is: {p_meet_positive_bayes(i)}%')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user