  Last year the first experimental tests closing the detection loophole (also
referred to as the fair sampling loophole) were performed by two experimental
groups \cite{Zeilinger}, \cite{Kwiat}. To violate Bell-type inequalities (the
Eberhard inequality in the first test and the Clauser-Horne inequality in the
second test), one has to optimize a number of parameters involved in the
experiment (angles of polarization beam splitters and quantum state
parameters). Although these are technicalities, their optimal determination
plays an important role in approaching statistically significant violations of
the inequalities. In this paper we study this problem for the Eberhard
inequality in very detail by using the advanced method of numerical
optimization, the Nelder-Mead method. First of all, we improve the the results
of optimization for the original Eberhard model \cite{Eberhard} and the Gustina
et al. work \cite{Zeilinger} ("Vienna-13 experiment") by using the model of
this experiment presented in Kofler et al. \cite{Zeilinger1}. We also take into
account the well known fact that detectors can have different efficiencies and
perform the corresponding optimization. In previous studies the objective
function had the meaning of the mathematical expectation. However, it is also
useful to investigate the possible level of variability of the results,
expressed in terms of standard deviation. In this paper we consider the
optimization of parameters for the Eberhard inequality using coefficient of
variation taking into account possible random fluctuations in the setup of
angles during the experiment.
