【保险精算入门】Python 实现寿险计算

【保险精算入门】Python 实现寿险计算

文章目录

  • 【保险精算入门】Python 实现寿险计算
  • 实验任务
        • 保险精算实验1
        • 保险精算实验2
        • 保险精算实验3
        • 保险精算实验4
        • 保险精算实验5
  • 数据集
  • 实现过程
      • 保险精算实验1
          • 代码展示
          • 运行结果
          • 结果可视化
      • 保险精算实验2:三类保险精算现值
          • 代码实现
      • 保险精算实验3
      • 保险精算实验4
          • 代码实现
      • 保险精算实验5
          • 代码实现
          • 实验结果
          • 公式
  • 完整自建python方法库
  • 生命表
          • 只做了男生的寿险计算哦

实验任务

保险精算实验1

1:生存人数初始100万,利用生命表基础函数计算各整数年龄存活人的各生存概率、死亡人数。

2:计算各年龄取整余命。

保险精算实验2

求以下几个函数的值,并列在表格内,其中n=20,i=2%:
【保险精算入门】Python 实现寿险计算_第1张图片

保险精算实验3

求以下几个函数的值,并列在表格内,其中i=2%

【保险精算入门】Python 实现寿险计算_第2张图片

保险精算实验4

求以下两个函数的值,并列在表格内,其中一年内死亡均匀分布,实验结果给到可缴付10年得年龄为止,i=2%:

【保险精算入门】Python 实现寿险计算_第3张图片

保险精算实验5

【保险精算入门】Python 实现寿险计算_第4张图片

数据集

【保险精算实验-中国人寿保险业经验生命表(2010—2013)】(点击打开链接下载)

实现过程

保险精算实验1

  • 生存人数初始100万,利用生命表基础函数计算各整数年龄存活人的各生存概率、死亡人数。
  • 计算各年龄取整余命。
代码展示
class 生命表():
    def __init__(self,probality_of_death,amount_of_people):
        self.data=probality_of_death
        self.m=amount_of_people

    def 生存概率(self):
        return(list(1-self.data))

    def 死亡人数(self):
        a=[]
        M=self.m
        for i in range(len(self.data)):
            b=round(self.data[i]*M)
            a.append(b)
            M=M-b
        return(a)

    def 余命(self,age):
        a=self.死亡人数()
        b=self.m
        c=[]
        d=[]
        z=0
        for i in range(len(a)):
            b=b-a[i]
            c.append(float(b))
        for i in range(age+1,106):
            z+=c[i]
        z=(z)/c[age]
        return(z)

data=open('生命表.csv')
data=pd.read_csv(data)
data1=data.iloc[:,5]
p=生命表(data1,1000000)
print('生存概率表为:\n',p.生存概率())
print('死亡人数表为:\n',p.死亡人数())
print('取整余命表为:\n',[p.余命(i) for i in range(0,105)])
运行结果
生存概率表为:
 [0.999434, 0.999614, 0.999732, 0.999804, 0.999842, 0.999859, 0.999868, 0.999871, 0.999869, 0.999863, 0.999854, 0.999843, 0.99983, 0.999816, 0.999803, 0.999792, 0.999781, 0.999773, 0.999765, 0.999759, 0.999752, 0.999744, 0.999736, 0.999727, 0.999716, 0.999703, 0.999686, 0.999667, 0.999646, 0.999621, 0.999593, 0.999562, 0.999528, 0.999491, 0.999451, 0.999408, 0.999361, 0.99931, 0.999254, 0.999192, 0.999122, 0.999045, 0.998959, 0.998862, 0.998755, 0.998636, 0.998504, 0.998359, 0.998202, 0.998033, 0.997852, 0.99766, 0.997456, 0.997241, 0.997015, 0.996779, 0.9965310000000001, 0.996269, 0.995986, 0.995677, 0.99534, 0.994966, 0.994552, 0.994091, 0.993578, 0.993012, 0.99239, 0.991708, 0.990954, 0.990103, 0.989112, 0.98792, 0.98645, 0.984613, 0.982314, 0.979461, 0.975983, 0.971838, 0.967022, 0.961563, 0.955508, 0.948914, 0.941827, 0.9342779999999999, 0.926271, 0.917777, 0.908761, 0.8991, 0.888679, 0.877392, 0.86513, 0.851788, 0.8372580000000001, 0.821434, 0.804207, 0.785501, 0.76535, 0.7438199999999999, 0.7209749999999999, 0.6968799999999999, 0.6715990000000001, 0.645197, 0.617739, 0.58929, 0.559914, 0.0]
