<p>I haven't done much d-prime stuff for a long time, but perhaps check out the <code>discrim</code> function in the <code>sensR</code> package in R.</p>

<p><a href="http://www.inside-r.org/packages/cran/sensR/docs/discrim" rel="nofollow">http://www.inside-r.org/packages/cran/sensR/docs/discrim</a></p>

<p>For example, if I understand correctly you could pass arguments like the following: a person had 60 items correct out of 100 and null hypothesis d-prime is 0 (you can specify either a null d-prime or a null probability of correct).</p>

<pre><code>library(sensR)
discrim(correct = 60, total = 100, d.prime0=0)
</code></pre>

<p>This produces the  following output:</p>

<pre><code>Estimates for the duotrio discrimination protocol with 60 correct
answers in 100 trials. One-sided p-value and 95 % two-sided confidence
intervals are based on the 'exact' binomial test. 

        Estimate Std. Error Lower  Upper
pc         0.600    0.04899   0.5 0.6967
pd         0.200    0.09798   0.0 0.3934
d-prime    1.115    0.31360   0.0 1.6958

Result of difference test:
'exact' binomial test:  p-value = 0.02844 
Alternative hypothesis: d-prime is greater than 0 
</code></pre>

<p>I.e., you appear to get a lower and upper confidence interval on d-prime (e.g., 0 to 1.6958). The confidence interval can be specified with the <code>conf.level</code> argument but defaults to 0.95. There's more details in Christensen (2015).</p>

<p>Christensen, R. H. B. (2015). Statistical methodology for sensory discrimination tests and its implementation in sensR. <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.192.6348&amp;rep=rep1&amp;type=pdf" rel="nofollow">http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.192.6348&amp;rep=rep1&amp;type=pdf</a></p>

CC BY-SA 3.0
2016-07-20T01:50:13.860Z
The sensR library only considers paradigms where d' can be calculated directly from Pc (e.g., 2AFC). This is a much easier proble, since there is only one random variable. In the more general case where d' depends on pit and pFA, the library and it's approaches are hopeless.
StrongBad
CC BY-SA 3.0
2016-07-20T02:45:10.687Z
Okay. Makes sense. I'll leave the answer up in case it helps others searching for the simpler problem.
Jeromy Anglim
CC BY-SA 3.0
2016-07-20T01:25:13.230Z
2016-07-20T01:25:13.230Z
Jeromy Anglim
<p>I have an experiment with $N$ signal trials and $M$ no signal trials and I have measure the number of hits $nHit$ and the number of false alarms $nFA$. From this I can compute the probability of a hit $p(Hit)$, the probability of a false alarm $p(FA)$, and the index of sensitivity $d^\prime$. Specifically, I define $d^\prime=z(p(Hit))-z(p(FA))$ where $z(.)$ is the inverse of the normal distribution cumulative density function.</p>

<p>I can also find the confidence intervals of $p(Hit)$ and $p(FA)$ with the inverse of the binomial distribution cumulative density function. Is there a similar way of calculating the confidence interval of $d^\prime$ that doesn't involve resampling the data (e.g., bootstrapping). </p>

<statistics><signal-detection>
How to calculate the confidence interval for $d^\prime$ (d prime)?
StrongBad
# How to calculate the confidence interval for $d^\prime$ (d prime)?

(Asked by: username_0 on 2016-07-19)

I have an experiment with $N$ signal trials and $M$ no signal trials and I have measure the number of hits $nHit$ and the number of false alarms $nFA$. From this I can compute the probability of a hit $p(Hit)$, the probability of a false alarm $p(FA)$, and the index of sensitivity $d^\prime$. Specifically, I define $d^\prime=z(p(Hit))-z(p(FA))$ where $z(.)$ is the inverse of the normal distribution cumulative density function.

I can also find the confidence intervals of $p(Hit)$ and $p(FA)$ with the inverse of the binomial distribution cumulative density function. Is there a similar way of calculating the confidence interval of $d^\prime$ that doesn't involve resampling the data (e.g., bootstrapping).

**Tags:** statistics, signal-detection


---

## 1 answers

### Answer by username_1 on 2016-07-20. Score: 1

I haven't done much d-prime stuff for a long time, but perhaps check out the discrim function in the sensR package in R.
http://www.inside-r.org/packages/cran/sensR/docs/discrim
For example, if I understand correctly you could pass arguments like the following: a person had 60 items correct out of 100 and null hypothesis d-prime is 0 (you can specify either a null d-prime or a null probability of correct).
library(sensR)
discrim(correct = 60, total = 100, d.prime0=0)

This produces the  following output:
Estimates for the duotrio discrimination protocol with 60 correct
answers in 100 trials. One-sided p-value and 95 % two-sided confidence
intervals are based on the 'exact' binomial test. 

        Estimate Std. Error Lower  Upper
pc         0.600    0.04899   0.5 0.6967
pd         0.200    0.09798   0.0 0.3934
d-prime    1.115    0.31360   0.0 1.6958

Result of difference test:
'exact' binomial test:  p-value = 0.02844 
Alternative hypothesis: d-prime is greater than 0 

I.e., you appear to get a lower and upper confidence interval on d-prime (e.g., 0 to 1.6958). The confidence interval can be specified with the conf.level argument but defaults to 0.95. There's more details in Christensen (2015).
Christensen, R. H. B. (2015). Statistical methodology for sensory discrimination tests and its implementation in sensR. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.192.6348&rep=rep1&type=pdf

> **Comments:**
> **username_0**: The sensR library only considers paradigms where d' can be calculated directly from Pc (e.g., 2AFC). This is a much easier proble, since there is only one random variable. In the more general case where d' depends on pit and pFA, the library and it's approaches are hopeless.  
> **username_1**: Okay. Makes sense. I'll leave the answer up in case it helps others searching for the simpler problem.  

---

