Simulating probability of choosing the right answer I have 20 students, 1000 questions with five options a, b, c, d, e. First, I am using rmultinom(1000,1,c(0.2,0.2,0.2,0.2,0.2) to generate the truth. Next, I want to simulate what a student chooses for each question.
Suppose for Q1, the correct answer is a, I need to simulate the probability of student 1 of choosing the correct answer to be higher than the truth. And then let the choice be uniform for the other 4 choices.
Which probability function should I use to simulate the answers?
 A: You have $k$ distinct outcomes, where each can be sampled with some probability. This means that we are talking about categorical distribution that is parametrized by vector of probabilities $\boldsymbol{p} = (p_1,\dots,p_k)$. In your case you want to sample the "correct" answer with probability $\alpha$ and rest of the answers uniformly each with probability $\frac{1-\alpha}{k-1}$. The only question you need to ask yourself is how much likely should the "correct" answer be selected. If it's $1/k$ then you sample all the answers uniformly, if it's greater than you make it more likely. In R you can simulate values from categorical distribution using sample.int(k, n, p, replace = TRUE) where k is the number of categories, n is sample size and p is vector of probabilities, or rcat function from extraDistr package.
However if I were you I'd consider if this is a valid model for simulation. I guess it is rarely the case that either answers are given uniformly, or that single answer is more common while other are uniformly distributed. There are available solutions for model-based simulations, e.g. based on Item Response Theory models that are more realistic than your idea (check e.g. psych package for R)
