# Calculating d-prime

I'm currently working on a research that has to use and calculate D Prime values for a task where subjects are presented an image at different speeds and they have to report if they saw the image or not. I've read different basic articles on D Prime and it's formulas but I still don't quite get it and I'm not sure of which values use for it's formula. For example: sometimes the formula says to use the mean and I'm not sure if I should use the mean of the subject's score or the mean of the entire sample.

• Welcome to cogsci.SE! This could be an interesting question, but can you make it more specific so readers know what information you're looking for? I.e., what articles have you read, what calculations are you unsure of, etc. – Krysta Feb 12 '15 at 14:25

To calculate $d'$ you need to know two things: the hit rate and the false alarm rate. The hit rate is the proportion of trials where the stimulus was present and the subject responded that the stimulus was present. The false alarm rate is the proportion of trials where the stimulus was not present, and the subject responded that the stimulus was present. Sometimes it will be shown like this:

• Hit rate is the probability of a yes response given the target is present: $H = P( yes | present)$
• False alarm rate is the probability of a yes response given the target is absent: $FA = P( yes | absent)$

Once you have those two numbers the calculation is $d' = z(H) - z(FA)$.

The z-transform is based on the standard normal distribution, and you can look up the z-value for a given probability in a table, or use a function like NORMSINV in Excel or qnorm in R.

For most applications, you will want to calculate $d'$ for each individual subject, i.e., $H$ and $FA$ are based only on the data from a single subject. Then you can look at how experimental manipulations affect the distribution of $d'$ values.

The index of sensitivity $d'$ is typically defined in terms of two equal variance normally distributed random variables with means $\mu_s$ and $\mu_n$ and standard deviation $\sigma$:

$$d'=\frac{\mu_s-\mu_n}{\sigma}$$

In behavioural experiments, the probability that the subjects responded correctly (either saying 'yes' when the signal was present or saying 'no' when the signal was absent) is often reported. The problem is that probability of responding correctly depends on the bias of the subjects (how often they respond 'yes'). The advantage of using $d'$ is that it is a bias free measure of performance. While we cannot measure $\mu_s$, $\mu_n$, and $\sigma$ directly in typical behavioural experiments, $d'$ can be estimated from the hit rate $H$ (the probability of responding 'yes' given the signal was present) and the false alarm rate $FA$ (the probability of responding 'yes' given the signal was absent):

$$d'=z(H)-z(FA)$$

where $z(\cdot)$ is the z-transform.