function B = bias_B(pHit, pFA)

% A = bias_B(pHit, pFA))
%
% The function returns the parametric index Bi.
%
% INPUT: pHit is the hit rate
% pFA is the false alarm
% OUTPUT: Bi
% AUTHOR: M. Borgo, A. Soranzo and M.Grassi - 2011

B = (pHit*(1-pHit)-pFA*(1-pFA))/(pHit*(1-pHit)+pFA*(1-pFA));
if pHit<pFA
    B=-B;
end