死亡人数表为:
 [566, 386, 268, 196, 158, 141, 132, 129, 131, 137, 146, 157, 170, 184, 196, 207, 218, 226, 234, 240, 247, 255, 263, 272, 283, 295, 312, 331, 352, 376, 404, 435, 468, 505, 544, 586, 633, 683, 737, 798, 867, 942, 1026, 1120, 1224, 1339, 1467, 1607, 1757, 1919, 2092, 2274, 2466, 2668, 2878, 3097, 3324, 3563, 3819, 4096, 4396, 4727, 5090, 5491, 5932, 6414, 6936, 7500, 8114, 8797, 9582, 10515, 11652, 13053, 14772, 16852, 19301, 22088, 25137, 28332, 31535, 34597, 37384, 39779, 41692, 43067, 43860, 44079, 43725, 42797, 41305, 39269, 36728, 33741, 30390, 26775, 23007, 19225, 15575, 12198, 9210, 6683, 4645, 3083, 1947, 2477]
取整余命表为:
 [81.675389270327, 80.70694601260399, 79.72860189431105, 78.74425085921665, 77.75671206478998, 76.76769459623254, 75.77784668282318, 74.78764137936562, 73.79745924663266, 72.80759223697979, 71.81824761179219, 70.82955186860934, 69.8416256970188, 68.8545139449543, 67.86805135504657, 66.8821466124074, 65.89677845371398, 64.91172715337083, 63.92697722330319, 62.942384748407775, 61.95800130784476, 60.97387558827903, 59.9899920905556, 59.00639563464259, 58.02318750515356, 57.04040484306899, 56.05831155776872, 55.076987881471936, 54.09650834501313, 53.11699630939814, 52.13862017678569, 51.16148446549383, 50.18563367070606, 49.21120809703526, 48.23823750348331, 47.26679496893469, 46.29704099302782, 45.32902864241392, 44.362848844448806, 43.39871671602504, 42.436872548502635, 41.47744901998599, 40.52068964115737, 39.5668556036149, 38.6161821922552, 37.66891862259442, 36.72536347794822, 35.78574534456987, 34.85019012965715, 33.918871844482716, 32.99190131314202, 32.06929587926117, 31.151086101030202, 30.237280278273566, 29.327801546362263, 28.422586448715165, 27.521521951301246, 26.62459361194237, 25.73190121893304, 24.843616116948997, 23.95991621390798, 23.081135058132503, 22.207564022680877, 21.339571312584575, 20.477492269709245, 19.621602494612706, 18.772072643808293, 17.929035372499353, 17.09270251357366, 16.26356020121424, 15.442585944455614, 14.631407274756965, 13.83237809852082, 13.048544456483349, 12.28347083364311, 11.541053045489782, 10.825058330039651, 10.138743338729695, 9.484498137985769, 8.863624884130743, 8.276351888110236, 7.721914723772682, 7.198862631906777, 6.7052723536547845, 6.238994551209845, 5.7979380885714935, 5.380042530885251, 4.983807729517796, 4.608113334574781, 4.252058721731351, 3.9149358565481425, 3.5961344180358377, 3.2951269078515635, 3.0114293077344327, 2.744594432205087, 2.494074451810301, 2.2587183348213693, 2.0366727578917194, 1.8249136495788087, 1.6186486004635408, 1.4101406955136713, 1.185648452929559, 0.9192753430131877, 0.5599005424954792, 0.0]
