Skip to content

Instantly share code, notes, and snippets.

@DiogoRibeiro7
Created September 28, 2023 22:17
Show Gist options
  • Save DiogoRibeiro7/2311c8d90f18d3516eb5ef107842bb51 to your computer and use it in GitHub Desktop.
Save DiogoRibeiro7/2311c8d90f18d3516eb5ef107842bb51 to your computer and use it in GitHub Desktop.
def expected_utility_logarithmic(simulations, a=1):
utilities = a * np.log(simulations)
return np.mean(utilities)
# Evaluate the expected utility of the simulations
expected_utility = expected_utility_logarithmic(simulations)
print(f'Expected Utility: {expected_utility}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment