4 2 Signal Detection Theory

4 2 Signal Detection Theory


4.2 Signal Detection Theory

This is the note for Rouder's book 4.2

This section talked about a simple version of signal detection experiment. The resultant (neural) strength of sensation due to the for example an auditory stimulation can be modelled as two normal densities, one is for the tone absent and the other is for the tone present. The former is assumed to follow a standard normal and the latter is a normal density with mean, 0+d', and equal variance as the tone absent condition. A decision threshold is assumed to be fixed at c, which is a strength value that when an observer feels that the tone-induced sensation surpasses c, a tone present response is then initialised.

The data are the counts of hit, miss, false alarm and correct rejection. Thus, the data are still modelled by two binominal functions with the probabilities of hit and false alram as the parameters. The probabilities of hit and false alarm are derived from (normal) cumulative probability functions of the sensory strengths induced by the tone absent and the tone present conditons.

# par=c(d',c) y=c(hit, miss, fa, cr)
nll.sd <- function(par, y) {
p <- 1:4
p[1] <- 1 - pnorm(par[2], par[1], 1) # quantile, mean and sd
p[2] <- 1 - p[1] # Pm
p[3] <- 1 - pnorm(par[2]) # Pf
p[4] <- 1 - p[3]
-sum(y * log(p))
}

y <- c(40, 10, 30, 20) # the counts of hit, miss, fa, cr
par <- c(1, 0) # initial values

# cannot find the option of 'maximum', so I used negative log-likelihood
optim(par, nll.sd, y = y)
## $par
## [1] 0.5882 -0.2535
##
## $value
## [1] 58.67
##
## $counts
## function gradient
## 51 NA
##
## $convergence
## [1] 0
##
## $message
## NULL

# Conventional estimators
hit.rate <- 40/50
fa.rate <- 30/50
(c.est <- -qnorm(fa.rate))
## [1] -0.2533
(dprime.est <- qnorm(hit.rate) - qnorm(fa.rate))
## [1] 0.5883

I cannot find the maximum option in the optim help page, so changed the ll.sd to nll.sd. Rouder possibly used a previous version of optim function? The function, optimize, offers the maximum option, though.

Condition A 404 96 301 199 Condition B 348 152 253 265 Condition C 287 213 183 317 Condition D 251 249 102 396 Condition E 148 352 20 480

hit.rate <- c(404/(404 + 96), 348/(348 + 152), 287/(287 + 213), 251/(251 + 249), 
148/(148 + 352))
fa.rate <- c(301/(301 + 199), 253/(253 + 265), 183/(183 + 317), 102/(102 + 396),
20/(20 + 480))

# c(bottom, left, top, right)
par(mfrow = c(2, 1), mai = c(1.1, 1.2, 0.2, 1))
plot(fa.rate, hit.rate, ylab = "Hit Rate", xlab = "False Alarm Rate", xlim = c(0,
1), ylim = c(0, 1), pch = 16)
text(1, 0.1, "A", cex = 0.8)
plot(qnorm(fa.rate), qnorm(hit.rate), ylab = "z(Hit Rate)", xlab = "z(False Alarm Rate)",
xlim = c(-2, 2), ylim = c(-2, 2), pch = 16)
text(2, -1.7, "B", cex = 0.8)
abline(1.5, 1)
abline(0.75, 1)
abline(0.1, 1)

plot of chunk unnamed-chunk-2

Comments

Popular posts from this blog

Shaun White Skateboarding Offline Fix SKIDROW MediaFire

2015 2016 Kwara State University KWASU Post UTME Result is out