结果可视化

【保险精算入门】Python 实现寿险计算_第5张图片

保险精算实验2:三类保险精算现值

实验要求

  • 在Excel输入中国人寿保险业经验生命表(非养老类业务表,男生用CL1,女生用CL2)

  • 求以下几个函数的值,并列在表格内,其中n=20,i=2%

代码实现

使用Python实现现值计算,代码如下:

import pandas as pd
import matplotlib.pyplot as plt

class 人寿保险(生命表):
    def __init__(self,probality_of_death, n, i):      
        self.probality_of_death = probality_of_death #传入死亡率表
        self.n = n #n 代表投保年数
        self.i = i #i 代表利率
        self.v = 1/(1+i) #v 代表折现率
        self.w = len(probality_of_death) #w 代表寿命最值 
        
    def kP_x(self,x,k):
        kpx=1
        for i in range(x,x+k):
            kpx=kpx*(1-self.probality_of_death[i])
        return(kpx)

    def 终身寿险(self,age):
        A_x=0
        __inf__=self.w-age-1
        for k in range(0,__inf__+1):
            A_x+=(self.v**(k+1))*(self.probality_of_death[age+k])*self.kP_x(age,k) 
        return(A_x)

    def 生存保险(self,age):
        A_x1n=(self.v**self.n)*(1-self.probality_of_death[age+self.n]) 
        return(A_x1n)

    def 定期寿险(self,age):
        A1_xn=0
        for k in range(0,self.n-1+1):
            A1_xn+=(self.v**(k+1))*(self.probality_of_death[age+k])
        return(A1_xn)

data=open('生命表.csv')
data=pd.read_csv(data)
data1=data.iloc[:,1] #男CL1
A=人寿保险(data1,20,0.02)
plt.rcParams['font.sans-serif'] = ['Microsoft YaHei']
plt.plot([A.终身寿险(i) for i in range(0,len(data1))],label='终身寿险')
plt.plot([A.生存保险(i) for i in range(0,86)],label='生存保险')
plt.plot([A.定期寿险(i) for i in range(0,86)],label='定期寿险')
plt.xlabel('年龄')
plt.ylabel('现值')
plt.title('保险精算现值')
plt.legend(loc = 'best')

【保险精算入门】Python 实现寿险计算_第6张图片

保险精算实验3

class 生存年金():
    def __init__(self,probality_of_death,i):
        self.probality_of_death = probality_of_death
        self.i = i #利率
        self.v = 1/(1+i) #v 代表折现率
        self.w = len(probality_of_death) #w 代表寿命最值
    
    def kP_x(self,x,k):
        kpx=1
        for i in range(x,x+k):
            kpx=kpx*(1-self.probality_of_death[i])
        return(kpx)
    
    def kE_x(self,age,k):
        return((self.v**k)*self.kP_x(age,k))
    
    def a_x(self,age):
        a_x=0
        __inf__=self.w-age-1
        for k in range(1,__inf__+1):
            a_x+=self.kE_x(age,k)
        return(a_x)
    
    def a_x_n(self,age,n):
        a_x_n=0
        for k in range(0,n-1+1):
            a_x_n+=self.kE_x(age,k)
        return(a_x_n)
