Negative correlation between d' and hit rates? I have data from a relatively easy task where subjects had to detect a signal in noise. I computed the hit and false alarm rates (HR, FAR), and then proceeded to compute d' using the standard formula, found e.g. in Green&Swets 1966, and described also here:
d' = z(FAR) – z(HR),

where the z-scores for the left-tail p-values from the normal distribution are computed in Matlab as:
z(HR)  = norminv(1-HR, 0, 1)
z(FAR) = norminv(1-FAR, 0, 1).

This produced all-negative values for d', and I know the usual practice is to then inverse the sign in the d' formula, to get positive d' values:
d' = z(HR) – z(FAR)

As a sanity check, I created a cross-subjects scatterplot of raw HR values against d', expecting to find a by-and-large positive correlation. However, what I found was a very neat negative correlation:

I know the p-value in the above formulas for the z-scores are taken by some not as 1-p but simply as p, thus I recalculated z(HR) and z(FAR) as
z(HR)  = norminv(HR, 0, 1)
z(FAR) = norminv(FAR, 0, 1)

To have positive d' values, I went back to its z(FAR)-z(HR) formula, but the values & their plot end up looking the same as the screenshot above.
Surely, assuming moderate FARs across the board, subjects with the highest HRs should in principle also have the highest d' values?! What am I getting confused here?
REFERENCE: Green, D. M., & Swets, J. A. (1966). Signal detection theory and psychophysics (Vol. 1). Wiley New York.

EDIT: Having done more sanity checks on the data, the calculation of the FARs was in fact erroneous, and this was leading to the absurd negative correlation described. Once that fixed, the formulas above (with p rather than 1-p for norminv, and polarity HR-FAR rather than FAR-HR) gives sensible d' values and a positive correlation. I will post this an answer as well.
 A: You could plot the ROC curves. On the plot with the zROC curve the $d^\prime$ relates to the distance between the curve and the straight line zTPR=zFPR.
If the variances of the signals and noise are equal, then the slope of the zROC curve is 1, and you get a constant $d^\prime$ as function of TPR. But you get a different slope when the variances are not equal.
Your negative correlation between TPR and $d^\prime$ means that the slope of the zROC curve is <1.

TPR: true positive rate or hit rate
FPR: false positive rate or false alarm rate
layout(matrix(1:9,3))

t = seq(-10,10,0.1)

FPR = rbinom(201,1000, p = 1 - pnorm(t,0,1))/1000
TPR = rbinom(201,1000, p = 1 - pnorm(t,2,2))/1000

plot( FPR,TPR )
lines(c(-10,10),c(-10,10), lty=2)

zFPR = qnorm(FPR)
zTPR = qnorm(TPR)

plot(zFPR, zTPR)
lines(c(-10,10),c(-10,10), lty=2)

dp = zTPR-zFPR
plot(dp,TPR)

Intuition: The z-scores of TPR and FPR are changing, when the triggerlevel of declaring a detected signal is changing. This change of the two z-scores can be at different rates, and that is the case when the variance of the signal and noise are different. If zFPR drops faster than zTPR, then the $d^\prime$ will increase for lower TPR.
A: My bad. After doing more sanity checks on the data, the calculation of the FARs was in fact erroneous, and this was leading to the absurd negative correlation described. Once that fixed, the formulas above (with p rather than 1-p for norminv, and polarity HR-FAR rather than FAR-HR) gives sensible d' values and a positive correlation.
