# See: Could American Evangelicals Spot the Antichrist? Here Are the Biblical Predictions:
# https://www.benjaminlcorey.com/could-american-evangelicals-spot-the-antichrist-heres-the-biblical-predictions/
#
# Bayesian Analysis for All Prophesies
# -------------------------------------
# This script assumes that each prophecy provides independent evidence.
# For each prophecy, we define:
#   - P_H: Probability of observing this evidence if Trump is the Antichrist.
#   - P_notH: Probability of observing this evidence if Trump is NOT the Antichrist.
#
# The likelihood ratio for each piece of evidence is LR = P_H / P_notH.
# We assume a prior probability P(H) = 0.01 (1% chance) that Trump is the Antichrist.
# Then, the posterior odds are given by:
#   posterior_odds = (P(H)/(1-P(H))) * (Product over all evidence of LR)
# And the final posterior probability is:
#   P(H|E) = posterior_odds / (1 + posterior_odds)
#
# The following evidence items come from the Benjamin Corey article:
# 1. Military Superpower: The leader comes from a nation that is a military superpower.
# 2. Obsessed with Winning: The leader is characterized by an obsession with winning.
# 3. Boastful Speeches: He gives speeches with “great” then even “greater” claims (e.g. MAGA style).
# 4. Widespread Deception: He causes deceit to prosper.
# 5. Rewarding Loyalists: He rewards loyal followers with deals (e.g. real estate, positions).
# 6. Fatal Wound & Recovery: He suffers a fatal head wound and miraculously recovers.
# 7. Mark of the Beast: A visible “mark” (symbolically, MAGA hats on the forehead).
# 8. Conflict with a Southern Neighbor: He engages in a border conflict (e.g. with Mexico).
# 9. Raging at Reports: He rages at reports (from east/north) in a manner fitting the prophecy.
# 10. Religious Alliance: He is endorsed by prominent religious (false prophet–like) figures.
# 11. Global Dominance: He exhibits a drive toward global power and the ability to trample the earth.
#
# Note: These numbers are our subjective estimates; adjusting them will affect the final probability.

config = {
    "military_superpower": {"P_H": 0.9,  "P_notH": 0.5},      # US is a superpower; if AC, high chance; otherwise, typical leader ≠ global conqueror.
    "obsessed_with_winning": {"P_H": 0.95, "P_notH": 0.3},    # Trump’s “winning” persona fits well if he is AC.
    "boastful_speeches": {"P_H": 0.9, "P_notH": 0.4},         # Excessive boasts (great then greater) are more expected if AC.
    "widespread_deception": {"P_H": 0.9, "P_notH": 0.7},      # While many politicians lie, the extreme deceit is more AC-like.
    "rewarding_loyalists": {"P_H": 0.85, "P_notH": 0.3},      # Unusually lavish rewards for cronies fit the prophecy.
    "fatal_wound_recovery": {"P_H": 0.9, "P_notH": 0.005},    # A head wound with miraculous recovery is nearly unique to the AC scenario.
    "mark_of_beast": {"P_H": 0.6, "P_notH": 0.2},             # The widespread MAGA hat as a mark is unusual among non-AC leaders.
    "conflict_with_south": {"P_H": 0.8, "P_notH": 0.4},       # Border conflict with a “southern neighbor” is more extreme in the AC case.
    "raging_reports": {"P_H": 0.7, "P_notH": 0.3},            # The outbursts at news and reports are more expected if he’s the AC.
    "religious_alliance": {"P_H": 0.8, "P_notH": 0.3},        # Endorsement by prominent religious figures is a key AC marker.
    "global_dominance": {"P_H": 0.7, "P_notH": 0.3},          # An ambition to “trample the earth” is more likely for the AC.
}

# Set the prior probability that Trump is the Antichrist:
prior = 0.005
# Compute prior odds:
prior_odds = prior / (1 - prior)

likelihood_ratio_product = 1.0

print()
print("Prior Probability: {:.2%}".format(prior))
print("Prior Odds: {:.4f}".format(prior_odds))
print("--------------------------------")
print()

print("Individual Likelihood Ratios:")
for key, vals in config.items():
    P_H = vals["P_H"]
    P_notH = vals["P_notH"]
    LR = P_H / P_notH  # Likelihood Ratio for this prophecy
    likelihood_ratio_product *= LR
    print(f"  {key}: LR = {LR:.3f}")

print("\nTotal Likelihood Ratio Product:", likelihood_ratio_product)

# Compute posterior odds:
posterior_odds = prior_odds * likelihood_ratio_product
# Convert odds to probability:
posterior_probability = posterior_odds / (1 + posterior_odds)

print("\nPrior Odds: {:.4f}".format(prior_odds))
print("Posterior Odds: {:.2f}".format(posterior_odds))
print("--------------------------------")
print()
print("Posterior Probability that Trump is the Antichrist: {:.2%}".format(posterior_probability))