#导入数据及运算
data=open('生命表.csv')
data=pd.read_csv(data)
data1=data.iloc[:,5] #男CL5
a=生存年金(data1,0.02)
#=========================================================================#
plt.rcParams['font.sans-serif'] = ['Microsoft YaHei']
plt.plot([a.a_x(i) for i in range(0,len(data1))],label='期末付终身生存年金精算现值')
plt.plot([a.a_x_n(i,10) for i in range(0,len(data1)-9)],label='n年定期期首付生存年金精算现值')
plt.xlabel('年龄')
plt.ylabel('现值')
plt.title('精算现值')
plt.legend(loc = 'best')
#=========================================================================#
df1=pd.DataFrame([a.a_x(i) for i in range(0,len(data1))])
df2=pd.DataFrame([a.a_x_n(i,10) for i in range(0,len(data1)-9)])
data=pd.concat([df1,df2,data1],axis=1)
data.columns=['期末付终身生存年金','n年定期期首付生存年金','生命表(男)']
print(data)

【保险精算入门】Python 实现寿险计算_第7张图片

保险精算实验4

代码实现
class 保费(生存年金):
    def __init__(self,probality_of_death,i):
        self.probality_of_death = probality_of_death
        self.i = i #利率
        self.v = 1/(1+i) #v 代表折现率
        self.w = len(probality_of_death) #w 代表寿命最值  

    def A_x(self,age):
        A_x=0
        __inf__=self.w-age-1
        for k in range(0,__inf__+1):
            A_x+=(self.v**(k+1))*(self.probality_of_death[age+k])*self.kP_x(age,k) 
        return(A_x)

    def Ax_to_n(self,age,n):
        A=0
        for k in range(0,n-1+1):
            A+=(self.v**(k+1))*self.probality_of_death[k]
        return(A + (self.v**n)*self.kP_x(age,n) )

    def bar_Ax(self,age):
        __delta__=log(1+self.i)
        return((self.i/__delta__)*self.A_x(age))

    def Px_to_n(self,age,n):
        return(self.Ax_to_n(age,n)/self.a_x_n(age,n))

    def nP_bar_Ax_(self,age,n):
        return(self.bar_Ax(age)/self.a_x_n(age,n))
#导入数据及运算
data=open('生命表.csv')
data=pd.read_csv(data)
data1=data.iloc[:,1] #男CL1
a=保费(data1,0.02)
#数据输出
df1=pd.DataFrame([a.Px_to_n(i,10) for i in range(0,len(data1)-9)])
df2=pd.DataFrame([a.nP_bar_Ax_(i,10) for i in range(0,len(data1)-9)])
data=pd.concat([df1,df2,data1],axis=1)
data.columns=['n年期年末缴付两全保险','n年期缴付终身寿险','生命表(男)']
print(data)

【保险精算入门】Python 实现寿险计算_第8张图片

保险精算实验5

代码实现
class 毛保费(纯保费):
	def __init__(self,probality_of_death,i,保险金额,\
					  给付费用每份,给付费用每千元保额,\
					  第一年每份,第一年每千元,第一年保费百分比,\
		              续年每份,续年每千元,续年保费百分比):
		self.probality_of_death = probality_of_death
		self.i = i
		self.v = 1/(1+i)
		self.w = len(probality_of_death)
		self.M = 保险金额
		self.给付费用每份 = 给付费用每份
		self.给付费用每千元保额 = 给付费用每千元保额
		self.第一年每份 = 第一年每份
		self.第一年每千元 = 第一年每千元
		self.第一年保费百分比 = 第一年保费百分比
		self.续年每份 = 续年每份
		self.续年每千元 = 续年每千元
		self.续年保费百分比 = 续年保费百分比

	def 离散型终身寿险保单(self,age):
		__n__=self.M/1000
		G=((self.M+self.给付费用每份+self.给付费用每千元保额*__n__)*self.A_x(age)\
			+self.第一年每份+self.第一年每千元*__n__\
			+(self.续年每份+self.续年每千元*__n__)*self.a_x(age))/\
			(self.dots_a_x(age)-self.第一年保费百分比-self.续年保费百分比*self.a_x(age))
		return(G)
