# The `sdt` Module¶

 `d_prime` Calculate the sensitivity index d’. `a_prime` Calculate the sensitivity index A’. `criterion` Calculate the decision criterion C.

Signal detection theory calculations.

`pphelper.sdt.``a_prime`(hits, false_alarms, n, nafc=1)

Calculate the sensitivity index A’.

Parameters: hits (float) – The number of hits when detecting a signal. false_alarms (float) – The number of false alarms. n (int) – The number of trials in target and no-target trials. nafc (int, optional) – The number of alternative choices in the task. A value of `1` implies a Yes/No task. Defaults to 1. A – The calculated A’. float

Example

```>>> from pphelper import sdt
>>> sdt.A_prime(20, 10, 25)
0.79166666666666674
```
`pphelper.sdt.``criterion`(hits, false_alarms, n, nafc=1)

Calculate the decision criterion C.

Parameters: hits (float) – The number of hits when detecting a signal. false_alarms (float) – The number of false alarms. n (int) – The number of trials in target and no-target trials. nafc (int, optional) – The number of alternative choices in the task. A value of `1` implies a Yes/No task. Defaults to 1. C – The decision criterion. This will be zero for an unbiased observer, and non-zero otherwise. In a 1-AFC (Yes/No) task, a value smaller than 0 implies a bias to responding “Yes”, and a value greater than 0 a bias to responding “No”. float

Example

```>>> from pphelper import sdt
>>> sdt.criterion(20, 10, 25)
-0.29413706521855731
```
`pphelper.sdt.``d_prime`(hits, false_alarms, n, nafc=1)

Calculate the sensitivity index d’.

Parameters: hits (float) – The number of hits when detecting a signal. false_alarms (float) – The number of false alarms. n (int) – The number of trials in target and no-target trials. nafc (int, optional) – The number of alternative choices in the task. A value of `1` implies a Yes/No task. Defaults to 1. d – The calculated d’ value, z(hit_rate) - z(fa_rate). float

Example

```>>> from pphelper import sdt
>>> sdt.d_prime(20, 10, 25)
1.094968336708714
```