## reinsurance.occurrence_layer_statistics()


The statistics of [share](reinsurance.Layer.md#prospicio.reinsurance.Layer.share) of [limit](pricing.Quote.md#prospicio.pricing.Quote.limit) xs [attachment](reinsurance.Layer.md#prospicio.reinsurance.Layer.attachment) per


Usage


``` python
reinsurance.occurrence_layer_statistics(
    frequency, severity, share, limit, attachment
)
```


occurrence on a severity grid, as [aggregate](aggregate.Clash.md#prospicio.aggregate.Clash.aggregate)'s `reins_stats_df`.

The chances that a claim reaches the layer (`P(X > a)`, exclusive) and exhausts it (`P(X >= a + l)`, inclusive), and that the year has a loss to it; the excess count (the count thinned to the claims that reach the layer), the layer severity given a loss to it and the annual ceded loss, each by its first three cumulants; and the loss on line. The share scales the moments exactly.


## Parameters


`frequency: (Poisson, NegativeBinomial or Binomial)`  

`severity: Grid`  

`share: float`  
In `(0, 1]`.

`limit: float`  
May be `inf`; the loss on line is then 0.

`attachment: float`  


## Returns


`LayerStatistics`  


## Raises


`ValueError`  
For a share outside `(0, 1]`, a non-positive limit or a negative attachment.


## Examples

``` python
>>> from prospicio.reinsurance import occurrence_layer_statistics
>>> from prospicio.distributions import Grid, Poisson
>>> sev = Grid(1.0, [0.0, 0.4, 0.3, 0.2, 0.1])
>>> s = occurrence_layer_statistics(Poisson(3.0), sev, 1.0, 2.0, 2.0)
>>> round(s.pr_attach, 12), round(s.count.mean, 12), round(s.aggregate.mean, 12)
```

(0.3, 0.9, 1.2)