#导入数据及运算
data=open('生命表.csv')
data=pd.read_csv(data)
data1=data.iloc[:,1] #男CL1
纯保费=纯保费(data1,0.02)
毛保费=毛保费(data1,0.02,50000,20,0.2,40,5,0.72,6,0.5,0.09)
print('(30)购买了保险金额为5万元的离散型终身寿险保单(终身缴费),保费如下:')
print('纯保费:',50000*纯保费.P_x(30))
print('毛保费:',毛保费.离散型终身寿险保单(30))
print('年缴纯保费占年缴毛保费的比例为:',\
	 (50000*纯保费.P_x(30))/(毛保费.离散型终身寿险保单(30)))

注:此代码继承并部分调用此前上机实验所写代码,限篇幅故不展示

实验结果
(30)购买了保险金额为5万元的离散型终身寿险保单(终身缴费),保费如下:
纯保费: 655.9961657921957
毛保费: 782.415925472747
年缴纯保费占年缴毛保费的比例为: 0.8384238413805718
公式

G a ¨ x = ( 50000 + 20 + 0.2 × 50 ) A x + ( 40 + 5 × 50 + 0.72 G ) + [ ( 6 + 0.5 × 50 ) a x + 0.09 G a x ] G \ddot a_x=(50000+20+0.2\times 50)A_x+(40+5\times50+0.72G)+[(6+0.5\times50)a_x+0.09Ga_x] Ga¨x=(50000+20+0.2×50)Ax+(40+5×50+0.72G)+[(6+0.5×50)ax+0.09Gax]

完整自建python方法库

供有兴趣的读者自行调用和修改

####导言区####
import numpy as np
from math import e
from math import log
from math import floor
import matplotlib.pyplot as plt
import pandas as pd
'''
NWU数院 2020保险精算课程上机作业 
'''
#===========================利率与利息============================#

'''
m代表初期金额,i代表利率,delta代表利息强度,t代表期数
'''
def SingleInterest(m,i,t): #单利
    a=1+i*t
    return(m*a)

def CompoundInterest(m,i,t): #复利
    a=(1+i)**t
    return(m*a)

def ContinuousInterest(m,delta,t): #连续利率
    for i in range(0,t):
        a=(e**delta)**t
    return(m*a)

def NominalInterest(m,i,t): #名义利率
    '''
    m代表初期金额,i代表利利率,t代表年数
    本函数按月计息,每月名义利率为t/12
    '''
    i_t=i/12
    for T in range(1,12*t+1):
        m=m*(1+i_t)
    return(m)

#===========================年金与还款============================#

def AverageInterest(m,r,t): #等额本息还款
    a=((1+r)**t)*m*r/((1+r)**t-1)
    print('等额本息法每期还款金额为:',a)
    print('总还款金额为:',a*t)


def AverageCapital(m,r,t): #每个月等额本金还款
    A=0
    c=m/t
    D=[]
    for i in range(1,t+1):
        d=(m/t)+(m-A)*r
        D.append(d)
        A=A+c    
    print('等额本金法每月还款额度如下:')
    index=0
    index2=0
    year=2
    print('>>>第1年','\n')
    for x in D:
        index+=1
        index2+=1
        print('第%d月还款 %s元' %(index,x),end='\n')
        if index==12 and index2 < len(D):
            print('\n')
            print('>>>第%d年'%(year),'\n')
            year+=1
            index=0
    print('\n')
    print('总还款额为:',np.sum(D))


#==============================生命表==============================#
class 生命表():
    def __init__(self,probality_of_death,amount_of_people):
        self.data=probality_of_death
        self.m=amount_of_people

    def 生存概率(self):
        return(list(1-self.data))

    def 死亡人数(self):
        a=[]
        M=self.m
        for i in range(len(self.data)):
            if i == 0 :
                a.append(0)
            else:
                b=round(self.data[i-1]*M)
                a.append(b)
                M=M-b
        return(a)

    def 余命(self,age):
        '''
        age为活到第x岁,data为生存概率(df格式)
        ''' 
        #先计算每年存活人数
        a=self.死亡人数()
        b=self.m
        c=[]
        d=[]
        z=0
        for i in range(len(a)):
            b=b-a[i]
            c.append(b)
                
        for i in range(age+1,106):
            z+=c[i]
        z=(z)/c[age]
        return(z)

