n <- 30
n.vec <- 0:n
We assume that up to n has an unspecified semantic lower bound \(\theta\):
\[\textit{up to 30 guests came to the party}:\quad \max\{d \mid d\textit{-many guests came to the party}\}\in [\theta, 30] \]
Using an approximate number system, we assume that the perceived numerosity of a cardinality \(m\) is \(\log (1+m)\). The main motivation of a log-transformation is that perceptual difference generally depends on the ratio. The plot below shows the numerosity scores for \(0, 1, 2, \ldots , 30\).
plot(0:n, sapply(0:n, function(m) log(1+m)), type="o",
xlab="cardinality", ylab="numerosity score")
We further assume that the (one-sided) perception error is normally distributed on the numerosity scale. In terms of cardinality, it means that people generally have \(5%--20%\) uncertainty around the true cardinality, on average \(12\%\). (This is just a rough approximation.)
log.error.mean <- log(1.12)
log.error.sd <- (log(1.2) - log(1.12)) / 2
plot(-100:300/1000, sapply(-100:300/1000, function(x) dnorm(x, mean=log.error.mean, sd=log.error.sd)),
type="l", xlab = "perception error on numerosity score", ylab = "density"
)
abline(v=log(1.12), col="red")
abline(v=log(1.2), col="blue")
abline(v=log(1.05), col="blue")
Now we can calculate the prior of the uncertainty range \([\theta, n]\): the numerosity difference between \(n\) and \(\theta\) is twice the one-sided error.
UncertaintyPrior <- function(theta, n){
# Returns the prior (density) of the speaker having uncertainty range [theta, n]
dnorm((log(1+n)-log(1+theta))/2, mean=log.error.mean, sd=log.error.sd)
}
The informativity of using \(\theta\) as the lower bound is the gain in entropy (assuming uniform prior over cardinality).
Informativity <- function(theta, n){
log(n+1) - log(n - theta + 1)
}
The posterior of \(\theta\) depends on both the prior of \([\theta, n]\) and the informativity of \(\theta\).
ThetaPosterior <- function(n){
thetas <- 0:n
Normalize(UncertaintyPrior(thetas, n) * Informativity(thetas, n))
}
plot(0:n, ThetaPosterior(n), type="o")
plot(0:10, ThetaPosterior(10), type="o")
plot(0:100, ThetaPosterior(100), type="o")