NaClhv

Theology, philosophy, math, science, and random other things
                                                                                                                                                                                                                                                                  

Bayesian evaluation for the likelihood of Christ's resurrection (Part 43)

This is another Jupyter notebook. It contains python code that generates the probabilities of a "skeptic's distribution" generating a Jesus-level resurrection report.

First, we import some modules:

In [1]:
import numpy as np
import pandas as pd
from scipy.stats import lognorm, genpareto

We then write a function to simulate getting the maximum value out of n samples from a given distribution:

In [2]:
def max_out_of_n_from_dist(dist, out_of_n=1e9):
    manageable_n = 100000
    if out_of_n <= manageable_n:
        return dist.rvs(out_of_n).max()
    else:
        top_percentiles = \
            np.random.rand(manageable_n) * manageable_n / out_of_n
        return dist.isf(top_percentiles.min())

We then write a function to calculate the "skeptic's probability" - the probability of a given "skeptic's distribution" generating a Jesus-level resurrection report. The various parameters fed into the function determines the specific form of the "skeptic's distribution".

In [3]:
def calculate_p_skeptic(
    dist_type, #genpareto or lognorm
    shape_params_dist, #np.logspace or np.geomspace 
    sample_size, #1e9 or 1e10
    greater_by, #24 or 50
    n_outliers, #50 or 250
    n_max_draws=10000,
):
    
    if dist_type == genpareto:
        shape_limits = [0.02, 2,1]
    elif dist_type == lognorm:
        shape_limits = [0.2, 10.0]
        min_shape = 0.2, 
        max_shape = 10.0
    if shape_params_dist == np.logspace:
        shape_limits = [np.log10(x) for x in shape_limits]
    shape_params_list = shape_params_dist(
        shape_limits[0], shape_limits[1], 105)
        
    shape_params = []
    p_max_greater_by = []
    n_outliers_estimation = []
    
    for shape_param in shape_params_list:
        dist = dist_type(shape_param, scale=1, loc=0)
        for i in range(n_max_draws):
            shape_params.append(shape_param)
            max_val = max_out_of_n_from_dist(dist, sample_size)
            p_max_greater_by.append(dist.sf(max_val * greater_by))
            p_outlier = \
                (dist.sf(max_val * 0.2) - dist.sf(max_val)) \
                / dist.cdf(max_val)
            n_outliers_estimation.append(
                int(round(p_outlier * sample_size)))

    result_df = pd.DataFrame({
        "shape_params":shape_params, 
        "p_max_greater_by":p_max_greater_by,
        "n_outliers":n_outliers_estimation,
    })
    
    match_df = result_df[result_df["n_outliers"] == n_outliers]

    if match_df.shape[0] < 50:
        print "warning: match_df.shape = ", match_df.shape
    if match_df["shape_params"].max() == shape_params_list.max():
        print "warning: maxed out shape_param"
    
    p_skeptic = match_df["p_max_greater_by"].mean()
    
    return p_skeptic

Now, let us explore some of the different possible forms of the "skeptic's distribution", and calculate their "skeptic's probability".

Here's one we looked at before. It uses the most pro-skeptical assumptions possible to generate the maximum possible "skeptic's probability".

In [4]:
calculate_p_skeptic(
    dist_type=genpareto,
    shape_params_dist=np.linspace,
    sample_size=int(1e9),
    greater_by=24,
    n_outliers=50,
)
Out[4]:
4.139635934580683e-12

Here's another possibility, only changing the most questionable parameters to the edges of their likely values. Here are the changes we're making:

The prior distribution of the shape parameters: from being uniform in linear space to uniform in logarithmic space.

The sample size (that is, the number of reportable deaths in world history): from 1e9 to 1e10.

The number of "outliers" (That is, the number of reports of a "resurrection", with at least a "some people say..." level of evidence): from 50 to 200.

All of these changes are almostly certainly true to at least that extent. The actual truth may be even more extreme - for example, the number of outliers may actually be in the thousands.

This gives a very conservative answer for how small the "skeptic's probability" may be.

In [5]:
calculate_p_skeptic(
    dist_type=genpareto,
    shape_params_dist=np.logspace,
    sample_size=int(1e10),
    greater_by=24,
    n_outliers=200,
)
Out[5]:
1.866911316237698e-14

Here we've changed a few more parameters. The distribution type has been changed to lognormal, we've increased the factor by which the Jesus-level of evidence exceeds the maximum, and the number of "outliers" has been increased. The "skeptic's probability" calculated here may perhaps be called "likely".

In [6]:
calculate_p_skeptic(
    dist_type=lognorm,
    shape_params_dist=np.logspace,
    sample_size=int(1e10),
    greater_by=50,
    n_outliers=300,
)
Out[6]:
3.855529808259304e-16

Here is another combination of parmeters which may be called "likely".

In [7]:
calculate_p_skeptic(
    dist_type=lognorm,
    shape_params_dist=np.logspace,
    sample_size=int(3e10),
    greater_by=70,
    n_outliers=200,
)
Out[7]:
6.095046577090992e-17

So, those are some of the possible values for the "skeptic's probability". Recall that there are other, previously enumerated factors which we have not yet taken into account.

In particular, all the calculations up to this point only take into the amount of testimonies for Christ's resurrection. We have not yet considered the specific kinds of evidence for Christianity that directly counters things like conspiracy theories or mass religious delusions. The ample amounts of such evidence is particularly effective, because such crackpot theories are what makes up most of the skeptic's possibilities at this point. The effect of considering these additional evidence are hard to quantify, but they'd easily be worth another several orders of magnitude.

So we see that the "skeptic's probability" of 4e-12 really was a nearly impossible best-case scenario for skepticism. A very conservative - but not fantastical - value would be more like 1e-14, and a likely scenario gives values like 1e-16. Again, all this considers only part of the evidence for Christianity, and the "skeptic's probability" is bound to be another several orders of magnitude smaller.

The Bayes' factor then is essentially the reciprocal of this value. That is, the Bayes' factor for Jesus's resurrection is at least on the order of 1e14 to 1e16, amply sufficient to overcome a prior odds of 1e-11, with little possible doubt remaining. Jesus almost certainly rose from the dead.

The next post will be a summary of this whole "skeptic's distribution" argument.

Show/hide comments(No Comments)

Leave a Reply

Pages

• Home
• All posts
• About

Post Importance

• 1: essential (4)
• 2: major (22)
• 3: normal (109)
• 4: partial (98)
• 5: minor (347)

Post Category

• blog update (352)
• humanities (22)
 • current events (26)
 • fiction (10)
 • history (33)
 • pop culture (13)
  • frozen (8)
• math (57)
• personal update (19)
• philosophy (86)
 • logic (65)
• science (56)
 • computing (16)
• theology (100)
 • bible (38)
 • christology (10)
 • gospel (7)
 • morality (16)
• uncategorized (1)
© NaClhv.com, 2013-2024, All rights reserved.