#==============================人寿保险==============================#
class 人寿保险(生命表):
    def __init__(self,probality_of_death, n, i):      
        self.probality_of_death = probality_of_death #传入死亡率表
        self.n = n #n 代表投保年数
        self.i = i #i 代表利率
        self.v = 1/(1+i) #v 代表折现率
        self.w = len(probality_of_death) #w 代表寿命最值 

    def kP_x(self,x,k):
        kpx=1
        for i in range(x,x+k):
            kpx=kpx*(1-self.probality_of_death[i])
        return(kpx)

    def 终身寿险(self,age):
        A_x=0
        __inf__=self.w-age-1
        for k in range(0,__inf__+1):
            A_x+=(self.v**(k+1))*(self.probality_of_death[age+k])*self.kP_x(age,k) 
        return(A_x)

    def 生存保险(self,age):
        A_x1n=(self.v**self.n)*(1-self.probality_of_death[age+self.n]) 
        return(A_x1n)

    def 定期寿险(self,age):
        A1_xn=0
        for k in range(0,self.n-1+1):
            A1_xn+=(self.v**(k+1))*(self.probality_of_death[age+k])
        return(A1_xn)

#==============================生存年金==============================#
class 生存年金():
    def __init__(self,probality_of_death,i):
        self.probality_of_death = probality_of_death
        self.i = i #利率
        self.v = 1/(1+i) #v 代表折现率
        self.w = len(probality_of_death) #w 代表寿命最值

    def kP_x(self,x,k):
        kpx=1
        for i in range(x,x+k):
            kpx=kpx*(1-self.probality_of_death[i])
        return(kpx)

    def kE_x(self,age,k):
        return((self.v**k)*self.kP_x(age,k))

    def a_x(self,age):
        a_x=0
        __inf__=self.w-age-1
        for k in range(1,__inf__+1):
            a_x+=self.kE_x(age,k)
        return(a_x)

    def dots_a_x(self,age): 
        a_x=0
        __inf__=self.w-age-1
        for k in range(0,__inf__+1):
            a_x+=self.kE_x(age,k)
        return(a_x)

    def a_x_n(self,age,n): #期初付n年定期生存年金
        a_x_n=0
        for k in range(0,n-1+1):
            a_x_n+=self.kE_x(age,k)
        return(a_x_n)

#==============================净保费与毛保费==============================#
class 纯保费(生存年金):
    def __init__(self,probality_of_death,i):
        self.probality_of_death = probality_of_death
        self.i = i #利率
        self.v = 1/(1+i) #v 代表折现率
        self.w = len(probality_of_death) #w 代表寿命最值  

    def A_x(self,age):
        A_x=0
        __inf__=self.w-age-1
        for k in range(0,__inf__+1):
            A_x+=(self.v**(k+1))*(self.probality_of_death[age+k])*self.kP_x(age,k) 
        return(A_x)

    def Ax_to_n(self,age,n):
        A=0
        for k in range(0,n-1+1):
            A+=(self.v**(k+1))*self.probality_of_death[k]
        return(A + (self.v**n)*self.kP_x(age,n) )

    def bar_Ax(self,age):
        __delta__=log(1+self.i)
        return((self.i/__delta__)*self.A_x(age))

    def Px_to_n(self,age,n):
        return(self.Ax_to_n(age,n)/self.a_x_n(age,n))

    def nP_bar_Ax_(self,age,n):
        return(self.bar_Ax(age)/self.a_x_n(age,n))

    def P_x(self,age):
    	return(self.A_x(age)/self.dots_a_x(age))


