function A = sensitivity_A(pHit, pFA)

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

if pHit>=pFA
    A = 0.5 + ((pHit-pFA)*(1+pHit-pFA))/(4*pHit*(1-pFA));
else
    A = 0.5 - ((pFA-pHit)*(1+pFA-pHit))/(4*pFA*(1-pHit));
end