Springer Actuarial Mario V. Wüthrich Michael Merz Statistical Foundations of Actuarial Learning and its Applications Springer Actuarial Editors-in-Chief HansjoergAlbrecher,UniversityofLausanne,Lausanne,Switzerland MichaelSherris,UNSW,Sydney,NSW,Australia SeriesEditors DanielBauer,UniversityofWisconsin-Madison,Madison,WI,USA StéphaneLoisel,ISFA,UniversitéLyon1,Lyon,France AlexanderJ.McNeil,UniversityofYork,York,UK AntoonPelsser,MaastrichtUniversity,Maastricht,TheNetherlands ErmannoPitacco,UniversitàdiTrieste,Trieste,Italy GordonWillmot,UniversityofWaterloo,Waterloo,ON,Canada HailiangYang,TheUniversityofHongKong,HongKong,HongKong Thisis a seriesonactuarialtopicsina broadandinterdisciplinarysense, aimedat students,academicsandpractitionersinthefieldsofinsuranceandfinance. Springer Actuarial informs timely on theoretical and practical aspects of top- ics like risk management, internal models, solvency, asset-liability management, market-consistent valuation, the actuarial control cycle, insurance and financial mathematics,andotherrelatedinterdisciplinaryareas. Theseriesaimstoserveasaprimaryscientificreferenceforeducation,research, developmentandmodelvalidation. The type of material considered for publication includes lecture notes, mono- graphsandtextbooks.Allsubmissionswillbepeer-reviewed. Mario V. Wüthrich (cid:129) Michael Merz Statistical Foundations of Actuarial Learning and its Applications MarioV.Wüthrich MichaelMerz DepartmentofMathematics,RiskLab FacultyofBusinessAdministration Switzerland UniversityofHamburg ETHZürich Hamburg,Germany Zürich,Switzerland ThisworkwassupportedbySchweizerischeAktuarvereinigungSAVandSwissRe. ISSN2523-3262 ISSN2523-3270 (electronic) SpringerActuarial ISBN978-3-031-12408-2 ISBN978-3-031-12409-9 (eBook) https://doi.org/10.1007/978-3-031-12409-9 MathematicsSubjectClassification:C13,C21/31,C24/34,G22,62F10,62F12,62J07,62J12,62M45, 62P05,68T01,68T50 ©TheAuthors2023.Thisbookisanopenaccesspublication. Open Access This bookis licensed under the terms of the Creative Commons Attribution 4.0Inter- nationalLicense(http://creativecommons.org/licenses/by/4.0/), whichpermitsuse,sharing,adaptation, distribution andreproduction inanymediumorformat,aslong asyougive appropriate credit tothe originalauthor(s)andthesource,providealinktotheCreativeCommonslicenseandindicateifchanges weremade. Theimages or other third party material in this book are included in the book’s Creative Commons license,unlessindicatedotherwiseinacreditlinetothematerial.Ifmaterialisnotincludedinthebook’s CreativeCommonslicenseandyourintendeduseisnotpermittedbystatutoryregulationorexceedsthe permitteduse,youwillneedtoobtainpermissiondirectlyfromthecopyrightholder. Theuseofgeneraldescriptivenames,registerednames,trademarks,servicemarks,etc.inthispublication doesnotimply,evenintheabsenceofaspecificstatement,thatsuchnamesareexemptfromtherelevant protectivelawsandregulationsandthereforefreeforgeneraluse. Thepublisher,theauthors,andtheeditorsaresafetoassumethattheadviceandinformationinthisbook arebelievedtobetrueandaccurateatthedateofpublication.Neitherthepublishernortheauthorsor theeditorsgiveawarranty,expressedorimplied,withrespecttothematerialcontainedhereinorforany errorsoromissionsthatmayhavebeenmade.Thepublisherremainsneutralwithregardtojurisdictional claimsinpublishedmapsandinstitutionalaffiliations. ThisSpringerimprintispublishedbytheregisteredcompanySpringerNatureSwitzerlandAG Theregisteredcompanyaddressis:Gewerbestrasse11,6330Cham,Switzerland Acknowledgments We kindly thank our very generous sponsors, the Swiss Association of Actuaries (SAA)andSwissRe,forfinancingtheopenaccessoptionoftheelectronicversion of this book. Our special thanks go to Sabine Betz (President of SAA), Adrian Kolly(SwissRe),andHolgerWalz(SAA)whowereverypositiveandinterestedin thisbookprojectfromtheverybeginning,andwhomadethisopenaccessfunding possiblewithintheirinstitutions. A very special thank you goes to Hans Bühlmann who has been supportingus overthelast30years.Wehavehadsomanyinspiringdiscussionsovertheseyears, and we have greatly benefited and learned from Hans’ incredible knowledge and intuition. JointlywithChristophBuser,wehavestartedtoteachthelecture“DataAnalytics forNon-LifeInsurancePricing”atETHZurichin2018.Ourdataanalyticslecture focuses(only)onthePoissonclaimcountscase,butitslecturenoteshaveprovided a first draft for this book project. This draft has been developed and extended to the generalcase of the exponentialfamily.Since our firstlecture, we have greatly benefited from interactions with many colleagues and students. In particular, we would like to mention the data science initiative “Actuarial Data Science” of the Swiss Association of Actuaries (chaired by Jürg Schelldorfer), whose tutorials providedagreatstimulusforthisbook.Moreover,wementiontheannualInsurance DataScienceConference(chairedbyMarkusGesmannandAndreasTsanakas)and the ASTIN Reading Club (chairedby Ronald Richman and Dimitri Semenovich). Furthermore,wewouldliketokindlythankRonaldRichmanwhohasalwaysbeen adrivingforcebehindlearningandadaptingnewmachinelearningtechniques,and wealsokindlythankSimonRentzmannformanyinterestingdiscussionsonhowto applythesetechniquesonrealinsuranceproblems. We thank the following colleagues by name (in alphabetical order). We col- laborated and had inspiring discussions in the field of statistical learning with the following colleagues: Johannes Abegglen, Hansjörg Albrecher, Davide Apol- loni, Peter Bühlmann, Christoph Buser, Patrick Cheridito, Łukasz Delong, Paul Embrechts,AndreaFerrario,TobiasFissler,LucaFontana,DaisukeFrei,TszChai Fung, Guangyuan Gao, Yan-Xing Lan, Gee Lee, Mathias Lindholm, Christian v vi Acknowledgments Lorentzen,FriedrichLoser,MichaelMayer,DanielMeier,AlexanderNoll,Gareth Peters, Jan Rabenseifner, Peter Reinhard, Simon Rentzmann, Ronald Richman, Ludger Rüschendorf, Robert Salzmann, Marc Sarbach, Jürg Schelldorfer, Pavel Shevchenko,JoëlThomann,AndreasTsanakas,GeorgeTzougas,EmilianoValdez, TimVerdonck,andPatrickZöchbauer. Contents 1 Introduction................................................................. 1 1.1 TheStatisticalModelingCycle ..................................... 1 1.2 PreliminariesonProbabilityTheory ................................ 3 1.3 Lab:ExploratoryDataAnalysis .................................... 7 1.4 OutlineofThisBook ................................................ 9 2 ExponentialDispersionFamily ........................................... 13 2.1 ExponentialFamily .................................................. 13 2.1.1 DefinitionandProperties .................................. 13 2.1.2 Single-ParameterLinearEF:CountVariable Examples ................................................... 18 2.1.3 Vector-ValuedParameter EF: Absolutely ContinuousExamples ...................................... 20 2.1.4 Vector-ValuedParameterEF:CountVariable Example .................................................... 27 2.2 ExponentialDispersionFamily ..................................... 28 2.2.1 DefinitionandProperties .................................. 28 2.2.2 ExponentialDispersionFamilyExamples ................ 31 2.2.3 Tweedie’sDistributions .................................... 34 2.2.4 SteepnessoftheCumulantFunction ...................... 37 2.2.5 Lab:LargeClaimsModeling .............................. 38 2.3 InformationGeometryinExponentialFamilies .................... 40 2.3.1 Kullback–LeiblerDivergence ............................. 40 2.3.2 UnitDevianceandBregmanDivergence ................. 42 3 EstimationTheory.......................................................... 49 3.1 IntroductiontoDecisionTheory .................................... 49 3.2 ParameterEstimation ................................................ 51 3.3 UnbiasedEstimators ................................................. 56 3.3.1 Cramér–RaoInformationBound .......................... 56 3.3.2 InformationBoundintheExponentialFamily Case ......................................................... 62 vii viii Contents 3.4 AsymptoticBehaviorofEstimators ................................ 67 3.4.1 Consistency ................................................ 67 3.4.2 AsymptoticNormality ..................................... 69 4 PredictiveModelingandForecastEvaluation........................... 75 4.1 GeneralizationLoss ................................................. 75 4.1.1 MeanSquaredErrorofPrediction ........................ 76 4.1.2 UnitDeviancesandDevianceGeneralization Loss ......................................................... 79 4.1.3 ADecision-TheoreticApproachtoForecast Evaluation .................................................. 88 4.2 Cross-Validation ..................................................... 95 4.2.1 In-SampleandOut-of-SampleLosses .................... 95 4.2.2 Cross-ValidationTechniques .............................. 98 4.2.3 Akaike’sInformationCriterion ............................ 103 4.3 Bootstrap ............................................................. 106 4.3.1 Non-parametricBootstrapSimulation .................... 106 4.3.2 ParametricBootstrapSimulation .......................... 109 5 GeneralizedLinearModels................................................ 111 5.1 GeneralizedLinearModelsandLog-Likelihoods ................. 112 5.1.1 RegressionModeling ...................................... 112 5.1.2 DefinitionofGeneralizedLinearModels ................. 113 5.1.3 LinkFunctionsandFeatureEngineering ................. 115 5.1.4 Log-LikelihoodFunction and Maximum LikelihoodEstimation ..................................... 116 5.1.5 BalancePropertyUndertheCanonicalLink Choice ...................................................... 122 5.1.6 AsymptoticNormality ..................................... 123 5.1.7 MaximumLikelihoodEstimation andUnit Deviances .................................................. 124 5.2 ActuarialApplicationsofGeneralizedLinearModels............. 126 5.2.1 SelectionofaGeneralizedLinearModel ................. 126 5.2.2 FeatureEngineering ....................................... 127 5.2.3 Offsets ...................................................... 132 5.2.4 Lab: Poisson GLM for Car Insurance Frequencies ................................................. 133 5.3 ModelValidation .................................................... 141 5.3.1 ResidualsandDispersion .................................. 141 5.3.2 HypothesisTesting ......................................... 145 5.3.3 AnalysisofVariance ....................................... 147 5.3.4 Lab: Poisson GLM for Car Insurance Frequencies,Revisited ..................................... 150 5.3.5 Over-DispersioninClaimCountsModeling ............. 155 5.3.6 Zero-InflatedPoissonModel .............................. 162 5.3.7 Lab:GammaGLMforClaimSizes ....................... 167 Contents ix 5.3.8 Lab:InverseGaussianGLMforClaimSizes ............. 173 5.3.9 Log-NormalModelforClaimSizes:AShort Discussion .................................................. 176 5.4 Quasi-Likelihoods ................................................... 180 5.5 DoubleGeneralizedLinearModel .................................. 182 5.5.1 TheDispersionSubmodel ................................. 182 5.5.2 SaddlepointApproximation ............................... 183 5.5.3 ResidualMaximumLikelihoodEstimation ............... 186 5.5.4 Lab:DoubleGLMAlgorithmforGammaClaim Sizes ........................................................ 187 5.5.5 Tweedie’sCompoundPoissonGLM ...................... 189 5.6 DiagnosticTools ..................................................... 190 5.6.1 TheHatMatrix ............................................. 190 5.6.2 CaseDeletionandGeneralizedCross-Validation ........ 192 5.7 GeneralizedLinearModelswithCategoricalResponses .......... 195 5.7.1 LogisticCategoricalGeneralizedLinearModel .......... 195 5.7.2 MaximumLikelihoodEstimationinCategorical Models ...................................................... 196 5.8 FurtherTopicsofRegressionModeling ............................ 198 5.8.1 LongitudinalDataandRandomEffects .................. 198 5.8.2 Regression Models Beyond the GLM Framework ................................................. 199 5.8.3 QuantileRegression ....................................... 202 6 BayesianMethods,Regularization andExpectation-Maximization........................................... 207 6.1 BayesianParameterEstimation ..................................... 207 6.2 Regularization ....................................................... 210 6.2.1 MaximalaPosteriorEstimator ............................ 210 6.2.2 Ridgevs.LASSORegularization ......................... 212 6.2.3 RidgeRegression .......................................... 215 6.2.4 LASSORegularization .................................... 217 6.2.5 GroupLASSORegularization ............................ 226 6.3 Expectation-MaximizationAlgorithm .............................. 230 6.3.1 MixtureDistributions ...................................... 230 6.3.2 IncompleteandCompleteLog-Likelihoods .............. 232 6.3.3 Expectation-MaximizationAlgorithmfor Mixtures .................................................... 233 6.3.4 Lab:MixtureDistributionApplications .................. 240 6.4 TruncatedandCensoredData ....................................... 248 6.4.1 Lower-TruncationandRight-Censoring .................. 248 6.4.2 ParameterEstimationUnderRight-Censoring ........... 250 6.4.3 ParameterEstimationUnderLower-Truncation .......... 254 6.4.4 CompositeModels ......................................... 264