Grid approximation without prior knowledge
According to the experiment's outcomes, out of 10 sick patients treated with the drug, 9 have been cured. What can you say about the drug's efficacy rate based on such a small sample? Assume you have no prior knowledge whatsoever regarding how good the drug is.
A DataFrame df
with all possible combinations of the number of patients cured and the efficacy rate which you created in the previous exercise is available in the workspace.
uniform
and binom
have been imported for you from scipy.stats
. Also, pandas
and seaborn
are imported as pd
and sns
, respectively.
This exercise is part of the course
Bayesian Data Analysis in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Calculate the prior efficacy rate and the likelihood
df["prior"] = ____(____)
df["likelihood"] = ____(____, 10, ____)