# Probability to pass an exam, generalized competition problem

In an exam there are 10 questions. If you answer correctly to a question, you get $1$ point. If you answer incorrectly to a question, you get $-1$ point, or lose a point. If you don't answer to a question, you get $0$ point. You pass the exam if you get at least $7$ points.

A pupil read the questions and estimated that he can surely answer correctly to $6$ questions, and for the rest questions he estimated that he could answer correctly with independent probabilities $p_1,p_2,p_3,p_4$ with $0\leq p_1,p_2,p_3,p_4\leq 1,p_1p_2p_3p_4=p$. What kind of strategy he must choose to make sure he takes the optimal strategy to pass the exam with respect to numbers $p_1p_2p_3p_4$?

Is that problem solvable? I mean, I figured out the optimal strategy if a student answers correctly with probability $p$ to each of the four questions. This was in Finnish mathematical competition this year. But in this version one has to given that he answers correctly to four question with probability $p$.

• Means do you want an exact nerical value?? – Archis Welankar Dec 14 '15 at 13:53
• So all we know is that if said pupil answers all 10 questions, he will have 10 correct answers with probability $p$ and less then 10 correct answers with probability $1-p$? – Abstraction Dec 14 '15 at 13:54
• Perhaps you mean that each of the remaining four questions can be answered correctly with probability $p$? (independent of any of the others) Thus, should he just attempt one, he'll pass the test with probability $p$? – lulu Dec 14 '15 at 13:55
• @Abstraction Yes, but less that 10 means 6,7,8 or 9 correct answers in this problem. – curious Dec 14 '15 at 13:59
• I think the question needs clarification. As the posted solution shows, most readers (including myself) assume that $p$ refers to a probability of getting a single question right (and people are inclined to assume independence, though you don't specify that anywhere in the question). – lulu Dec 14 '15 at 14:10

WLOG sort those $p$ in descending order such that $p_1\geq p_2 \geq p_3 \geq p_4$. Denote the $X_i$ be the binary random variable corresponding to $p_i$, i.e.

$$\Pr\{X_i = 1\} = p_i, \Pr\{X_i = -1\} = 1 - p_i$$

We need to select the optimal number $n$ such that to the passing probability is maximized:

$$p(n) = \Pr\left\{\sum_{i=1}^n X_i \geq 1\right\}, n = 1, 2, 3, 4$$

It is trivial that answering $0$ question will fail surely, and choosing the questions with the largest $p_i$ will dominate other choices for the same number $n$

Then we see

$$p(1) = \Pr\{X_1 = 1\} = p_1$$

$$p(2) = \Pr\{X_1 + X_2 = 2\} = p_1p_2 \leq p(1)$$

\begin{align*} p(3) & = \Pr\{X_1 + X_2 + X_3 = 3\} + \Pr\{X_1 + X_2 + X_3 = 1\} \\ &= p_1p_2p_3 + p_1p_2(1 - p_3) + p_1p_3(1 - p_2) + p_2p_3(1 - p_1) \\ &= p_1(p_2p_3 + p_2 - p_2p_3 + p_3 - p_2p_3 - p_2p_3) + p_2p_3 \\ &= p_1(p_2 + p_3 - 2p_2p_3) + p_2p_3 \end{align*}

\begin{align*} p(4) & = \Pr\{X_1 + X_2 + X_3 + X_4 = 4\} + \Pr\{X_1 + X_2 + X_3 + X_4 = 2\} \\ &= p_1p_2p_3p_4 + \left[p_1p_2p_3(1-p_4) + \Pr\{X_1+X_2+X_3 = 1\}p_4\right]\\ &= p_1p_2p_3 + \Pr\{X_1+X_2+X_3 = 1\}p_4 \\ &\leq p(3) \end{align*}

It reduces to compare $p(1)$ and $p(3)$.

\begin{align*} p(1) \geq p(3) & \iff p_1 \geq p_1(p_2 + p_3 - 2p_2p_3) + p_2p_3 \\ & \iff p_1 \geq \frac {p_2p_3} {1 + 2p_2p_3 - p_2 - p_3} = \frac {p_2p_3} {(1 - p_2)(1 - p_3) + p_2p_3} \end{align*}

So if $(p_1, p_2, p_3)$ satisfy the above inequality, then choose $n = 1$; otherwise choose $n = 3$

The pupil needs to calculate the expected number of points that he/she could gain/lose when:

• Answering $\color\red1$ out of the $4$ remaining questions: $\sum\limits_{n=0}^{\color\red1}(2n-\color\red1)\cdot\binom{\color\red1}{n}\cdot(p)^n\cdot(1-p)^{\color\red1-n}$
• Answering $\color\red2$ out of the $4$ remaining questions: $\sum\limits_{n=0}^{\color\red2}(2n-\color\red2)\cdot\binom{\color\red2}{n}\cdot(p)^n\cdot(1-p)^{\color\red2-n}$
• Answering $\color\red3$ out of the $4$ remaining questions: $\sum\limits_{n=0}^{\color\red3}(2n-\color\red3)\cdot\binom{\color\red3}{n}\cdot(p)^n\cdot(1-p)^{\color\red3-n}$
• Answering $\color\red4$ out of the $4$ remaining questions: $\sum\limits_{n=0}^{\color\red4}(2n-\color\red4)\cdot\binom{\color\red4}{n}\cdot(p)^n\cdot(1-p)^{\color\red4-n}$

Then, the pupil should choose the best result and operate accordingly.

Correction (based on the discussion below with @Henry):

For each $n\in[1,4]$, the pupil needs to calculate the probability of answering more than $\frac12n$ of the remaining questions correctly, choose the option with the highest probability and act accordingly:

When choosing $1$ question, the probability of answering it correctly:

$$p$$

When choosing $2$ questions, the probability of answering them correctly:

$$p^2$$

When choosing $3$ questions, the probability of answering at least $2$ of them correctly:

$$\sum\limits_{n=2}^{3}\binom3n\cdot(p)^n\cdot(1-p)^{3-n}$$

When choosing $4$ questions, the probability of answering at least $3$ of them correctly:

$$\sum\limits_{n=3}^{4}\binom4n\cdot(p)^n\cdot(1-p)^{4-n}$$

• Except you are not trying to maximise the expected number of points; you are trying to maximise the probability of $7$ or more points – Henry Dec 14 '15 at 14:06
• @Henry: Isn't that the purpose to begin with, as described in the question? The pupil already has $6$ correct answers, and simply needs the highest expectation for the remaining $4$ questions. Or am I missing something here? – barak manos Dec 14 '15 at 14:10
• You are missing that $+1$ point is very valuable, $+2, +3,+4$ just as valuable as $+1$, while $0,-1,-2,-3$ are equally bad. – Henry Dec 14 '15 at 14:19
• @Henry: Yes, but since all we want is $+1$ point, shouldn't we strive for the highest expectation, thus increasing our chances of getting (at least) that $+1$ point? I mean, the question doesn't state that it "costs any extra" to answer all questions (if necessary). – barak manos Dec 14 '15 at 14:23
• Suppose $p=\frac9{10}$. If you answer one more question then your probability of passing is $0.9$ and your expected number of points is $6.8$. If instead you answer two more questions, your probability of passing falls to $0.81$ because you lose a point for a wrong answer, even though your expected number of points has risen to $7.6$. – Henry Dec 14 '15 at 15:28