The prime objective of this paper is to develop the parameter estimation and premium calculation to the extended model introduced by Li et al. [2015] , where the so-called unforeseeable risks were additionally taken into account. These risks refer to those that are not really predictable due to lack of history, for example, a very real situation during the Spring of 2020, a pandemic. Another example are the emerging risks that have been evolving with the ever smarter way of living. The evaluation of these risks could be different from classical methods. For instance, with the introduction of autonomous cars, it would possibly change the magnitude of risks on roads, yet we do not know in which direction precisely, even though they were designed to reduce human error. To model such unforeseeable features, a defective random variable was incorporated in the risk model by Li et al. [2015] , inspired in Dubey [1977] . There, unforeseeable risks were reflected in the claim frequencies only. We extend to severity risks.
We propose a modification on the classical risk model which accounts for the accommodation of the unforeseeable risks. Li et al. [2015] show such modified model, a developed version of the classical Cramér-Lundberg's risk model introduced by Dubey [1977] , where the Poisson parameter λ is a realization of a random variable Λ. The premium income is based on an estimation of Λ, for instance the posterior meanλ(t) = E[Λ|N (t)], namely the risk process is driven by the equation
(1.1)
Here
j=0 Y j is the aggregate claims up to time t, u = U (0) is the initial surplus, {Y j } ∞ j=1 a sequence of independent and identically distributed (briefly, i.i.d.) random variables with common distribution H Y (.), existing mean µ = E[Y 1 ]. Moreover, Y 0 ≡ 0, and {N (t), t ≥ 0} is a Poisson process with intensity λ (> 0). Also, {Y j } ∞ j=1 is independent of {N (t), t ≥ 0}. Here c is the time-invariant component of the premium income, with c = (1 + θ)E[Y 1 ], where θ (> 0) is the loading coefficient. Dubey [1977] considered a positive probability P[Λ = 0] = p (> 0), so that the counting process {N (t)} is a mixed Poisson process conditional on Λ > 0. Li et al. [2015] generalised the process to a sum of two mixed counting processes, {N (t) = N (1) (t) + N (2) (t)}, where {N (1) (t)} represents the historical risk stream of claim counts and {N (2) (t)} represents the corresponding unforeseeable risk stream. For each, randomised intensity parameters are denoted as Λ (1) and Λ (2) , respectively. This is the process we will consider in the rest of the paper. The randomised intensity parameter of N (1) (t) has a classical behaviour, meaning that it is a positive random variable, or P{Λ (1) = 0} = 0, unlike in the second process where P{Λ (2) = 0} = p > 0. As in Li et al. [2015] , we setλ(t) = E[Λ (1) + Λ (2) |N (t)] in (1.1).
Not much interpretation is given by the authors, Dubey [1977] and Li et al. [2015] , to the situation where p > 0. We remark that the second stream can be riskier in either severity or frequency or both. If we think of the development of autonomous cars, experiments suggest that they are potentially safer than human driving if you are looking at the accident rates (Waymo Team, 2016) . But once an accident occurs, it could bring in higher damage than that would have been caused by a human (McCausland [2019] ). On the other hand, the outbreak of the asbestos crisis in the 1980s raised no awareness until 20 years later when claims reached more than double the original amount (White [2003] ). If a model existed at that time to capture the potential risks embedded in the gradually increasing claims earlier, insurance companies could have avoided dramatic losses. In short, the introduction of an unforeseeable stream is to accommodate potential uncertainties, either riskier or less risky, whose nature one cannot foresee exactly if and/or when, and that the actuary feels it's wise to be reflected in the premium. A new virus pandemic could be an example, signs may have been appeared before.
Modelling two different streams of risks for the same portfolio can be done exclusively on the claim count process as Dubey [1977] and Li et al. [2015] did, or in the claim severity, or both in claim counts and severity. In this case we consider there is some sort of dependence between {N (t), t ≥ 0} and sequence {Y j } ∞ j=1 . The latter means that the different streams may bring diverse severity behaviour. This is not dealt by any of the above cited authors.
Letting premium adjust according to claim numbers somehow imitates the operation of a Bonusmalus system (BMS). For instance, Ni et al. [2014] worked with Negative Binomial distributed frequencies and Weibull distributed severities, as an extension to classical settings. Another recent work by Cheung et al. [2019] considered a dependence structure between the claim frequency and severity components via conjugate bivariate prior and calculated Bayesian premiums. In this work, we also incorporate the two risk streams into the claim severity, add appropriate premium calculation and estimation. This is important in order to reflect both risk effects in the premium, for fairness and ruin probability compensation. For the premium calculation/estimation credibility theory is used, parameter estimation procedure uses the Expectation-Maximization (EM) algorithm. EM algorithm is developed in Dempster et al. [1977] , a guided tour can be found in Couvreur [1997] . We will be using mixture distributions, particular algorithm application for these can be found in Redner and Walker [1984] .
The use of Bayesian and credibility methods for posterior premium appear as a natural choice (we have set above the posterior meanλ(t), for instance). Markovian bonus-malus methods are easy and common choices for posterior rating based on claim counts only and are used for individualise premia. This is not our problem, besides, adding the severity component it necessarily drives actuaries for credibility estimating methods. Introductory notions on credibility can be found in Klugman et al. [2012] , Chapters 17-19, and more advanced in Bühlmann and Gisler [2006] .
The manuscript is organised as follows. In Section 2 we work only with the claim frequency component of the model, while in Section 3 we introduce the claim severity, assuming that severity brings some information on the stream origin. In Section 4 we deal with the premium calculation/estimation via a Bayesian approach. Section 5 is devoted to the parameter estimation via an EM algorithm, on a concrete dataset. Claim severity data are randomly generated by the chosen mixed distributions considering both non-extreme and extreme cases. Bayesian premiums are computed in the end using the estimated parameters. Section 6 presents discussion on a global likelihood procedure to estimate together the claim frequency and severity distributions, and in the last section we write some concluding remarks. Proofs of lemmas are given in the appendix.
The total claim numbers over a time period (0, t] within the portfolio is given by
(2.1)
Here {N (1) (t)} is a mixed Poisson process with parameter Λ (1) and {N (2) (t)} is mixed Poisson conditional on {Λ (2) > 0}, meaning the intensity must be strictly positive. The event {Λ (2) = 0} implies that {N (2) (t) = 0}, with probability one, since lim λ↓0 P{N (2) (t) = 0|Λ (2) = λ} = lim λ↓0 e −λ t = 1 .
{N (t)} is also a mixed Poisson process with intensity Λ (1) + Λ (2) given that N (1) (t) and N (2) (t) are independent, see Li et al. [2015] [Lemma 1]. Under this global process, {N (t) = N (1) (t) + N (2) (t)}, we have that when a claim arrives it comes either from the process {N (t) (1) }, or from the process {N (2) (t)}. We note that in practice actuaries observe the realisations of the overall claim process, which means they guess which process the claim belongs to. Let us define and denote by Ξ, the random variable representing the split rate in favour of process
It is well known that for independent Poisson processes, in our case for given positive rates Λ (1) = λ (1) and Λ (2) = λ (2) > 0, we have that the split between processes "(1)" and "(2)" is going to be given by probabilities,
respectively. Unconditionally, considering that ξ is a particular outcome of the random variable Ξ, then we can write, extending the unconditional mixed process as defined in (2.1)
We denote the distribution function of Ξ as A Ξ (.). We will now set further assumptions. From now on, we assume that the Poisson intensities follow gamma distributions: Λ (1) ∼ Gamma(α 1 , β 1 ) and, conditional on Λ (2) > 0, Λ (2) |Λ (2) > 0 ∼ Gamma(α 2 , β 2 ). For simplicity, in the sequel we denote Λ
(2) + = Λ (2) |Λ (2) > 0. Furthermore, without loss of generality, we consider that the number of claims observed within one unit period N (1) to be denoted as N . Under a more restrictive assumption for the gamma distributions above, we can arrive at the following lemma:
Lemma 2.1 If β 1 = β 2 = β, then the random variable N = N (1) is represented by a mixture of two Negative Binomial random variables, with probability function
Remark 2.1 Note that N (2) (t) follows a 'Zero Modified' Negative Binomial distribution, briefly, N (2) (t) ∼ ZM N egative Binomial(α 2 , β). It belongs to the (a, b, 1) recursion class of distributions, see Section 6.6 of Klugman et al. [2012] . Since
which is a weighted average of the pgf 's of a degenerate distribution at {0} and a Negative Binomial, member of the (a, b, 0) class.
In the sequel, instead of focusing on the claim arrival process {N (t)} which consists of combining two counting processes, {N (1) (t)} and {N (2) (t)}, as explained above, we could model the underlying claim counts via mixing random variables, mixing two Gamma random variables with an independent Bernoulli random variable. See [Constantinescu et al., 2013] , Lemma 2.2 Assume that the randomized Poisson parameter Λ follows a prior distribution as a mixture of two Gamma random variables, such that
where Z 1 ∼ Gamma(α 1 , β) and Z 2 ∼ Gamma(α 1 + α 2 , β) and I is a Bernoulli(p) random variable independent of Z 1 and Z 2 . Then the distribution of N = N (1) is the mixture of two Negative Binomial random variables as shown in Lemma 2.1 above.
Based on the above Bayesian set-up, considering a prior distribution of Gamma mixtures, we will be able to compute easily a corresponding posterior distribution, for a given distribution of an observable random variable. This is important for experience rating where we can use naturally the theory of Bayesian premium, for making posterior estimation of premia, as well as credibility theory, a particular case in Bayesian premium estimation. This is going to be done in Section 4. In fact, the equivalence of the previous two constructions can be explained further. Consider the following remark.
(2) 0 = 0 and I ∼ Bernoulli(p). We have,
In the model presented so far, we distinguish the unforeseeable stream of risks from the historical stream by considering two different, and independent, claim counting processes, where the randomized intensities are of different nature. For now, these parameters only influence the claim numbers, not the claim sizes. However, we should also consider the possibility that the claims are affected by the risk type. The introduction of a randomness in the intensities can bring a dependence between number of claims and sizes, setting us away from the classical risk consideration that the claim arrival process is independent of the claim severity sequence. We may assume a twofold approach 1. At a starting stage, we can consider that for a given Λ (i) = λ (i) , i = 1, 2, we have conditional independence. We mean, for a given (i) and λ (i) , severities and claim counts are independent;
2. At a later stage, an extended model with dependence.
Again, we remark that parameters cannot be observed, only claims can. Furthermore, in practice we only observe the realization of the total claim process {N (t) = N (1) (t) + N (2) }, so that we guess/estimate which process each claim arrival belongs to, then make the severity correspondence, if we set a different distribution for each stream. Thus, using data and the model as behaving like is defined in Lemma 2.1 we have four parameters to estimate, p, α 1 , α 2 , and β. Parameters of the severity distributions will be estimated in addition.
As defined in (2.3), Ξ is the random split rate between processes {N (1) (t)} and {N (2) } in {N (t)}. Let's consider event {Λ (1) + Λ (2) = λ, Ξ = ξ, 0 < ξ < 1} as given, so that {N (t)} conditionally is a Poisson process. Consider the following remark:
Remark 2.3 Remark that Ξ = ξ is the probability that an event arriving from process {N (t) = N (1) + N (2) } is generated by {N (1) }. Conditional on {Λ (1) + Λ (2) = λ, Ξ = ξ} we have that Λ (1) is also given. Then Λ (1) = λξ, and Λ (2) = λ − Λ (1) = λ(1 − ξ) . If ξ = 1 ⇒ Λ (2) = 0 ⇔ Λ = Λ (1) = λ and N (2) (t) = 0 ∀ t ≥ 0 almost surely.
For now, we assume that the distribution of the individual claim size depends on the stream type, either historical or unforeseeable. We keep assuming that the actuary may not be able to recognize which stream the claim comes from. At least, he cannot be certain. Let F and G denote the distributions for claim severities in the historical and unforeseeable streams, respectively. Consider that the individual claim size, taken at random, say Y , follows a distribution function denoted as H(y).
Proposition 3.1 For a given claim Y , its distribution function, conditional on Ξ = ξ, can be represented by P{Y ≤ y|Ξ = ξ} := H ξ (y) = ξF (y) + (1 − ξ)G(y),
Λ (1) +Λ (2) ∈ (0, 1], and F, G correspond to the distributions for claim severities in the historical and unforeseeable streams, respectively. The set {Ξ = 1} = {Λ (2) = 0} has a probability measure p.
Proof. The proof is straightforward using the law of total probability.
where Y (1) and Y (2) denote random variables of the size of claims stemming from Stream 1 (the historical stream) and Stream 2 (the unforeseeable stream) respectively. Note that when Ξ = 1, i.e., Λ (2) = 0, N (t) = N (1) (t) and the probability of having a claim from Stream 1, i.e., P{Y = Y (1) |ξ = 1} = 1, where as P{Y = Y (2) |Ξ = 1} = 0. This special situation does not affect Equality (3.1). It has been illustrated in Li et al. [2015] , see their Lemmas 2 and 3, that the independence between
(2) + and Λ (1) + Λ
(2) + , conditional on Ξ = 1, result in Ξ|Ξ = 1 being distributed as a Beta(α 1 , α 2 ) law. Then, it is easy to derive the unconditional distribution of Y under these assumptions.
Proposition 3.2 Assume that Λ (1) Λ (1) +Λ
(2) + and Λ (1) +Λ
(2) + are independent, and that Λ (1) ∼ Gamma(α 1 , β) and Λ
(2) + ∼ Gamma(α 2 , β). A given claim size is distributed according to a mixture law of F (·) and G(·), i.e., with density,
Proof. Under the assumptions, we know that Ξ|Ξ = 1 Beta(α 1 , α 2 ) according to Lukacs [1955] 's proportion-sum independence theorem. The subsequent proof is then straightforward. A Ξ (ξ) denotes the distribution function of Ξ (a mixture), we have
Remark 3.1 Based on the proof of Li et al. [2015] ' Lemma 2 (see their Appendix) we can conclude that, under the conditions of Lemma 3.2, Y and N are independent. This will allow us to consider the parameter estimation using separately the claim frequency and the severity component.
In the previous section we specified a distribution for the random variable N , as well as its parametrization. The unconditional distribution for N starts from assuming a Poisson distribution, commonly accepted as assumption for claim count data in the line of motor insurance, for instance. We ended up developing a particular mixture of two Negative Binomial distributions, having started from a different Poisson distribution for each stream of risks. We'll see in Section 5 that the assumption is reasonable and may fit actual data.
For the claim severity we will start with a prior assumption that claim severity distribution belong to the linear exponential family. This exponential family is a common fit for insurance severity data. First, we assume a particular form for the distribution of individual claim severity as a mixture of two distributions, denoted as F (·) and G(·). They represent the behaviours of the claim severities from the two streams, separately the historical and unforeseeable streams, respectively F (·) and G(·). Then, if we specify F (·) and G(·), we can move for the parameter estimation.
Using a simple example, from now onwards consider that both the densities of the two streams come from exponentially distributed random variables, Y ∼ Exp(Θ), where Θ −1 is the mean, and as discussed, there is a dependence structure embedded in the random parameter Θ, such that:
1. Θ = µ with probability one if we consider the historical stream; 2. Θ ∼ Gamma(δ, σ) if we consider the unforeseeable one.
This implies that claims in the historical stream conform to the exponential distribution with mean µ, whereas those of the unforeseeable stream conform to a Pareto distribution, P areto(δ, σ). Their respective unconditional densities are
We chose a mixture of a light tail distribution with a heavy tail one, respectively to represent an historic behaviour example and an unforeseeable one.
Remark 3.2 This consideration can actually be connected with the example presented in Corollary 2 in Li et al. [2015] . If we let ζ 1 = µ, treat ζ 2 as a Gamma(δ, σ) random variable and integrate the ruin function obtained there over ζ 2 , we could in theory represent the ruin probability for our model in a closed form.
Our model will be complete, and ready for parameter estimation/distribution fit, once the premium calculation is defined.
Premia are set to be calculated for rating periods, most commonly annual periods. For estimating, risk observations must be organized by periods, suppose that we observed the risk for m years, or m rating periods. Then, our observation vector for the claim counts is n = {n 1 , . . . , n m }. For each year, say year j, we'll have n j individual claims observed, say vector y j = {y j1 , . . . , y jn j }. This means that observations in year j are set in the two fold vector (n j , y j ). To calculate the annual premium, one only needs the annual amounts ,on aggregate, specifically the observations of S(1) i , i = 1, . . . , m, since a premium is set for an aggregate quantity. However that would be insufficient in our case, since we consider that claim counts and the severities bring separate and different information on an unforeseeable stream. Another question would rise: Could we separate information contribution from counts and from severities? In a classical model the two annual sequences of claim counts and severities are assumed to be independent and the annual pure premium is given by 
The Bayesian (pure) premium is defined as the mean of the predictive distribution E [N m+1 |N = n]. An interpretation is simple, parameters cannot be observed, only claims are, either counts or severities, and they should bring some information about unknown parameters. So, E [N m+1 |N = n] is an estimate for the premium we want to calculate. On the other hand, it could be easily shown
The former expectation is the mean of the predictive distribution. The latter expectation is the expected value of the hypothetical mean µ(Λ), integrated over the posterior distribution. µ(Λ) is also known in insurance risk theory, and credibility theory, as the (unknown) risk premium. The credibility premium is the best linear approximation for the Bayesian premium in the sense of minimizing the expected squared error (see [Klugman et al., 2012, Section 20.3.7 and Formula (20.28)]). When we work with linear exponential family likelihood and their conjugate priors (no truncations), we can usually get what is called Exact Credibility in the literature, see [Bühlmann, 1967, Section 18 .7], i.e., the Bayesian premium equals the credibility premium. Despite the fact that our setting will not result in the exact credibility, we will see that they can be related.
Consider a generic a random variable, say X, following a distribution belonging to the linear exponential family, depending of some parameter, say θ. Its probability or density function is of the form (see [Klugman et al., 2012, Chapters 5 and 15])
If parameter θ is considered to be an outcome of a random variable Θ, whose prior density function is of the following form, denoted as π(.)
then we are in the presence of a conjugate prior. In the above formulae, (4.1) and (4.2), p(.) is some function not depending on the parameter θ. On one other hand, r(.), q(.) are functions of the parameter; c(.) is a normalizing function of given parameters. It is clear from Sections 2 and 3 that we work with situations where the risk random variables that are observable follow distributions that are members of the linear exponential family given by (4.1). Associated to these we consider priors that are mixture distributions of the form (4.2). In this situation we don't have exact credibility but some mixture of exact credibility situations, so that the premium estimation is simpler than we would expect, with easy interpretation.
For claim counts we consider a Poisson random variable, with random parameter and distributed as a mixture (A.1) (in the appendix). For the claim severities, we consider an exponential random variable whose parameter is random, distributed as a mixture of a degenerate distribution and a Gamma (see end of Section 3).
As a general case, consider that the prior distribution is a finite mixture of distributions of family (4.2) such that
where ω i , i = 1, · · · , η, are given weights.
Theorem 4.1 Suppose that given Θ = θ, the observable vector of i.i.d. random variables X = (X 1 , . . . , X n ) have common probability function given by (4.1), and that the prior distribution of Θ, π(θ), is of the form given by (4.3). Then, the posterior distribution, denoted as π(θ|x) with x = {x 1 , . . . , x n }, is of a mixture form as (4.3):
(4.7)
Proof. With observations X = x, the posterior distribution is
.
From the posterior distribution, we calculate the mean, and thus we can calculate the Bayesian premium, as an estimate for the risk premium [see Klugman et al. [2012] , Chapters 17 and 18] defined as E[X|θ] = µ(θ). The Bayesian premium is given by estimate for next rating period, n+1, E[X n+1 |X = x] (with n, X and x as defined in Theorem 4.1) and can be calculated via the posterior distribution π(θ|x), as
Whenever this expectation is a linear function on the observations we have exact credibility and we can write explicitly the estimate as a weighted average of the form
where w is the weight, function of n,x is the empirical mean of the observations and E[µ(θ)] is the (known) collective or manual premium. As said in Remark 3.1, we can calculate the premium components, separately for the claim counts and severity. Thus, next we are going to consider the claim frequency and then the severity component.
If we consider a prior to be a Gamma mixture of the form given by (A.1), we reach to a posterior with a similar mixture, with updated parameters. This is stated in Lemma 4.2 that follows.
Lemma 4.2 Let the prior distribution be (A.1). With a Poisson model distribution, the posterior distribution is still a mixture of Gamma distributions, with updated parameters:
. . , n m } is the vector of claim count observations and m is the sample size ( j · = m j=1 ·).
For a fixed individual claim size, The pure premium estimator will be considered as the posterior mean of the claim frequency component, i.e.,
where w is given by (4.10). We note that the premium estimate in (4.11) does not have the credibility form as it may look at first sight (see [Klugman et al., 2012, Chapters 17 and 18] ). The G(·) function depends on the vector n, through a Beta function, so we do not have a posterior linearity here. Furthermore, due to Stirling's formula we have that the ratio of the Gamma functions Γ(n + a)/Γ(n + b) ∼ n a−b as n → ∞, allowing us to write that the function
In fact, the Bayesian premium calculated is a mixture of two credibility components. For instance, the first component can be split into form given by (4.8):
It means it can be viewed as the credibility premium, as if there were only historical claims. Similarly, j n j +α 1 +α 2 m+β gives a corresponding formula when considering the existence of an unforeseeable stream. However this component keeps information on the historical/foreseeable stream through quantities α 1 and β.
For the severity component, when claims are exponentially distributed with parameter Θ, random variable, we can set the prior as
where ∆ θ ({µ}) = 1 {µ} (θ) is the Dirac measure, and ν is as given in (3.2). Given Θ = θ, the conditional distribution of a single severity is exponential with mean 1/θ. Thus, the posterior is also a mixture.
We are calculating a premium estimate for the severity component only, based on the observed single quantities. Let's consider that the sample is generically of size m * and the observation vector is y = {y 1 , . . . , y m * }. If the sample size of claim counts is m, then m * = m j=1 n j , n j ≥ 1. The posterior distribution is set in the following lemma and the premium form is given in (4.16).
Lemma 4.3 Let the prior distribution be (4.13) and the conditional distribution of a single severity, given Θ = θ, be exponential with mean 1/θ. The posterior distribution is still a mixture distribution in terms of the prior form with updated parameters, such that
(4.14)
where ω = 1 1 + ϕ(ν, µ, δ, σ, y) (4.15)
with ν as given in (3.2), y = {y 1 , . . . , y m * } and i · = m * i=1 ·.
As in (4.11), the posterior mean does not exhibit linearity in the observations. The Bayesian estimator of the severity component is given by the weighted average between the mean of the exponential random variable with parameter (µ) and the mean of the posterior Gamma(m * + δ, σ + i y i ) random variable, namely
where ω is defined in (4.15). Interpretation of Formula (4.16) is similar to that of (4.11).
Remark 4.1 If m * = 0 then by convention, i y i = 0 and ϕ(ν, µ, δ, σ, y) ∼ 1 − ν ν .
Bayesian premium P m+1 is an estimate for the next rating period m + 1 and it can be derived from (4.11), (4.16), (4.10) and (4.15), as
In this formula we have a set of prior parameters that are most often unknown, and they need to be estimated from observed data, leading to the Empirical Bayesian Premium. This is not an easy task, especially when we have to deal with mixtures of distributions, meaning a large number of parameters to estimate.
In this section, we explain how we employed the Expectation-Maximization (EM) algorithm to estimate the prior parameters of our model based on a data set from a Portuguese insurer. Unfortunately we could not find a dataset having both the claim counts and the corresponding severities. Often data is recorded on an aggregate level. The implementation of the algorithm depends on the distribution choice. We assumed the use of a mixed parametric distribution for the severity as an illustration for our proposed model. Since we are dealing with mixed distributions, the direct use of the Maximum Likelihood Estimation method is not always computationally tractable. We employ the EM algorithm, to find best fit estimates. Generally speaking, it is an iterative method to find estimates for model parameters when dealing with incomplete data, missing data points, or unobserved (hidden) latent variables. See Dempster et al. [1977] and Couvreur [1997] . Estimating parameters for mixed distributions can be considered as a case with unobserved latent variables. It works by initializing parameters according to which probabilities for each possib value of the latent variable can be computed. Then the probabilities of the latent variable are used to derive better estimates of the parameters. The process continues until convergence.
We were provided with a quarterly claim count dataset from a Portughese motor insurance portfolio. Namely, it records the total number of claims arising from the portfolio every quarter and there were a total of approximately 180 quarters recorded. Therefore, we could treat each entry as an observation for N (t) for a fixed t which stands for a quarter here.We start to write N for short in the sequel since N (t) is a random variable for fixed t. We took care of the Third Party Liability claims only as those are the obligatory components for a car insurance policy. It was assumed that the portfolio is closed over the underlying period and that claim counts for each quarter are independent observations for N . Table 1 shows a brief summary of the data under consideration. The last two columns show the standard deviation and the coefficient of variation for this dataset. Its distribution can be also visualised Figure 1 . Clearly, data indicates a separation around 6000, which serves as a clue for the adoption of a mixture model as we theoretically derived above. Next, we explain the estimation procedure.
Claim frequency component
Recall that we work with a mixture model and that we only observe a global N i ∈ N, we mean, we do not know which negative binomial distribution it comes from. Here, we introduce a latent variable, denoted as Z, representing the missing information regarding the provenience of each observation. Since we only have two mixed distributions, Z Bernoulli(p) is a Bernoulli random variable with P{Z = 1} = q = 1 − P{Z = 0}. Now, the complete information is given by the vector {N, Z}. We can write the complete likelihood function as follows. Here, θ ∈ {α 1 , α 2 , β, p} are the parameters we are interested in estimating for the claim count distribution. Correspondingly, the log-likelihood function is given by, from above,
We summarize how the algorithm works. It is an iterative process where each iteration consists of two steps, the E-step and the M-step, standing for Expectation and Maximisation, respectively.
(0) = {α (0) 1 , α (0) 2 , β (0) , p (0) }.
For the (l + 1)-th iteration, l = 0, 1, . . . , we first seek for the expected value of Z i conditional on the observations together with the current parameter estimates θ (l) , i.e., estimates from the previous l-th iteration. This is denoted as τ i ,
Subsequently, based on Expression (5.1), we compute the expectation of the log-likelihood function with respect to the conditional distribution of Z, given N under the current estimates θ (l) , denoted as Q(θ|θ (l) ). Considering we have we have m independent observations, we have
The maximisation step is set to find the parameter values that maximises function (5.2) and they become the estimates to be used in the next iteration, i.e.,
For this, we take the gradient of Q(θ|θ (l) ), equate to zero and solve for {α 1 , α 2 , β, p} simultaneously.
where (·) is the digamma function denoting the logarithmic derivative of a gamma function, i.e.,
The estimates for the current iteration, i.e., the (l+1)-th, will be the solutions of the above equations. Note that Equation (5.4) depends only on parameter p, thus it can be solved directly with explicit representation
For the other three parameters, we provide numerical results. We employ the nleqslv R package, which solves systems of non-linear equations. As a consequence, we can obtain estimated parameters at this iteration θ
Initiating values using the method of moments yields α Based on these parameters, we add theoretical density to the histogram as shown in Figure 2 . Visually it appears to be a good fit. Note that, however, this result stemmed from initial values being derived from moments. In addition, we found that estimates vary much with different chosen initial values. For instance, if we begin with α (0) 1 = 150; α (0) 2 = 20; β (0) = 0.02, convergence happens only within the 308 th iteration, at the same tolerance level as above. Nevertheless, the corresponding estimates lie closer to the initial values. α 1 = 141.98069243; α 2 = 28.02122426; β = 0.02773337, p = 0.5723845.
As can be seen in Figure 2 , we could already tell that most likely it does not provide a better fit than the previous one.
On the other hand, the Kolmogorov-Smirnov, Anderson-Darling and Cramér-Von Mises test results are summarised in Table 2 . In the former case, i.e., when initial values were obtained via method of moments, all p-values are big. That is to say, we do not have enough evidence to reject the null hypothesis that the observed data agree with the proposed model. On the contrary, none of the tests present p-values greater than 0.01 for the second example, i.e., an arbitrarily chosen set of starting values. Therefore, we could conclude the second model does not fit the data well even at 1% significance level. 
As we said before, we do not have the claim severity data corresponding to the claim counts, so we first simulated them based on the claim counts used earlier. Then we have for claim counts in each period followed by a sequence of claim sizes randomly generated according to (3.2) when f (·) and g(·) take Exponential(µ) and P areto(δ, σ) forms, respectively.
With varying values of the shape parameter in the Pareto part, we considered two separate scenarios when generating claim size data:
(1) Shape parameter δ > 1, i.e., finite mean;
(2) Shape parameter δ ≤ 1, i.e., infinite mean.
For illustration purposes, we adopted δ = 2 and δ = 0.3, respectively, for claim costs simulations. It is well-known that the Pareto distribution in the first scenario has finite mean, whereas it has infinite mean in the second scenario.
Before proceeding to the EM steps, let us look into the parameter ν. In fact, ν is connected to the parameters in the claim frequency component. Therefore, once the sample of claim counts is given, we would get an estimated value for ν. Recall from previous sections that,
If we substitute in (5.5) the estimated values of p, α 1 , α 2 , we could obtain that the point estimation for ν would be ν = 0.9039196. ν could then be treated as known for now so that we can use it in the claim costs simulation. Thus, we are ready to implement the steps of EM algorithm for estimating parameters in the claim severity model. 1. We begin with an initially determined parameter values ϑ (0) = {µ (0) , δ (0) , σ (0) }.
For the (l + 1)-th iteration, l = 0, 1, . . ., we first seek for the expected value of the random value U i , representing the latent variable, conditional on the observations together with the current parameter estimates ϑ (l) , i.e., estimates from the l-th iteration. Let τ i denote this expectation
Subsequently, we compute the expectation of its log-likelihood function with respect to the conditional distribution of U given Y under the current estimates ϑ (l) . Considering that we have m * independent observations, we have,
The maximisation step is set to find the parameter values that maximises (5.6), i.e.,
In order to do this, we take the gradient of Q(ϑ|ϑ (l) ), equate to zero and solve the system for {µ, δ, σ} simultaneously.
First note that implementing the EM algorithm to find the estimateν is very similar to that applied to p in Subsection 5.2. Recall that the partial derivative equation with respect to p in that subsection is independent from all other variables. A similar situation exists here for ν. Note that it does not affect the remainder of the equations. As so, we can find
The estimates for the subsequent iteration (l + 1)-th are the solutions to the above equations. It is also obvious that µ is independent from other parameters and could be solved directly with an explicit representation
For the other two parameters, we could only solve numerically. Again we apply the nleqslv package in R. As a consequence, we can derive estimated parameters at this iteration ϑ (l+1) = {µ (l+1) , δ (l+1) , σ (l+1) }.
4. Plug ϑ (l+1) into the (l + 2)-th iteration and repeat the above steps until convergence.
Then, we implemented the algorithm and were able to achieve the desired parameters within reasonable amount of iterations. In Table 3 and Table 4 we show our estimates against the predefined parameters in the simulation scenario with δ > 1 and δ ≤ 1, respectively. This verifies the effectiveness of our algorithm. The tables have demonstrated satisfactory results using the EM algorithm for mixed distribution of the claim severity component. We would like to point out, however, that the algorithm is highly sensitive to the chosen initial values. Some starting values could even lead to no solutions to the non-linear equations to be solved in the algorithm. But since we knew the true parameter values here, we were able to begin with a relatively reasonable initial 'guess' of the parameter values. In the case of applying it to real data, similar to estimating the claim frequency component explained in the previous section, the method of moments could be adopted in the beginning. Figure 3 shows how the parameter estimates evolved over iterations in the EM algorithm. Similarly, we can visualize how the distribution is fitted to the claims from the histogram with the fitted density. On the top plot in Figure 4 , we not only show the fit of the mixed distribution, but also the fits using an Exponential as well as a Pareto distribution to the simulated data without extreme claims, i.e., δ = 2.
However, the goodness-of-fit is not what we would like to address here, because the claim costs data were simulated. We are more interested in the tail behaviours using different models. The tail behaviour graphs are plotted under log-log scale in both Figure 4 and Figure 5 , from which we can clearly see that our mixed model provides the heaviest fitted tails regardless whether the claim data contain extreme values or not. It implies that the use of mixed distribution to fit the claims leads to a better capture of information in the tails. In other words, the mixed distribution is more sensitive in detecting large claims, which reflects our motivation for this work. 
With the estimated parameters, we can then calculate the Bayesian premiums according to the theoretical results discussed in Section 4. To clarify, by Bayesian premium, we refer to the mean of the posterior distributions. Under our setting, the posterior for both the frequency and severity are mixed distributions. By choosing mixed conjugate priors that are in the Exponential family, we were able to show that the posterior distribution is also a mixture with updated parameters which are dynamically adjusted by incoming claims. As a reminder, we proposed the use of a mixture of two Negative Binomial distributions for the frequency, and a mixture of an Exponential and a Pareto distribution for the severity. To illustrate our proposed model, we also calculated Bayesian premiums (posterior means) using other common models, i.e., when claim counts are fitted by Negative Binomial, whereas claim severities are fitted by Exponential or Pareto, as we did in the severity data fitting. All models under comparison are listed in Table 5 . We can thus compute all their corresponding posterior means for each period based on the observed claim counts and simulated costs over time. Table 6 and Table 7 display the posterior means for the first 10 periods under the two separate cases distinguished by the values of the parameter δ. Note that when the shape parameter δ ≤ 1 originating from the Pareto distribution, the claims can explode to infinity. Hence, very large values can be seen from Table 7 , and the claim counts are omitted because the posterior means are mostly driven by the claim costs. In addition, fitting an Exponential distribution to these claims would result in the parameter being virtually zero. That is also why there is no 'Exponential' model in Table 5 or 'Exp' column in Table 7 For a better understanding of the differences among different models, we present in graphs the changes of premiums overtime. Figure 6 demonstrates the first scenario when there are no extreme Period Par (2a) Mix (2b) Costs 1 3.258448e+09 3.256148e+09 3.255862e+09 2 1.717028e+14 1.716975e+14 3.431870e+14 3 1.145418e+14 1.145447e+14 2.808137e+11 4 8.589659e+13 8.589740e+13 1.786957e+09 5 6.871266e+13 6.871307e+13 4.558560e+07 6 5.726841e+13 5.726965e+13 5.845177e+10 7 4.908520e+13 4.908535e+13 7.294295e+08 8 4.294886e+13 4.294869e+13 3.949388e+09 9
3.817744e+13 3.817783e+13 9.165001e+09 10 3.457031e+13 3.457120e+13 2.107256e+12 claims. Figure 7 is the graphical representation of the quantities in Table 7 . In Figure 6 , the top graph contains claim counts and costs per period as well as the posterior means obtained from Model 1a, Model 1b, and Model 1c, respectively. In general, the differences among the three models are not obvious in the first plot. So the bottom two figures show the exact differences between the pairs we are interested in, i.e., 1a vs 1c and 1b vs 1c. Comparing our mixed model (1c) with the Exponential only one (1a), we can see significant discrepancies over time. Matching them with the trend of the claim counts/costs, we can conclude that the mixed model provides higher premiums when there is an increasing trend in claims (e.g. from period 10 to 50), while it immediately drops below the premium suggested by the Exponential model as soon as a decreasing trend is observed (e.g. from period 100 to 150). That has reflected a quick response in the premium adjustment of the mixed model.
There are no such evident difference between the mixed model (1c) and the Pareto only model (1b) overall, as can be seen in the graph at the bottom. Nevertheless, the mixed model gives slightly higher premiums when there is a surge in the claims around period 10. Another main difference is that the mixed model serves lower premiums at the very beginning compared to the Pareto model. It matches with our original intention that no punishment should be there for no claims.
To sum up, these results have shown support for our proposal of the mixed model. On the one hand, we would like to keep the promise of not increasing premium charges until we have evidence of risks. On the other hand, the premium adjustment to actual evidence is sensitive and spontaneous. Figure 7 exhibits the premiums (posterior means) obtained from Model 2a and 2b, respectively. They have demonstrated very similar trends overall according to the claim costs behaviours. When there is a big jump in the claim severity, e.g. around period 47, both models are able to provide a surge in the premiums instantaneously. However, due to the large scale of claim severities, we could not see clearly the difference between the two models from the top two graphs. The third plot was thus generated at the bottom. As can be seen here, the mixed model in this case actually advocates lower premiums when the claim costs are extreme, compared to the Pareto model. It could be an effect stemming from the mixture with the Exponential distribution. However, from the practical point of view, the premiums would probably be capped at a level anyway when the scale is that large.
We have been discussing the mean values only. Since we have derived the posterior distributions, it would be interesting to visualize other statistics, such as the inter-percentile ranges (IPR). Note that the IPR is a reflection of the variance of the posterior distribution, and is also referred to as the (1 − α)% credibility interval under the Bayesian context. We will be using both terminologies interchangeably in the sequel. Here we have sketched the 90% credibility interval (5-95 IPR) for the first scenario, i.e., for Model 1a, 1b and 1c in Figure 8 . That includes the 90% possible values in the center for the risks. As shown in the graph, all three models have premium values lie very close to each other, with Exponential (red) to be more distinct from the other two. Overall, the credibility interval differ more at the very beginning possibly due to insufficient data collected. Exponential has essentially the narrowest credibility interval amongst the three models. For comparison between the actual values of the 90% credibility interval between model 1b and 1c, see Figure 9 . Except for a significantly small credibility interval at the very beginning, they have exhibited no difference in the variation. This has, however, offered us with one more reason to choose the mixed model: fewer uncertainties are preferred when assessing risks.
In the extreme case, we drew a graph of comparison in a similar way. As a result, we can observe a smaller variation at the beginning and also when the claims explode. Again, it shows support for the mixed model from the smaller variance perspective, especially when other premium principles (e.g. the variance premium principle) are used instead of the pure premium principle adopted in our setup.
Based on the numerical results and comparison with other commonly used models, we can make a few summary statements. On the one hand, we proposed a kind of zero-inflated model that can be more practically employed by actuaries. According to the dataset considered here, the estimated probability of zeros per period is approximately 60%, which is larger than traditional models. That implies a lower initial premiums which could facilitate the sales of policies. On the other hand, even though our model assesses the risks by allowing for more excess of zeros, we have set up a mechanism under the Bayesian framework such that the measurement of risks can be adjusted in a timely manner to the observed extreme events. Premiums suggested by the model will dynamically and automatically modify to incorporate the potential risks involved. In addition, the uncertainties involved in estimating risks are relatively small in our model. Therefore, our model could be useful in practice for its ability of sensitive detection of risks and efficient adjustment to risk measurement. Early detection of risky behaviours in policyholders would be most valuable for an insurer. This particularly applies to innovative policies covering e.g., autonomous cars and COVID-19, where initial information is very little or missing and discernment to potential risks is needed.
In the previous sections, we were considering the independence between the claim frequency and severity components. It would be opportune to investigate the effect of dependence between the two quantities. One possible consideration has been done in Cheung et al. [2019] by adopting a conjugate bivariate prior distribution. Here, we will briefly introduce the idea of implementing a global likelihood in this section which takes into account the two components simultaneously for parameter estimations.
In general, a random sample will be composed by a sequence of m independent pairs of de-
where N i represents the number of claims in the i-th period and − → Y i = (Y i1 , . . . , Y in i ) is the corresponding sequence of claim severities. It is clear that if we consider in general that both claim counts and severities may bring information about each stream, foreseable or unforeseable, we should consider that stochastic dependence between N i and corresponding − → Y i is present. However, they are conditionally independent, given Λ = Λ i (i = 1, 2) that is, for each individual stream we can consider the classical assumption of independence between claim counts and severities.
Observed values are represented by corresponding lower case letters (n i , − → y i ). We also note that in each pair the dimension of vector − → y i depend on the observed n i . Now, we could write a likelihood function considering the joint random vector (N, − → Y ) assuming we have m groups of observations and conditional independence of each Y ij , j = 1, . . . , n i , for a given i:
where P(n i ) = P(N = n i ), for simplification. For our model, we can write the corresponding global log-likelihood function, denoted as L(ϑ|n, − → y ).
If we let claim counts conform to Lemma 2.1 and claim severities follow (3.2), i.e. f (·) and g(·) are respectively Exponential and Pareto densities, we have
Instead of building a likelihood function based on a sample of observations of the pair (N, − → Y ), we can build it using inter-arrival time and corresponding severity, where each observation is a bivariate pair, denoted as (T j , Y j ), of dependent random variables, in general. Let's denote the density and the distribution function of T j by φ(·) and Φ(·), respectively.
For finding the distribution of T j recall that, conditional on Λ = λ, {N (t)} is a Poisson process with intensity λ. Then, given Λ = λ, conditional interarrival time T j |Λ = λ are exponentially distributed, with mean λ −1 . Whenever the Poisson parameter is an outcome of a random variable Λ and it is distributed as (A.1), we have that the unconditional distribution of T j is a mixture of two Pareto distributions whose density is given by
On the other hand, the density function of Y j , conditional on a given Ξ = ξ, is given by the mixture, see (3.1), h ξ (y j ) = ξf (y j ) + (1 − ξ)g(y j ) , (6.2) and the unconditional density is given by (3.2). In particular, we assumed in our model that f ∼ exp(µ), g ∼ P areto(δ, σ). From Remark 3.1, we know that for Ξ = ξ fixed, T j and Y j are independent. A random sample of observations are made of independent pairs (Y j , T j ), each j of dependent Y i and T i . Each pair, j, has density function
where A(ξ) stands for the distribution function of Ξ.
Note that that we separated the situations ξ = 1 and ξ = 1. Also, the equivalent events are{Ξ = 1} ⇔ {Λ (2) = 0}, implying that P r{Ξ = 1} = P r{Λ (2) = 0} = p. Although we consider the unconditional distribution of the arrival time (unconditional of Λ), we consider the conditional distribution for the individual claim size Y , given Ξ = ξ. Λ (1) , given as a proportion of Λ, remains random and it means that the distribution of Λ (1) is a scaled distribution of that of Λ, or vice versa. Looking at the density h ξ (y i ) we see that the split rate ξ gives the weight for the foreseeable stream claim amount, and looking at the density φ(y j ) we could think that the probability p gives a similar meaning regarding the claim count stream. It does not seem to be the case, as it is not clear that the second part in the mixture represents the unforeseeable only.
Returning to the joint density (6.3), we build the likelihood function over m * pairs of observations (m * may be different from sample size m from random vector (N, − → Y ) above)
where Beta(ξ; α 1 , α 2 ) denotes the Beta density function of Ξ, given Ξ = 1, and α 1 βα 1 (β+t i ) α 1 +1 is the density φ(t j ) when ξ = 1. Note that we cannot interchange the product ( m * i=1 ) and the integral.
To conclude, on the model and the estimation procedure, this article has carried out a development and subsequent parameter estimation for the so-called unforeseeable risks discussed in Li et al. [2015] for the claim counts arrival process. Precisely, for these risks, a probability p has been assigned at mass point {0} so that their corresponding counting process is distinguished from the classical one. Since we could only observe the entire claim counts from an insurance portfolio, this missing information could be estimated using the EM algorithm. Under certain assumptions for the distribution of heterogeneities within the portfolio (which was denoted as Λ in this work), we could derive the randomness of the total claim counts given a fixed period to be a Negative Binomial mixture distribution. Thus, the likelihood function could be presented explicitly via the EM algorithm. We introduced a similar modelling to account the unforeseeable effect in the claim severity as well, by choosing a particular mixture distribution. This ended up with the existence of some common parameters inserted in the severity distribution to those of the claim counts one. This intends to show somehow the extra and common effect of an unforeseeable risk effect in both number of claims and severity.
When implemented on a data set of claim counts for the third party liability insurance portfolio, from a Portuguese automobile insurer, the resulting estimates show high sensitivity to the chosen initial values. Hence, we employed starting values which were computed via method of moments. All the Kolmogorov-Smirnov, Anderson-Darling and Cramér-Von Mises tests suggest a good fit on the observed data.
Concerning the claim severity component, due to lack of real data, we randomly generated data based on proposed mixed distribution and separated into two cases depending on whether the mean values are finite or infinite. We verified the EM algorithm by comparing with the true parameter values used in the simulation procedure.
When comparing with other traditional models, our model stands out for offering lower starting premia, faster adjustment to claim changes, and baring smaller variation in the resulting values. These are valuable features in practice and would be especially useful for pricing innovative policies covering such as autonomous cars or COVID-19.
In our model we could consider the calculation of Bayesian and credibility premia separately for claim counts and severities, due to the independence situation between these two random variables. However, it would be feasible to compute a premium where we estimate parameters (α 1 , α 2 , β, µ, δ, σ, p) altogether, using a likelihood where N and Y are jointly distributed. We will refer to it as the global likelihood function and it will serve as a direct extension of the current work (as discussed).
Estimating a premium taking into account both foreseeable and unforeseeable risks not only makes the premium fairer, but also helps not underestimating portfolio's ruin probabilities. We know that this corresponds to a weighted average of two Negative Binomial distributions, with weights p and 1 − p respectively.
Proof. Proof of Lemma 2.2. Recall that given Λ = λ, P{N = n|Λ = λ} = e −λ λ n /n!. Now we integrate over Λ whose pdf, denoted as π(.), can be written as π(λ) = p · λ α 1 −1 β α 1 e −βλ Γ(α 1 ) + (1 − p) · λ (α 1 +α 2 )−1 β α 1 +α 2 e −βλ Γ(α 1 + α 2 ) .
(A.1)
Hence, P{N = n} = Λ e −λ λ n n! p · λ α 1 −1 β α 1 e −βλ Γ(α 1 ) + (1 − p) · λ (α 1 +α 2 )−1 β α 1 +α 2 e −βλ Γ(α 1 + α 2 ) dλ = p · Λ e −λ λ n n! λ α 1 −1 β α 1 e −βλ Γ(α 1 ) dλ + (1 − p) · Λ e −λ λ n n! λ (α 1 +α 2 )−1 β α 1 +α 2 e −βλ Γ(α 1 + α 2 ) dλ = p n + α 1 − 1 n β β + 1 α 1 1 β + 1 n +(1 − p) n + α 1 + α 2 − 1 n β β + 1 α 1 +α 2 1 β + 1 n . This distribution coincides with the one shown in Lemma 2.1.
Proof. Proof of Lemma 4.2. Under the observations n = {n 1 , . . . , n m }, π(λ|n) = j e −λ λ n j n j ! p · λ α 1 −1 β α 1 e −βλ Γ(α 1 ) + (1 − p) · λ (α 1 +α 2 )−1 β α 1 +α 2 e −βλ Γ(α 1 +α 2 ) Λ j e −λ λ n j n j ! p · λ α 1 −1 β α 1 e −βλ Γ(α 1 ) + (1 − p) · λ (α 1 +α 2 )−1 β α 1 +α 2 e −βλ Γ(α 1 +α 2 ) dλ = p · λ j n j +α 1 −1 β α 1 e −(m+β)λ Γ(α 1 ) + (1 − p) · λ j n j +(α 1 +α 2 )−1 β α 1 +α 2 e −(m+β)λ Γ(α 1 +α 2 ) p · Γ( j n j +α 1 ) Γ(α 1 ) β β+m α 1 1 β+m j n j + (1 − p) · Γ( j n j +α 1 +α 2 ) Γ(α 1 +α 2 ) β β+m α 1 +α 2 1 β+m j n j = 1 1 + G(p, α 1 , α 2 , β, n) · (β + m) j n j +α 1 λ j n j +α 1 −1 e −(m+β)λ Γ( j n j + α 1 ) + G(p, α 1 , α 2 , β, n) 1 + G(p, α 1 , α 2 , β, n) · (β + m) j n j +α 1 +α 2 λ j n j +α 1 +α 2 −1 e −(m+β)λ Γ( j n j + α 1 + α 2 ) .
The result is as described.
Proof. Proof of Lemma 4.3. Under the observations y = {y 1 , . . . , y m * }, and let Π Θ (·) be the distribution function of Θ
ν µ m * e −µ i y i + (1 − ν) Γ(m * +δ)σ m * +δ Γ(δ)(σ+ i y i ) m * +δ = 1 1 + ϕ(ν, µ, δ, σ, y) ∆ θ ({µ}) + ϕ(ν, µ, δ, σ, y) 1 + ϕ(ν, µ, δ, σ, y) (σ + i y i ) m * +δ θ m * +δ−1 e −(σ+ i y i )θ Γ(m * + δ) .
The result is as described.