Skip to content

Instantly share code, notes, and snippets.

@michelkana
Last active June 30, 2021 16:01
Show Gist options
  • Save michelkana/475414846d37be684febaf3d995142ac to your computer and use it in GitHub Desktop.
Save michelkana/475414846d37be684febaf3d995142ac to your computer and use it in GitHub Desktop.
# count of stars in reviews
R_A = [10,6,10,27,109]
R_B = [57,33,29,45,246]
# maximum likelihood estimators
theta_A = R_A / np.sum(R_A)
theta_B = R_B / np.sum(R_B)
print("MLE for Product A: ", np.round(theta_A,3))
print("MLE for Product B: ", np.round(theta_B,3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment