# Estimating Tail Probabilities of Random Sums of Phase-Type Scale Mixture Random Variables +
## 5 Numerical Experiments
: _Let \(W_{i}\overset{i.i.d}{\sim}\operatorname{\mathit{Exp}}(\mu)\) be the scaling random variable, with PDF_  
\[h(w_{i})=\mu\operatorname{e}^{-\mu w_{i}},\ \ w_{i}\geq 0\,,\]  
_and consider \(X_{i}\overset{i.i.d}{\sim}\operatorname{\mathit{Erlang}}(k,\beta)\), with PDF_  
\[f(x_{i})=\frac{\beta^{k}x_{i}^{k-1}\operatorname{e}^{-\beta x_{i}}}{(k-1)!},\ \ x_{i}\geq 0\,,\]  
_where \(i=1,\ldots,N\)._  
_The Erlang distribution is the same as a gamma distribution with the shape parameter being an integer._  
_(1) When conditioning on the scaling random variable, the resulting exponentially-twisted PDF is_  
\[h_{\theta}(w)=\mu_{\theta}\operatorname{e}^{-\mu_{\theta}w},\ \ w\geq 0\,,\]  
Figure 1: The random variable \(N\) is geometrically distributed with success probability \(p=0.2\), \(W_{i}\overset{i.i.d}{\sim}\operatorname{\mathit{Exp}}(1)\), \(X_{i}\overset{i.i.d}{\sim}\operatorname{\mathit{Erlang}}(1,3)\), where \(i=1,\ldots,N\). Green circles: ConAK1. Red stars: ConAK1+CV. Black dots: ConAK1+IS (conditioning and IS on exponential). Cyan diamonds: ConAK1+IS+CV (conditioning and IS on exponential). (**a**) Estimates of \(\ell(u)\) as a function of \(u\) on a logarithmic scale. (**b**) Empirical logarithmic rates as a function of \(u\). (**c**) Empirical relative errors as a function of \(u\). Figure 2: The random variable \(N\) is geometrically distributed with success probability \(p=0.2\), \(W_{i}\overset{i.i.d}{\sim}\operatorname{\mathit{Weibull}}(0.35,2)\), \(X_{i}\overset{i.i.d}{\sim}\operatorname{\mathit{Erlang}}(2,3)\), where \(i=1,\ldots,N\). Green circles: ConAK2. Red stars: ConAK2+CV. Black dots: ConAK2+IS (conditioning and IS on Erlang using an exponential PDF). Cyan diamonds: ConAK2+IS+CV (conditioning and IS on Erlang using an exponential PDF). Cyan diamonds: ConAK2+IS+CV (conditioning and IS on Erlang using an exponential PDF). (**a**) Estimates of \(\ell(u)\) as a function of \(u\) on a logarithmic scale. (**b**) Empirical logarithmic rates as a function of \(u\). (**c**) Empirical relative errors as a function of \(u\). _where \(\mu_{\theta}<\mu\). Hence, the likelihood ratio is given by_  
\[\frac{h(W_{N})}{h_{\theta}(W_{N})}=\frac{\mu}{\mu_{\theta}}\,\mathrm{e}^{-(\mu- \mu_{\theta})\,W_{N}}\,.\]  
_The choice of \(\mu_{\theta}\), conditioning on \(N\), is determined by solving \(\zeta^{\prime}(\theta(N))=\frac{Z_{N-1}^{\star}\vee(u-S_{N-1})}{\mathbb{E}[X_ {N}]}\) using \(\zeta(\theta(N))=\ln\frac{\mu}{\mu-\theta(N)}\), resulting in \(\theta(N)=\mu-\frac{\mathbb{E}[X_{N}]}{Z_{N-1}^{\star}\vee(u-S_{N-1})}\), and \(\mu_{\theta}=\frac{\mathbb{E}[X_{N}]}{Z_{N-1}^{\star}\vee(u-S_{N-1})}\). The likelihood ratio for (7), conditioning on \(N\), is given by_  
\[\frac{h(W_{N})}{h_{\theta}(W_{N})}=\frac{(Z_{N-1}^{\star}\vee(u-S_{N-1}))\beta \mu}{k}\,\mathrm{e}^{-\left(\mu-\frac{k}{\beta(Z_{N-1}^{\star}\vee(u-S_{N-1}) )}\right)W_{N}}\,.\]
2. _When conditioning on the_ \(PH\) _random variable, the resulting PDF of the Erlang random variable is Erlang_\((k,\beta_{\theta})\)_. Then, the likelihood ratio is given by_ \[\frac{f(X_{N})}{f_{\theta}(X_{N})}=\left(\frac{\beta}{\beta_{\theta}}\right)^ {k}e^{-(\beta-\beta_{\theta})X_{N}}\,.\] _We solve_ \(\zeta^{\prime}(\theta(N))=\frac{Z_{N-1}^{\star}\vee(u-S_{N-1})}{\mathbb{E}[W_ {N}]}\) _using_ \(\zeta(\theta(N))=k\ln\frac{\beta}{\beta-\theta(N)}\)_, conditioning on_ \(N\)_, resulting in_ \(\theta(N)=\beta-\frac{k\mathbb{E}[W_{N}]}{Z_{N-1}^{\star}\vee(u-S_{N-1})}\)_, and_ \(\beta_{\theta}=\frac{k\mathbb{E}[W_{N}]}{Z_{N-1}^{\star}\vee(u-S_{N-1})}\)_. The likelihood ratio for (_10_), conditioning on_ \(N\)_, is given by_ \[\frac{f(X_{N})}{f_{\theta}(X_{N})}=\left(\frac{(Z_{N-1}^{\star}\vee(u-S_{N-1} ))\beta\mu}{k}\right)^{k}\,\mathrm{e}^{-\left(\beta-\frac{k}{\beta(Z_{N-1}^{ \star}\vee(u-S_{N-1}))}\right)X_{N}}\,.\] _An alternative option is to perform importance sampling using the exponential PDF.