Skip to content

Instantly share code, notes, and snippets.

@elijahbenizzy
Created July 14, 2024 23:39
Show Gist options
  • Save elijahbenizzy/7ce716ceb2632fb2ecb991b92e85cf0e to your computer and use it in GitHub Desktop.
Save elijahbenizzy/7ce716ceb2632fb2ecb991b92e85cf0e to your computer and use it in GitHub Desktop.
def full_cdf(
full_pdf: pd.Series
) -> pd.Series:
return full_pdf.cumsum()
def probability_on_date(full_pdf: pd.Series, possible_dates: pd.Series) -> pd.Series:
return full_pdf[possible_dates]
def probability_before_date(full_cdf: pd.Series, possible_dates: pd.Series) -> pd.Series:
return full_cdf[possible_dates]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment