THE REINSURANCE ACTUARY
  • Blog
  • Project Euler
  • Category Theory
  • Disclaimer

Bayesian Analysis vs Actuarial Methods

21/4/2021

 

David Mackay includes an interesting Bayesian exercise in one of his books [1]. It’s introduced as a situation where a Bayesian approach is much easier and more natural than equivalent frequentist methods. After mulling it over for a while, I thought it was interesting that Mackay only gives a passing reference to what I would consider the obvious ‘actuarial’ approach to this problem, which doesn’t really fit into either category – curve fitting via maximum likelihood estimation.

On reflection, I think the Bayesian method is still superior to the actuarial method, but it’s interesting that we can still get a decent answer out of the curve fitting approach.

The book is available free online (link at the end of the post), so I’m just going to paste the full text of the question below rather than rehashing Mackay’s writing:
Picture

Curve fitting

I’m going to describe the actuarial method by giving a worked example. Let’s generate some sample data so we have something concrete to talk about, I’m going to be using Jupyter notebook to do this, and all code is written in Python. Note below I’m having to use the truncated exponential distribution as we have no information about particles that decay more than 20cm from the origin. If we knew about such particles, but only that they had a value >20, then this would be right censoring, and we would still use the exponential distribution. Truncation, where we don’t even know about the existence of such particles is subtly different and requires a different distribution.
 
In [1]:
from scipy.stats import truncexpon
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
%matplotlib inline
In [2]:
# Generate 50 samples from a truncated exponential with lambda = 10, truncation = 20

b = 2
scale = 10
r = truncexpon.rvs(b, loc=0, scale = 10, size=500, random_state = 42)
In [3]:
# Plot a histogram of the random sample

fig, ax = plt.subplots(1, 1)
ax.hist(r, bins=50)
plt.show()
In [4]:
# The histogram looks like exponential decay as expected.

#Let's fix b = 2, and then solve for Lambda:

exponfit = truncexpon.fit(r, fb = 2, floc = 0)
exponfit
Out[4]:
(2, 0, 9.780167769576435)
Actuarial vs Bayesian

So we managed to derive a pretty close approximation to the true lambda by fitting the truncated exponential (10 vs 9.78). With a high enough sample size, I’m sure our method would converge to the true value. So we’ve answered the question right? Why should we bother with Mackay’s Bayesian method at all?

If we wish to say things probabilistically about Lambda (such as what is the probability that Lambda = 11 given the data?), then the actuarial approach gives us no real information to go on. All the actuarial approaches does is spit out a single ‘best estimate’ based on maximum likelihood estimation. The Bayesian approach, when supplied with an appropriate prior distribution actually gives us the full posterior distribution of Lambda given the data. So if we wish to say anything more about lambda we definitely do need to use the Bayesian method.
​
I like the fact that the actuarial approach gets you where you need to go without having to use complex frequentist methods (no selecting bins and building histograms, no inventing complex estimators and showing they converge, etc.)
 
[1] ‘Information Theory, Inference and Learning Algorithms’ - http://www.inference.org.uk/mackay/itila/book.html

Your comment will be posted after it is approved.


Leave a Reply.

    Author

    ​​I work as an actuary and underwriter at a global reinsurer in London.

    I mainly write about Maths, Finance, and Technology.
    ​
    If you would like to get in touch, then feel free to send me an email at:

    ​LewisWalshActuary@gmail.com

      Sign up to get updates when new posts are added​

    Subscribe

    RSS Feed

    Categories

    All
    Actuarial Careers/Exams
    Actuarial Modelling
    Bitcoin/Blockchain
    Book Reviews
    Economics
    Finance
    Forecasting
    Insurance
    Law
    Machine Learning
    Maths
    Misc
    Physics/Chemistry
    Poker
    Puzzles/Problems
    Statistics
    VBA

    Archives

    March 2023
    February 2023
    October 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    October 2021
    September 2021
    August 2021
    July 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    May 2020
    March 2020
    February 2020
    January 2020
    December 2019
    November 2019
    October 2019
    September 2019
    April 2019
    March 2019
    August 2018
    July 2018
    June 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    April 2016
    January 2016

  • Blog
  • Project Euler
  • Category Theory
  • Disclaimer