Skip to content

Commit f3e003b

Browse files
authored
Update ComparisonOfSampleGuarantees.m
1 parent ea8f236 commit f3e003b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

MATLAB Code/ComparisonOfSampleGuarantees.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
epsilon_diff=0.01; % allowed deviation from desired quantile
66
N_beta=zeros(1,n_gamma);
77
N_DKW=zeros(1,n_gamma);
8-
N_vys=zeros(1,n_gamma);
8+
N_VP=zeros(1,n_gamma);
99

1010
% calculate the sample guarantees for several values of gamma
1111
for i=1:n_gamma
1212
[~,den_gamma]=rat(gamma_iter(i));
1313
N_beta(i)=FiniteSampleBoundBetaConfInt(gamma_iter(i),1-rho_guarantee,epsilon_diff);
1414
N_DKW(i)=ceil(log(2/rho_guarantee)/(2*epsilon_diff^2*den_gamma))*den_gamma;
15-
N_vys(i)=ceil(1/den_gamma*((4/9)*gamma_iter(i)*(1-gamma_iter(i))/(epsilon_diff^2*rho_guarantee)-1))*den_gamma-1;
15+
N_VP(i)=ceil(1/den_gamma*((4/9)*gamma_iter(i)*(1-gamma_iter(i))/(epsilon_diff^2*rho_guarantee)-1))*den_gamma-1;
1616
end
1717
% plot finite sample guarantees
1818
figure
19-
plot(gamma_iter,N_DKW,'-.',gamma_iter,N_vys,'r--',gamma_iter,N_beta,'k')
19+
plot(gamma_iter,N_DKW,'-.',gamma_iter,N_VP,'r--',gamma_iter,N_beta,'k')
2020
xlabel('$\gamma$','Interpreter','latex')
2121
ylabel('Sample size','Interpreter','latex')
22-
legend('$N_{\mathrm{DKW}}$','$N_{\mathrm{vys}}$','$N_{\mathrm{beta}}$','Interpreter','latex')
22+
legend('$N_{\mathrm{DKW}}$','$N_{\mathrm{VP}}$','$N_{\mathrm{beta}}$','Interpreter','latex')
2323

0 commit comments

Comments
 (0)