# The Probability of Making a Mistake Given Discrete Events

This feels like grade-school level probability but I'm having a bit of trouble thinking about it :(

Broadly speaking: I'm predicting $n$ independent Bernoulli events, what's the probability of me making at most $k$ ($k < n$) number of mistakes?

I try to formulate the problem into a more formal setting:

Given the Bernoulli distribution of a set of independent events $\mathcal{A} = \{e_1, e_2, e_3, ..., e_n \}$, the probability of me not making a mistake (or success): $p(e_i)$ is known and fixed. (for an example: $\mathcal{A} = \{e_1, e_2, e_3\}$, and $p(e_1)=0.3, p(e_2)=0.6, p(e_3)=0.7$, each one means how likely am I going to succeed at event $i$).

I want to use these statistics (but possibly I can collect more...if needed), to compute the following:

1. What is the probability of me with complete success (making zero mistake)? (I'm thinking it's $1 - \prod_i (1-p(e_i))$)
2. What is the probability of me making at least one mistake? (regardless of which one)
3. Is there a formula equation for this $\forall n \forall k$?

Any help would be appreciated!!

1. This is rather $\prod p(e_i)$ given your definition of $p(e_i)$. Independence turns "and"s into products.

2. This is $1-$ whatever the answer to 1. was.

3. The probability of getting it right $k$ times is the following sum: $$\sum_{I\subset \{1, \ldots, n\}\\\ \ \ \ \ |I|=k}\left(\prod_{i\in I}p(e_i)\right)\left(\prod_{j\not \in I}1-p(e_j)\right)$$

• Wow...I can't believe I made a mistake even for Q1...how embarrassing! Can you maybe explain a bit more on your general formula of 3? I understand asdf's P(1 success) but hmmm, the set notation $I$ here confuses me a little... Apr 22, 2018 at 21:57
• You have $n\choose k$ ("$n$ choose $k$") subsets of size $k$ in $\{1,\ldots , n\}$. The event that you get it right $k$ times splits into $n\choose k$ events (where you get it right exactly at the $k$ times specified in a given subset $I$ of size $k$). The probability that you get it right for each Bernoulli whose index $i$ lies in $I$ is the product of all $p(e_i)$ with $i\in I$, times the product of all $1-p(e_j)$ with $j$ not in $I$, since for these $j$s you get it wrong. Apr 22, 2018 at 22:01
• Thank you. So for the outer sum, $\sum_{I}$, the sum over set $I$, $I$ is actually all combinations of events like $(e_1, e_2), (e_1, e_3), ...$ etc. when $k=2$ ...I think I get it now! this is more mechanical than I thought :) Apr 22, 2018 at 22:16
• @windweller Exactly. You could also write this sum as $\sum_{1\leq i_1<i_2<\ldots <i_k\leq n}$, thus giving names to the elements of what I call $I$. This is also possible. Then you would have $\prod_{\ell=1}^k p(e_{i_\ell})$, etc. The $I$ notation is a bit more compact. Apr 22, 2018 at 22:37

For $1)$, the probability is $\prod_{i=1}^{n}p(e_i)$ since this amount to every trial being a success using independence of the trials. Your expression shows the probability that we have at least one success since $\prod_{i=1}^{n}(1-p(e_i))$ is the probability of no successes.

For $2)$ we have that the probability is $1-\prod_{i=1}^{n}p(e_i)$ since the complement of the event $\{\text{no mistakes}\}$ is the event $\{\text{at least one mistake}\}$

As far as I can tell, a general formula could be made but it would be disgusting:

For example, for $1$ success, you can have the formula: $$\mathbb{P}(\text{1 success})=\sum_{j=1}^{n}p(e_j)\prod_{i=1,i\neq j}^{n}(1-p(e_i))$$

What this basically says is that we first choose the success and then make all the other trials fail.

For more successes it would be similar, though you'll have to use binomial coefficients so that you can choose the successes out of all trials.

Finally, if all of the trials are identical and independent Bernoulli, then you can have a look at the Binomial distribution since it is a sum of the said Bernoulli variables(they have to be independent and identically distributed to work).

• Unfortunately they are not identically distributed (as per my example..the Bernoulli parameters are different)...ah I think I can understand your P(1 success) formula! Not sure how I can generalize this but thanks for explaining everything! Apr 22, 2018 at 21:55