{"text_format":"1","workbook":"xlsx","n_sheets":2,"sheets":["Intro","Examples"],"not_rendered":{"charts":0,"images":0,"macros":1,"external_links":0,"defined_names":9,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Intro","index":0,"n_rows":9,"n_cols":2,"rows_kept":9,"cut":false,"hidden":false,"merged":[]}
["<Alt> + F11 to open VBA editor"]
[]
["<fn> + <alt> + F11 on Mac"]
[]
[]
["Modules:"]
["CallBackLib","Library functions for implementation of the CallBack functionality"]
["numLib","Simple library of numerical routines"]
["statLib","Statistical functions"]

{"sheet":"Examples","index":1,"n_rows":28,"n_cols":4,"rows_kept":28,"cut":false,"hidden":false,"merged":[]}
["Quantity","Value","Formula","Comment"]
["MTTF",81,null,"Norwegian men"]
["alpha",5,null,"Assumption, higher alpha gives lower standard deviation"]
["t",64,null,"Current age of the man considered"]
["x",{"$f":"100-t","v":36},{"$f":"_xlfn.FORMULATEXT(B5)","v":"=100-t"},"x is the number of years from now (t) to reach 100 years"]
["lambda",{"$f":"_xlfn.GAMMA(1+1/alpha)/MTTF","v":1.1335416572836553E-2},{"$f":"_xlfn.FORMULATEXT(B6)","v":"=GAMMA(1+1/alpha)/MTTF"},"Since the Weibull was specified in terms of alpha and MTTF, we need to calculate lambda"]
["Variance",{"$f":"(_xlfn.GAMMA(2/alpha+1)-(_xlfn.GAMMA(1/alpha+1))^2)/(lambda^2)","v":344.22448061215675},"=(GAMMA(2/alpha+1)-(GAMMA(1/alpha+1))^2)/(lambda^2)","Variance"]
["SD",{"$f":"SQRT(variance)","v":18.553287595791662},"=SQRT(variance)","Standard deviation"]
["R(100)",{"$f":"Rw(100,alpha,lambda)","v":0.15389423072338104},"=Rw(100,alpha,lambda)","Probability that a new born boy survives 100 years"]
["R(t)",{"$f":"Rw(t,alpha,lambda)","v":0.81795358657836914},"=Rw(t,alpha,lambda)","Probability that a new born boy survives t years "]
["MRL(t)",{"$f":"MRLw(t,alpha,MTTF)","v":23.266851425170898},"=MRLw(t,alpha,MTTF)","Mean residual life for a man of age t"]
["E(T|t)",{"$f":"t+MRL","v":87.266851425170898},"=t+MRL","Expected age when a man of age t dies"]
["R(x|t)",{"$f":"Rw(x+t,alpha,lambda)/Rw(t,alpha,lambda)","v":0.1881454317807264},"=@Rw(x+t,alpha,lambda)/@Rw(t,alpha,lambda)","Probability that a man of age t will be more than 100 years"]
["R(1|t)",{"$f":"Rw(1+t,alpha,lambda)/Rw(t,alpha,lambda)","v":0.98393294053246727},"=@Rw(1+t,alpha,lambda)/@Rw(t,alpha,lambda)","Probability that a man of age t will survive another year"]
["z(t)Dt",{"$f":"alpha*lambda^alpha*t^(alpha-1)","v":1.5699192869961492E-2},"=alpha*lambda^alpha*t^(alpha-1)","Probability that a man of age t will die next year (Dt=1)"]
[]
[]
[]
[]
["Function Rw(t , alpha , lambda )"]
["Rw = Exp(-((lambda * t) ^ alpha))"]
["End Function"]
[]
["Denne har vi ikke sett på, men MRL = Mean Residual Life = Forventet gjennværende levetid når vi er t år gammel"]
["Function MRLw(t As Single, alpha As Single, MTTF As Single)"]
["lambda = Gamma(1 + 1 / alpha) / MTTF"]
["MRLw = NumInt(\"Rw\", t, MTTF * 100, alpha, lambda) / Rw(t, alpha, lambda)"]
["End Function"]