D-prime

D-prime is an index for the discriminability of a signal from noise.

Calculating D-prime

For signals with quantitative values and assummed that values are normally distributed, d-prime is defined as mean(signal) - mean(noise) divided by the square root of the half the sum of variance(noise) plus variance(signal)

Calculating D-prime based on hit rate

The d-prime index can aslo be derived from hit and false-alarm rates by calculating the inverse of the cumulative distribution function of the Gaussian distribution.

In r this is done like this this:

n = length(observations)
hits = length(observations[ observations$hit == TRUE])
hr = hits / n 
fa = 1 - hr 
dprime = qnorm (hr) - qnorm(fa)

References

Ian Neath Psychological department MUN wikipedia