class 毛保费(纯保费):
	def __init__(self,probality_of_death,i,保险金额,\
					  给付费用每份,给付费用每千元保额,\
					  第一年每份,第一年每千元,第一年保费百分比,\
		              续年每份,续年每千元,续年保费百分比):
		self.probality_of_death = probality_of_death
		self.i = i
		self.v = 1/(1+i)
		self.w = len(probality_of_death)
		self.M = 保险金额
		self.给付费用每份 = 给付费用每份
		self.给付费用每千元保额 = 给付费用每千元保额
		self.第一年每份 = 第一年每份
		self.第一年每千元 = 第一年每千元
		self.第一年保费百分比 = 第一年保费百分比
		self.续年每份 = 续年每份
		self.续年每千元 = 续年每千元
		self.续年保费百分比 = 续年保费百分比

	def 离散型终身寿险保单(self,age):
		__n__=self.M/1000
		G=((self.M+self.给付费用每份+self.给付费用每千元保额*__n__)*self.A_x(age)\
			+self.第一年每份+self.第一年每千元*__n__\
			+(self.续年每份+self.续年每千元*__n__)*self.a_x(age))/\
			(self.dots_a_x(age)-self.第一年保费百分比-self.续年保费百分比*self.a_x(age))
		return(G)

生命表

