You are on page 1of 3

Actuarial Modelling- II Lab 6

Object:
Simulate 10 random sample of size n = 15 from Weibull’s distribution with pdf
𝑥 𝑗
𝑗𝑥 𝑗−1 exp [− (𝜃 )]
𝑓(𝑥; 𝑗; 𝜃) = 𝑤ℎ𝑒𝑟𝑒 𝑗 = 2 & 𝜃 = 20
𝜃𝑗
Find the estimator of J, 𝜃 and s(j) by percentile matching method with the following pairs of
percentiles(smooth)
a) 10th and 50th b) 15th and 75th c) 5th and 95th

Working:
Steps:
1) First we will generate 150 random numbers using Uniform (0,1). To get the random
sample values of size 15 we will use Inverse CDF of Weibull’s distribution by using
the following command:
=20*(-LN(1-B3))^0.5
For part (a): 10th and 50th percentile
To get the value of 𝜋𝑔1 and 𝜋𝑔2 for 10th and 50th percentile we will use the command
as:
=PERCENTILE(Q3:AE3,0.1) and =PERCENTILE(Q3:AE3,0.5)
2) For the estimation of j and 𝜃 we will use the following commands as derived in the
formula:
For j : =(LN(-LN(1-0.1))-LN(-LN(1-0.5)))/(LN(AF3/AG3))
For 𝜃: =((AF3)*(-LN(1-0.5))^0.5 + (AG3)*(-LN(1-0.1))^0.5)/(2*((-LN(1-0.1))^0.5)*((-
LN(1-0.5))^0.5))

Sample Values a) PERCENTILE


j Ө
X1 X2 … … X14 X15 10th 50th
16.47 24.1 … … 16.281 11.092 3.5516 16.28055 1.2373 15.248
24.26 7.646 … … 21.534 2.3254 3.5777 8.871873 2.0743 10.839
… … … … … … … … … …
… … … … … … … … … …
… … … … … … … … … …
20.32 27.86 … … 18.694 23.968 7.2948 20.32227 1.8387 23.442
31.42 23.73 … … 10.292 22.096 6.4755 17.64287 1.8795 20.57

3) Then we will calculate Mean and Variance of both for j and 𝜃. By using the following
commands:
Mean for j: =AVERAGE(AJ3:AJ12)
Mean for 𝜃: =AVERAGE(AK3:AK12)
Variance for j: =VAR(AJ3:AJ12)
Variance for 𝜃: =VAR(AK3:AK12)

J Ө

Mean 1.9447 19.882


Variance 0.4539 27.488
For part (a): 15th and 75th percentile
To get the value of 𝜋𝑔1 and 𝜋𝑔2 for 15th and 75th percentile we will use the command
as:
=PERCENTILE(Q3:AE3,0.15) and =PERCENTILE(Q3:AE3,0.75)
4) For the estimation of j and 𝜃 we will use the following commands as derived in the
formula:
For j : =(LN(-LN(1-0.15))-LN(-LN(1-0.75)))/(LN(AF3/AG3))
For 𝜃: =((AF3)*(-LN(1-0.75))^0.5 + (AG3)*(-LN(1-0.15))^0.5)/(2*((-LN(1-
0.15))^0.5)*((-LN(1-0.75))^0.5))

Sample Values a) PERCENTILE


j Ө
X1 X2 … … X14 X15 15th 75th
16.47 24.1 … … 16.281 11.092 6.5055 21.03422 1.8267 17.001
24.26 7.646 … … 21.534 2.3254 5.4799 19.12427 1.7151 14.918
… … … … … … … … … …
… … … … … … … … … …
… … … … … … … … … …
20.32 27.86 … … 18.694 23.968 12.41 26.04214 2.8919 26.451
31.42 23.73 … … 10.292 22.096 8.9788 23.59277 2.2189 21.155
5) Then we will calculate Mean and Variance of both for j and 𝜃. By using the following
commands:
Mean for j: =AVERAGE(AP3:AQ12)
Mean for 𝜃: =AVERAGE(AP3:AKQ12)
Variance for j: =VAR(AP3:AQ12)
Variance for 𝜃: =VAR(AP3:AQ12)

J Ө

Mean 2.1794 20.676


Variance 0.3854 19.425
For part (a): 5th and 95th percentile
To get the value of 𝜋𝑔1 and 𝜋𝑔2 for 15th and 75th percentile we will use the command
as:
=PERCENTILE(Q3:AE3,0.15) and =PERCENTILE(Q3:AE3,0.75)
6) For the estimation of j and 𝜃 we will use the following commands as derived in the
formula:
For j : =(LN(-LN(1-0.15))-LN(-LN(1-0.75)))/(LN(AF3/AG3))
For 𝜃: =((AF3)*(-LN(1-0.75))^0.5 + (AG3)*(-LN(1-0.15))^0.5)/(2*((-LN(1-
0.15))^0.5)*((-LN(1-0.75))^0.5))

Sample Values a) PERCENTILE


j Ө
X1 X2 … … X14 X15 5th 95th
16.47 24.1 … … 16.281 11.092 1.7011 26.01481 1.4913 11.271
24.26 7.646 … … 21.534 2.3254 2.1935 22.61751 1.7433 11.376
… … … … … … … … … …
… … … … … … … … … …
… … … … … … … … … …
20.32 27.86 … … 18.694 23.968 3.3721 36.39448 1.7098 17.958
31.42 23.73 … … 10.292 22.096 4.4268 34.75178 1.9739 19.812

1) Then we will calculate Mean and Variance of both for j and 𝜃. By using the following
commands:
Mean for j: =AVERAGE(AP3:AQ12)
Mean for 𝜃: =AVERAGE(AP3:AKQ12)
Variance for j: =VAR(AP3:AQ12)
Variance for 𝜃: =VAR(AP3:AQ12)

J Ө

Mean 1.9866 18.268


Variance 0.1505 26.815
Comments:
Based on the results obtained for different percentiles used. By comparing means
and variances for each percentile we can decide which percentile is best matched for
the parameter estimation.

J Ө
Percentiles
Mean Variance Mean Variance
10th and
50th 1.944705 0.45394 19.88191 27.48776
15th and
75th 2.179435 0.385449 20.67581 19.42549
5th and
95th 1.986592 0.150541 18.26823 26.81521
For both estimation of j and 𝜃 the 5th and 95th percentile matching methods gives
the best estimation for both parameters.

You might also like