81 Chancery Lane
0207 112 8493
View map


1 Lochrin Square
92 Fountainbridge
0207 112 8493
View map


24A Baggot Street Upper
D04 V970
0207 112 8493
View map

Registered Office

7 Bell Yard,
0207 112 8493
View map

Send us a message

Contact Us

Bank of England System-wide Exploratory Scenario Stress Test

May 2022

[1] Solvency II Review: Consultation – GOV.UK (

Cyber Security: SQL Injection

April 2022

[1] This is a fact profound enough to warrant a footnote, even though it is not strictly relevant to the article. Colloquially, Gödel proved that any logical system capable of expressing arithmetic will contain some number of true statements which are unprovable. Whilst this is obviously consequential for mathematics and philosophy, it also less obviously puts constraints on the kinds of computer programs that can run in a finite number of steps.

[2] Machine code is the code which is expressed in terms that your computer can understand, and it’s not nice to read. Just as all legal programs can be translated to machine code, all legal functional programs can be translated to an extended form of the lambda calculus (which in turn can be translated to real machine code to run on your PC). Most languages, even functional ones, do not actually do this (opting to cut out the lambda calculus middleman), but it can be done in principle, and a few do take this approach. Regardless of how the computer “really” treats them, the lambda calculus is the theory that supports the grammar of such languages.

[3] This is a bit of a tautology – “computable” is typically taken to mean anything that a Turing Machine can do with infinite time and resources.

[4] Note that brackets don’t mean anything special, as they do for f(x) in standard function notation. They just indicate the precedence of function application.

[5] A word of advice for those who embark on this journey: although the pure lambda calculus does not provide arithmetic or numbers, it can be helpful to pretend they exist to test your intuition.

[6] Both examples are taken from the Haskell wiki. Rest assured, they have not deliberately made the C code look worse than it needs to be!

[7] This is one of the reasons that C is such a notoriously hard language to use – programmers can wreak all kinds of havoc with this power. But by the same token, expert C programmers are able to squeeze phenomenal performance out of their code.

[8] With a few notable exceptions, such as Java (which enforces OOP) and Haskell (which is necessarily purely functional). Some languages also just lack facilities that would make certain paradigms convenient. For example it is very difficult to do any sophisticated functional work in VBA.

[9] Excel formulas cannot save secret variables in some persistent location, nor can they cause side effects – they can just be evaluated, The Excel formula language is purely functional for this reason.

Actureads Book Club: The Transgender Issue

March 2022


[ii] Kahneman, D. (2011) Thinking, Fast and Slow. New York: Farrar, Straus and Giroux

[iii] Ariely, D. (2008) Predictably Irrational. London: HarperCollinsPublishers

[iv] IFoA. (2019), CM2 Financial Engineering and Loss Reserving: Core Reading

[v] Ibid

[vi] Ibid


[viii] Kahneman, D. (2011) Thinking, Fast and Slow. New York: Farrar, Straus and Giroux

[ix]  IFoA. (2020), SP5 Investment and Finance Principles: Core Reading

An Introduction to Chess Tactics

February 2022

Differential Pricing & Equitable Insurance

Here we calculate donations by blood type as follows:

Donations required per year = Total population * Proportion in blood group * 2.5%

Note that the annual donations required values do not quite add to 2,500,000, as would be expected, because of rounding of the blood group distribution percentages.

Thus, we can summarise the problem as follows. Given the distribution of blood types, the size of the eligible donor population, the limitations on who can donate to who, and the number of donations required for each blood group, how can we ensure that we have enough donations (with minimal wastage)?

A simple solution

On the face of it, this could be quite simple. We have estimated that 2,500,000 donations are required each year (2.5% of 100 million). An obvious solution is that we allow only donations from O Negative donors. Given that they can donate to all blood groups, we are guaranteed that the donations would be suitable, no matter the recipient. The issue however is that this would require approximately 40% of all eligible O Negative donors to donate blood each year (assuming donors only donate once per year). This seems rather ambitious!

A better solution – Part 1

Let’s reconsider and take a more systematic approach to the problem. Firstly, we use the above information, alongside our knowledge of who can donate to which blood group, to produce a range of the minimum and maximum donations required by donor blood group.

Note, the table above uses the following logic. For example:

The table in itself is not particularly useful given how large the ranges are in each blood group. However, they do allow us to gain insight into where potential shortfalls could lie – in particular, we need at least 5% of all eligible O Negative individuals to donate blood (again assuming donors only donate once per year). One would immediately want to question whether this is achievable and how these potential donors might be encouraged to donate blood. This analysis also paves the way for exploring other solutions, such as the one which follows.

A better solution – Part 2

Let us instead look at a solution which factors in the distribution of those eligible to donate blood and optimise to produce a realistic distribution of the required donations by type.

As a starting point, consider what would happen if the proportion of blood donors of each type were the same as in the whole population. Then, the amount of donations made by each blood group would be the same as in the first table.

If we had these numbers of donors then we could, hypothetically, guarantee that everyone requiring blood does indeed receive it. How can we be so sure? Well, we could allocate the donated blood so that the blood groups of the recipient and donor are the same – e.g. 200,000 B Positive donations are made which would all be allocated to B Positive recipients. As each blood group can donate to individuals of the same blood group, this would work for everyone. The additional benefit here is that we need an equal proportion of donations across each eligible blood group population (i.e. 5% of potential donors from each blood group need to donate – assuming once again that each donor donates once per year), and so we aren’t strained by attempting to recruit a higher proportion of donations from a specific blood group (like in our first solution where almost 40% of eligible O Negative individuals were required to donate blood each year).

However, this approach also has its drawbacks. For instance, in emergency situations we may not immediately have information on the recipient’s blood type and so would instead want to use O Negative blood as it is suitable for all recipients. We also should recall that the shelf life of donations is approximately 1 month, and so we require that for each blood group, the distribution through time of donations broadly matches the demand. Furthermore, if we allocate blood donations in this way then we also should consider the transport costs/logistics if there is a disparity between where donors and recipients are situated for each blood group. The solution is also idealistic; what if the proportion of donations by blood group naturally differs from 5%? How can we adjust the allocation so that everyone who needs blood receives it?

An even better solution

At this point, you may be thinking that there are far too many variables to generalise this problem – and I would agree. So, let’s take an actuarial perspective. And what do actuaries like doing most? Well of course that must be building models.

So, I went away and built a model in Excel which allows the user to play around with the various parameters that are involved in this problem. In particular, the user can change the assumptions and set the expected number of donations made by each blood group.

The challenge however is to see if the user can correctly distribute the received donations (see the ‘Donations & Distributions’ sheet of the tool) in order to ensure that everyone who requires blood donations does indeed receive them. When downloading the attached version of the tool, I have set the donations received numbers and you should look to edit the proportions in the ‘Donations & Distributions’ sheet so that you are successful. It may be that it is not solvable at all – but I encourage you to have a go for yourself to gain an insight into this problem and the potential challenges faced.

Additionally, I would encourage you to adjust the ‘Donations made by blood group per year’ column (within the ‘Donations & Distributions’ sheet) and consider the effect this has on the required distribution of donations. In particular, who are the ‘best’ type of donors? What do we even mean by ‘best’? Think also about what a reasonable distribution of donations could look like, in the real world.


As alluded to earlier, the problem and tool showcased within this article are a simplification of the actual problem one may face (but no doubt should prove valuable insight into the dilemma) for many reasons. For instance, we may want to model stochastically the requirement of blood or even use a time series model. This would allow us to take into consideration the randomness of accidents and emergencies leading to blood requirements which could be combined with a more stable assumption about the needs of recipients who have more predictable, longer-term requirements. We could also build in allowance for differing levels of demand at various times of year.

And how about projecting the amount of donations? This too wouldn’t be uniform – could we use a time dependent model here? We also did not specify the relationship between the number of donors and the number of donations (the analysis within this article only considers the number of donations made). In fact, it is possible to donate roughly once every 12 (for men) to 16 (for women) weeks [3], and so our model could build in assumptions about the distribution and frequency of repeat donors.

There are also potentially transportation and additional logistical issues with regards to where the donors and recipients are located, particularly if the proportions of donors and recipients are not aligned locally. Would this mean that advertising needs to be targeted because for instance, it would be cheaper to pay everyone £10 for donating O Negative blood in London rather than transporting an excess from Edinburgh (for example)? Is this ethical?

It is also worth noting that it is better to have an excess which has uses in research and education, rather than to have a deficiency and risk patient welfare. However too much of an excess is also not beneficial because there would be costs related to the extraction of, and subsequent storage and disposal of, this unused blood.

Finally, as with any model, one should critically analyse and validate every aspect of it to ensure that it is suitable for the problem at hand (given I have just sat CP1, I could additionally list the requirements for building and validating a good model, but I will leave that as an exercise for the reader to think about).

Why give blood?

I wanted to conclude by discussing why it is important to donate blood if you can do so. I have been fortunate to not require such donations, but I have relatives who required blood following accidents, and I am thankful that they were able to have near immediate access to this.

As someone who decided to donate despite being utterly terrified of needles, I was surprised by how relatively painless the entire process was and would not have donated again were this not the case.

If for no other reason, then it is an opportunity for you to make a genuine difference to someone’s life (and their family).

If you are interested in donating (and live in the UK) then the following link will provide you with further information – Can I give blood? – NHS Blood Donation

The model used for this article can be downloaded by clicking the following link: Blood Donation Tool

Amar Gorania

January 2022


* It is also possible to donate platelets (which can be stored for up to 7 days) and plasma (which can be stored for up to 3 years).

Only those who are aged between 17-65 and meeting certain other requirements can give blood in the UK [3], so 50% of a developed country being eligible to give blood is a reasonable assumption.

This is reasonable given that the NHS estimates that approximately 5000 donations are required each day in the UK [2], which has a population of approximately 70 million. This equates to an ‘annual required blood donations relative to total population’ metric of 2.6%. [2]





Who are the Super-Predictors from Round 1 of the APR Life Conference Competition?

Jacob Warbrick analyses the results from the first round of APR’s Prediction Competition at the IFoA Life Conference last November.

VBA Mini-Series – Extensibility

In the third of our VBA mini-series, John Nicholls explains how to make your VBA better using its massively useful but little-known suite of extensions.

The Problem with Probability

Have you ever considered using probability to be problematic? In this article, Joe Barnett shares his experienced opinion on the matter.

The past, present and future of wearable technology in insurance

Matthias Wuest assesses the usefulness and reliability of data from wearable technology and explores it’s impact on the Insurance Industry.

Actuarial Modelling and Diversity & Inclusion

Mujtaba Syed discusses how a highly skilled and diverse group of people working on similar problems can contribute to very effective model building and problem solving.

VBA Mini-Series – Class Modules

In the first of our VBA mini-series, John Nicholls dives into class modules in a VBA context, comparing VBA to other languages with classes and recommending areas where regular actuarial work might benefit more from using them.

APR Wins Investors in People Gold Award

APR has recently been awarded the Gold award by Investors in People! James Nicholl discusses what this means to us and what’s still being done to make APR an even better employer.

VBA Mini-Series – An Introduction

In this article John Nicholls introduces a series of planned articles that will perform a shallow dive into some more advanced concepts in VBA and how they might be useful in an actuarial context.

Talking with Pythons: How to Debug Failing Code

Stressed by tech glitches? Ellen Weise has the secrets for mastering the art of debugging, so you’ll never pull your hair out over broken code again!

APR Charity Day 2023

After another successful Charity Day for APR, Jennifer Claybourn summarises the charities we have donated to, and our reasons why.