只做了男生的寿险计算哦
年龄 终身寿险 生存保险 定期寿险 生命表(男)
0 1.332316 0.672629 0.006258 0.000867
1 1.358095 0.672617 0.005858 0.000615
2 1.384642 0.672603 0.005715 0.000445
3 1.41189 0.672589 0.005753 0.000339
4 1.439789 0.672574 0.005911 0.00028
5 1.468304 0.672557 0.006147 0.000251
6 1.497419 0.672538 0.006433 0.000237
7 1.527131 0.672517 0.006758 0.000233
8 1.55744 0.672493 0.007114 0.000238
9 1.588351 0.672466 0.007497 0.00025
10 1.619868 0.672435 0.007902 0.000269
11 1.651997 0.672401 0.008328 0.000293
12 1.684744 0.672364 0.008771 0.000319
13 1.718119 0.672321 0.009235 0.000347
14 1.752135 0.672275 0.009723 0.000375
15 1.786803 0.672224 0.010239 0.000402
16 1.822137 0.672166 0.01079 0.000427
17 1.858152 0.672103 0.011383 0.000449
18 1.894866 0.672033 0.01203 0.000469
19 1.932295 0.671952 0.01274 0.000489
20 1.970452 0.67186 0.013526 0.000508
21 2.009353 0.671757 0.014399 0.000527
22 2.049013 0.67164 0.015374 0.000547
23 2.089446 0.671509 0.016466 0.000568
24 2.130667 0.671361 0.01769 0.000591
25 2.172689 0.671195 0.019063 0.000615
26 2.215528 0.671011 0.020605 0.000644
27 2.259195 0.670809 0.022334 0.000675
28 2.303703 0.67059 0.024267 0.000711
29 2.349067 0.670358 0.026423 0.000751
30 2.395297 0.670112 0.028814 0.000797
31 2.442406 0.669853 0.031453 0.000847
32 2.490407 0.669585 0.034353 0.000903
33 2.539312 0.669307 0.037523 0.000966
34 2.589132 0.669022 0.040972 0.001035
35 2.63988 0.66873 0.044706 0.001111
36 2.691567 0.668431 0.04873 0.001196
37 2.744202 0.668108 0.053049 0.00129
38 2.797796 0.667742 0.057684 0.001395
39 2.852357 0.667316 0.062672 0.001515
40 2.907889 0.666806 0.068065 0.001651
41 2.964396 0.666198 0.07394 0.001804
42 3.02188 0.665482 0.080389 0.001978
43 3.080339 0.664653 0.087508 0.002173
44 3.139773 0.663704 0.095403 0.002393
45 3.200175 0.662622 0.104186 0.002639
46 3.26154 0.661388 0.11398 0.002913
47 3.323858 0.65998 0.12493 0.003213
48 3.387122 0.658374 0.137206 0.003538
49 3.451326 0.656543 0.15101 0.003884
50 3.516469 0.654468 0.166574 0.004249
51 3.582549 0.652133 0.18416 0.004633
52 3.649567 0.64953 0.204049 0.005032
53 3.717527 0.646655 0.226539 0.005445
54 3.786432 0.643498 0.251941 0.005869
55 3.856292 0.640049 0.280584 0.006302
56 3.927116 0.63629 0.312816 0.006747
57 3.998911 0.632199 0.349007 0.007227
58 4.071662 0.627746 0.389532 0.00777
59 4.145325 0.622902 0.434778 0.008403
60 4.219829 0.61764 0.48514 0.009161
61 4.295065 0.611933 0.541013 0.010065
62 4.370901 0.605763 0.602807 0.011129
63 4.44719 0.59911 0.670942 0.01236
64 4.523774 0.591954 0.745862 0.013771
65 4.600478 0.584262 0.828026 0.015379
66 4.677109 0.575993 0.917917 0.017212
67 4.753439 0.56709 1.016042 0.019304
68 4.829204 0.557483 1.12294 0.021691
69 4.904097 0.547095 1.239196 0.024411
70 4.977768 0.535843 1.365445 0.027495
71 5.049828 0.523657 1.502387 0.030965
72 5.11986 0.510482 1.650784 0.034832
73 5.187425 0.49629 1.811457 0.039105
74 5.252068 0.481088 1.985263 0.043796
75 5.313314 0.464916 2.173056 0.048921
76 5.370659 0.447843 2.375651 0.054506
77 5.423566 0.429961 2.593787 0.060586
78 5.471451 0.411369 2.828087 0.067202
79 5.513678 0.392169 3.079049 0.0744
80 5.549552 0.37246 3.347032 0.08222
81 5.578323 0.352336 3.632264 0.0907
82 5.599189 0.331889 3.934845 0.099868
83 5.611305 0.31121 4.254755 0.109754
84 5.613777 0.290389 4.591858 0.120388
85 5.605665 0 4.945889 0.131817
86 5.585961 NaN NaN 0.144105
87 5.553575 NaN NaN 0.157334
88 5.507313 NaN NaN 0.171609
89 5.44585 NaN NaN 0.187046
90 5.367721 NaN NaN 0.203765
91 5.271311 NaN NaN 0.221873
92 5.154864 NaN NaN 0.241451
93 5.01651 NaN NaN 0.262539
94 4.854301 NaN NaN 0.285129
95 4.666258 NaN NaN 0.30916
96 4.450423 NaN NaN 0.334529
97 4.204903 NaN NaN 0.361101
98 3.9279 NaN NaN 0.388727
99 3.617731 NaN NaN 0.417257
100 3.272829 NaN NaN 0.446544
101 2.891741 NaN NaN 0.476447
102 2.473129 NaN NaN 0.50683
103 2.015762 NaN NaN 0.537558
104 1.518519 NaN NaN 0.568497
1
93 5.01651 NaN NaN 0.262539
94 4.854301 NaN NaN 0.285129
95 4.666258 NaN NaN 0.30916
96 4.450423 NaN NaN 0.334529
97 4.204903 NaN NaN 0.361101
98 3.9279 NaN NaN 0.388727
99 3.617731 NaN NaN 0.417257
100 3.272829 NaN NaN 0.446544
101 2.891741 NaN NaN 0.476447
102 2.473129 NaN NaN 0.50683
103 2.015762 NaN NaN 0.537558
104 1.518519 NaN NaN 0.568497
105 0.980392 NaN NaN 1

你可能感兴趣的:(保险精算,算法,经验分享,python)