Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| API_KEYS = { | |
| 'infura': "YOUR_INFURA_KEY", | |
| 'thegraph': "YOUR_THEGRAPH_KEY", | |
| 'etherscan': "YOUR_ETHERSCAN_KEY", | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| from scipy.stats import beta as beta_dist | |
| def credible_interval(t, f, prob=.5, prior='uniform'): | |
| """Calculates posterior credible interval for a beta-binomial model with prior `Beta(a, b)` after `t` successes in `t+f` trials. | |
| @param t: Number of successes. |
OlderNewer