My participant goes through a maze made of 32 T intersections. At each intersection he must choose whether to go either to the left or to the right: one option will lead to another T intersection, while the other option will lead to a blind alley. So if the participant goes in the wrong direction, he will get feedback in the sense that he is in a blind alley now, and he needs to go back and turn the other way.
If I code as 1 the times the correct turn is to the right and as 0 the times the correct turn is to the left, this is my maze:
turn_right <- c(1,0,0,0,1,0,1,0,0,0,0,1,1,0,0,0,1,1,1,0,1,1,0,1,1,1,1,0,1,0,0,1)
At each intersection, a sign points either to the left or to the right. A storm has messed up the signs, so that now only 50% of them are correct. The participant knows that the storm has made some damage to the signage system, but he does not what kind of damage, that is, he does not know the percentage of signs that are correct.
These are my signs, where a 1 means that the sign points to the correct direction, and a 0 means that the sign points to the wrong direction.
sign <- c(1,0,1,0,0,1,1,1,0,1,0,1,0,1,0,1,0,0,1,1,1,1,0,0,0,0,0,1,1,0,0,1)
Now I observe the behavior of my participant. Sometimes he follows the sign (1), sometimes he does not (0):
trust_sign <- c(0,0,0,0,0,0,0,0,1,1,1,0,0,1,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0)
My question: can I infer what is the prior belief of the participant before entering the maze? That is, how much he trusts the signage system?
Since we have binary choices, I thought I could model the participant's choices (trust_sign) with a beta distribution:
maze <- data.frame(turn_right, sign, trust_sign) sum32 <- sum(maze$trust_sign[1:32]) curve(dbeta(x, sum32, 32- sum32),add=TRUE,lty="solid",ylim=c(0,6),ylab="Probability Density",las=1)
I can also calculate the likelihood of a sign being correct given the actual maze:
k = 16 # number of times a sign is correct n = 32 # total number of intersections numSteps = 200 ## x-axis for plotting x = seq(0, 1, 1 / numSteps) L = x^k * (1 - x)^(n - k) ## Likelihood function L = L / sum(L) * numSteps ## Just normalize likelihood plot(x, L, type = 'l', lwd = 3, ylim = c(0,6), main = "Bernoulli Likelihood", xlab = expression(theta), ylab = "pdf")
Given that likelihood and the behavior seen before, what is the belief of my participant prior to entering the maze? Can I calculate a global prior belief? Or should I calculate the prior belief for each single sign, and see how it changes while the participant navigates the maze?
Is this the right framework for this question or am I missing something?