The probability that Student $1$ performs better than Student $2$ on an examination

87 Views Asked by At

Suppose there's a exam with 5 questions. If the probability that Student $1$ correctly answers question $i$ is $P_{1.i}$, then

$P_{1.1} = 0.3$ , $P_{1.2} = 0.4$ , $P_{1.3} = 0.9$, $P_{1.4} = 0.7$ , $P_{1.5} = 0.1$

For Student $2$,

$P_{2.1} = 0.4$ , $P_{2.2} = 0.5$ , $P_{2.3} = 0.2$, $P_{2.4} = 0.8$ , $P_{2.5} = 0.1$

What is the probability that Student $1$ performs better than Student $2$ ?

How to solve something like that? I want an expression to do this.

2

There are 2 best solutions below

4
On

Compute all probabilities $P(C_i = j)$ where $C_i$ is the number of correct questions scored by student $i$. These are just sums of products of the $P_{i,j}$ really. Then sum all $P(C_1 = j)P(C_2 = k)$ over all pairs $j > k$ that are allowed. This is allowed by independence of the scores of both students.

E.g. to compute the probability that student 1 has 2 correct answers, consider all combinations of two answers out of the five. Say one of these is $\{i,j\}$, which means that student $1$ answers questions $i$ and $j$ correctly and the others incorrectly. The chance of exactly that happening is $P_{1,i} \times P_{1,j}$ times all factors $(1-P_{1,n})$ where $n \neq i,j$. And this we have to do for all $\binom{5}{2}$ sets of possible $\{i,j\}$ to compute $P(C_1 = 2)$.

This is quite tedious to do by hand, so I wrote a program:

The results were:

P student 1 has 0 correct = 0.011340 P student 2 has 0 correct = 0.043200 P student 1 has 1 correct = 0.142200 P student 2 has 1 correct = 0.260400 P student 1 has 2 correct = 0.397800 P student 2 has 2 correct = 0.406400 P student 1 has 3 correct = 0.340000 P student 2 has 3 correct = 0.236400 P student 1 has 4 correct = 0.101100 P student 2 has 4 correct = 0.050400 P student 1 has 5 correct = 0.007560 P student 2 has 5 correct = 0.003200 1 does better with probability 0.471532 2 does better with probability 0.243788 equal score with probability 0.284680

1
On

Comment: I wish you success with @HennoBrandsma's approach (+1). It seems there will be some bookkeeping in considering all the possibilties. In case it is of any use (e.g., for checking intermediate results), here are simulated distributions for Student 1, Student 2, and Difference scores.

It is reasonable to expect the simulated probabilities to be accurate to two or three places.

Although Student 1 will do slightly better on average, it seems that there is slightly less than a 50:50 chance for Student 1 to do better than Student 2. However, there are about 3 chances in 4 Student 1 will do as well or better.

set.seed(429)
m = 10^6;  p1=c(3,4,9,7,1)/10;  p2=c(4,5,2,8,1)/10
s1 = replicate(10^6, sum(rbinom(5, 1, p1)))
round(table(s1)/m,3)
s1
    0     1     2     3     4     5 
0.011 0.142 0.398 0.340 0.101 0.008 
s2 = replicate(10^6, sum(rbinom(5, 1, p2)))
round(table(s2)/m,3)
s2
    0     1     2     3     4     5 
0.043 0.260 0.407 0.236 0.051 0.003 
d = s1 - s2
round(table(d)/m,3)
d
   -5    -4    -3    -2    -1     0     1     2     3     4     5 
0.000 0.001 0.011 0.060 0.172 0.285 0.272 0.148 0.044 0.006 0.000 

mean(s1 > s2)
[1] 0.471404
mean(s1 >= s2)
[1] 0.756087


par(mfrow=c(1,3))
 hist(s1, prob=T, br=(0:6)-.5, col="skyblue2", main="Student 1 Scores")
 hist(s2, prob=T, br=(0:6)-.5, col="skyblue2", main="Student 2 Scores")
 hist(d, prob=T, br=(-5:6)-.5, col="skyblue2", main="Difference in Scores")
  abline(v = .5, col="red", lwd=3, lty="dashed")
par(mfrow=c(1,1))

enter image description here