Test for estimator_quantile_B

Estimation of a large quantile

Authors

Contact: teddy.furon@inria.fr

Copyright INRIA 2010-2011

Licence This software and its subprograms are governed by the CeCILL license under French law and abiding by the rules of distribution of free software. See http://www.cecill.info/licences.en.html

Contents

Example

What is the quantile q such that

Data

dim = 20;
Proba = 4.7*10^-11;
n = 200; % Total number of particles

% real value for this problem
q_true = 0.95;

Estimation

[q_est, Stat, Intern] = estimator_quantile_B(Proba,dim,'n',n,'N_sample',200);
List of all arguments of estimator_quantile_B:
           a: 0.9500
       alpha: 0.9500
         dim: 20
    GENERATE: @GENERATE_INTERNAL
    max_iter: 40000
     minheap: 0
      MODIFY: @MODIFY_INTERNAL
          mu: 2
    mu_decay: 0.0500
           n: 200
    N_sample: 200
           P: 4.7000e-11
        rate: 0.1000
       SCORE: @SCORE_INTERNAL
           t: 10
     verbose: 1

Iteration 	Threshold 	Prob 		mu 		Trials 
1		5.85e-04	1.00e+00	2.00e+00	2.00e+02
200		2.01e-01	3.69e-01	2.00e+00	2.19e+03
400		3.33e-01	1.35e-01	2.00e+00	4.19e+03
600		4.41e-01	4.97e-02	2.00e+00	6.19e+03
800		5.07e-01	1.82e-02	1.71e+00	8.19e+03
1000		5.73e-01	6.69e-03	1.20e+00	1.02e+04
1200		6.31e-01	2.45e-03	1.03e+00	1.22e+04
1400		6.71e-01	9.01e-04	8.36e-01	1.42e+04
1600		7.08e-01	3.30e-04	7.94e-01	1.62e+04
1800		7.40e-01	1.21e-04	6.81e-01	1.82e+04
2000		7.70e-01	4.45e-05	6.47e-01	2.02e+04
2200		8.00e-01	1.63e-05	5.55e-01	2.22e+04
2400		8.24e-01	5.99e-06	5.01e-01	2.42e+04
2600		8.41e-01	2.20e-06	4.52e-01	2.62e+04
2800		8.57e-01	8.07e-07	4.08e-01	2.82e+04
3000		8.73e-01	2.96e-07	4.08e-01	3.02e+04
3200		8.86e-01	1.09e-07	3.87e-01	3.22e+04
3400		8.99e-01	3.99e-08	3.32e-01	3.42e+04
3600		9.09e-01	1.46e-08	3.32e-01	3.62e+04
3800		9.19e-01	5.37e-09	2.85e-01	3.82e+04
4000		9.28e-01	1.97e-09	2.57e-01	4.02e+04
4200		9.35e-01	7.23e-10	2.57e-01	4.22e+04
4400		9.42e-01	2.65e-10	2.44e-01	4.42e+04
4600		9.48e-01	9.74e-11	2.20e-01	4.62e+04
4800		9.53e-01	3.57e-11	2.20e-01	4.82e+04

Display

Print the true probability

fprintf('\nTrue quantile \t %6.2e\n\n',q_true);
True quantile 	 9.50e-01

Print the estimation and its confidence interval. This interval only in the asymptotic regime

fprintf('Lower bnd\t\tEstimate\t\tUpper bnd\n');
fprintf('%6.2e\t\t%6.2e\t\t%6.2e\n',Stat.interval(1),q_est,Stat.interval(2));
Lower bnd		Estimate		Upper bnd
9.48e-01		9.51e-01		9.55e-01

Show the last intermediate thresholds and estimated probability.

figure;
semilogx([Intern(end-10:end-1,3);Proba],[Intern(end-10:end-1,2);q_est],'-+');
hold on
semilogx(Proba*[1,1],[Stat.interval(1),Stat.interval(2)],'o-r');
semilogy(Proba,q_true,'^g')
legend('Estimate','Confidence','True')
grid on;
%v = axis; v(2) =v(2)+0.01;
%axis(v);
hold off
title('Test Estimator B')
xlabel('Probability');
ylabel('Estimated quantile');