Calculating Probability of No Error with Combinations (n choose r)

In summary, the conversation discusses a question about choosing three numbers from a given set of 10 numbers and calculating the probability of no error occurring. The method of considering different cases is suggested, with the first case being all three numbers being correct and the other cases involving one or more incorrect numbers. The correct combinations and the resulting errors are determined, leading to a total of 61/120 possible ways of choosing without error.
  • #1
KataKoniK
1,347
0
Hi,

I just started a course about Statistics and I was wondering if I am doing the following question right.

Q: A student enters 2 of 6 positive numbers with "-" signs and 3 of 4 negative numbers with "+" signs. If at some stage, a program chooses 3 distinct numbers from these 10 random numbers without replacement and multiplies them, we want to calculate the probability that at this stage no error occurs.

Totally, how many different ways are there of choosing three numbers for the program at that stage?

My answer:

So, just say I entered these 10 numbers

-1 -2 3 4 5 6 7 8 9 -1, but I really intended for 1 2 3 4 5 6 -7 -8 -9 -1. Therefore, there are in total 5 numbers that are entered incorrectly. In order for no error, the computer must choose 3 numbers from a possible 5 numbers that were entered correctly. Therefore, the number of ways would be

5 choose 3 = 5! / (3! (5 - 3)!) = 10 ways correct?

Thanks for your time.
 
Physics news on Phys.org
  • #2
What happens if you choose exactly 2 of the incorrectly labelled numbers?
Does a * b = -a * -b and -a * b = a * -b?
 
  • #3
If you choose two incorrect numbers, then it will result in an error, which we do not want.
 
  • #4
Say you choose -1, -2, and 3, but -1 and -2 should have been 1 and 2.
-1 * -2 * 3 does not equal 1 * 2 * 3?
 
  • #5
Oh, I see what you mean. Well, technically that is true. Hmm, I guess we need to take that into consideration when doing the question. I'm stumped now lol
 
  • #6
A very naive approach would be to just consider different cases of the three numbers being chosen.
Case 1 : all three are correct numbers
Case 2 : two are correct and one is the wrong number
Case 3 : one correct and two wrong
Case 4 : all three are wrong

Now for each case, calculate the probability and see where u can go from there?

-- AI
 
  • #7
My answer of 10 is incorrect then? Where I just omit 5 numbers of the already given 10? 5 correct numbers, choose 3. I don't quite understand what you mean.
 
  • #8
Katakonik,
that answer just gives the answer for case 1.
what abt the other cases?

-- AI
 
  • #9
You want to know the probability of no error occurring. So figure out when errors occur:
1) Exactly 0 incorrectly labelled numbers are chosen. This obviously results in no error.
2) Exactly 1 incorrectly labelled number is chosen. Does this result in error?
3) Exactly 2 ...
4) Exactly 3 ...

If you aren't sure how to do this, there are 4 possible results (order doesn't matter): p = positive, n = negative

ppp
ppn
pnn
nnn

a positive times a positive times a positive is ? and so on:

ppp = p
ppn = n
pnn = p
nnn = n

So:

ppp = pnn
ppn = nnn

Remember order doesn't matter. In the example where -1, -2, 3 (nnp) should have been 1, 2, 3 (ppp), did it result in error? No, because ppp = pnn.

Try the other combinations. Say the correct numbers are ppp.
What results if exactly 0 are incorrect? ppp. ppp and ppp are equal, so no error.
If 1 is incorrect? ppn. ppp and ppn are not equal, so this results in error.
If 2 are incorrect? pnn. ppp and pnn are equal, so no error.
If 3 are incorrect? nnn. ppp and nnn are not equal, so this results in error.
Just go in order and do this for the rest, noting when error occurs.
 
Last edited:
  • #10
I see what you guys mean, so am I thinking right?

For the case, two are correct and one is the wrong number:

From the 10 numbers, 5 are right and 5 are wrong. Choose one wrong from the 5. so the combination of 5 choose 1 is just 5. Choose 2 right from the other 5 numbers, so the combination of 5 choose 2 is just 10. So there are a total of 5 + 10 = 15 ways for that scenario correct?
 
  • #11
You are thinking right but should u add 5+10?? or should it be 5*10??
Once u are done with this, how many in this scenario give u wrong final result??

-- AI
 
  • #12
Yeah, it's suppose to be multiplication. My mistake.

I don't understand why we need to take into account choosing 3 values where 1 or 2 of them willl be incorrect. Because the question just asks how many different ways are there of choosing three numbers at that stage - the stage where no error occurs, which means that 5 numbers that have errors will not be chosen. Can you clear this up for me? I am a bit confused.
 
  • #13
Nevermind, I mis-read the question. It says the comp chooses 10, so we must take into consideration the comp choosing incorrectly inputted numbers correct?

Just saw your edited post, honestrosewater
 
  • #14
right!

-- AI
 
  • #15
Ok, after thinking this over, is the following correct?

Case 1 : all three are correct numbers

5 choose 3 = 10 ways choosing that will yield no error.

Case 2 : two are correct and one is the wrong number

(5 choose 1) * (5 choose 2) = 50 - 1 = 49 ways of choosing that will yield an error.

Case 3 : one correct and two wrong

(5 choose 1) * (5 choose 2) = 50 ways of choosing that will not yield an error, since the similar results are achieved.

Case 4 : all three are wrong

5 choose 3 = 10 ways of choosing that will yield error.


In total, there are 61/120 possible ways of choosing. Is this right??
 
Last edited:
  • #16
Eh, I was hoping someone else would come along, because I don't know that much about probability. I think I do know one way to solve this, but I'm not promising anything.
You have 10 numbers, 5 correct, 5 incorrect. You will choose 3 numbers without replacement (clue: dependent events). You've figured out which combinations result in error:
3 correct - no error
2 correct, 1 incorrect - error
1 correct, 2 incorrect - no error
3 incorrect - error.
You want to know the probability of choosing a combination that doesn't result in error. So what is the probability of choosing A) 3 correct numbers or (clue: addition rule) B) 1 correct and 2 incorrect numbers?

A) What is the probability of choosing 3 correct numbers?
You start with 5/10 correct and 5/10 incorrect.
What is the probability that the first number you choose is correct? 5/10.
Now 4/9 are correct and 5/9 are incorrect.
What is the probability that the second number you choose is correct? 4/9.
Now 3/8 are correct and 5/8 are incorrect.
What is the probability that the third number you choose is correct? 3/8.
So the probability of choosing 3 correct numbers is 5/10 * 4/9 * 3/8.

B) What is the probabilty of choosing 1 correct and 2 incorrect numbers?
You start with 5/10 correct and 5/10 incorrect...

Find P(B) and use the addition rule: P(A or B) = P(A) + P(B) - P(A and B).
Does that make sense?
 
  • #17
Yes, that makes sense. Thank you. However, I would like to know why we need to get P(B)? Wouldn't the probability of the case for 1 correct and 2 incorrect numbers be 5/10 x 4/9 x 5/8? Or you cannot do this? Furthermore, since these are the two valid cases that will not result in an error, then the total number of ways to choose 3 numbers that will not result in error will be 60/120. Is it possible that it's 50%?


Again, thanks for your help and patience.


btw, the probability of P(A intersection B) is just the points that are both common in A and B correct? I have determined the cases where both have common points are ppp and ppn and not pnn and nnn, since there are no two correctly inputted negative numbers. So would P(A intersection B) be just 6000/518400?
 
Last edited:
  • #18
KataKoniK said:
Yes, that makes sense. Thank you. However, I would like to know why we need to get P(B)?
Because you need to find P(A or B).
Wouldn't the probability of the case for 1 correct and 2 incorrect numbers be 5/10 x 4/10 x 5/10? Or you cannot do this?
You know right away the denominators will be 10, 9, and 8 because you start with 10 numbers and remove 1 number each time (the demoninators represent your sample space).
Furthermore, since these are the two valid cases that will not result in an error, then the total number of ways to choose 3 numbers that will not result in error will be 60/120. Is it possible that it's 50%?
I get:
P(A) = 5/10 * 4/9 * 3/8 = 1/12
P(B) = 5/10 * 5/9 * 4/8 = 5/36
I would think A and B are mutually exclusive (you cannot choose both 3 correct and 1 correct, 2 incorrect), so
P(A or B) = 1/12 + 5/36 = 2/9
Again, I don't know if this is correct, but here is something to consider:
There is one way to choose (A) 3 correct and P(A) = 1/12.
There are 3 ways to choose (C) 2 correct, 1 incorrect and P(C) = 5/36.
There are 3 ways to choose (B) 1 correct, 2 incorrect and P(B) = 5/36.
There is one way to choose (D) 3 incorrect and P(D) = 1/12.
Now adding everything up: 1*(1/12) + 3*(5/36) + 3*(5/36) + 1*(1/12) = 1. This may be what's called the something distribution, and I know somehow something should add to 1, but again, I just don't really know what I'm doing. :redface:
Someone else may come along soon. Otherwise, I would go with what makes the most sense to you based on what you know. Hope I haven't made things worse. :)
 
  • #19
Thanks for the help honestrosewater. I understand what you are saying. I probably have to look at this question again and come up with something meaningful.
 
  • #20
Another way is to just consider that there is/are:
1 way to choose (A) 3 correct
3 ways to choose (B) 2 correct, 1 incorrect
3 ways to choose (C) 1 correct, 2 incorrect
1 way to choose (D) 3 incorrect.
So there are 8 possible outcomes and
P(A) = 1/8
P(B) = 3/8
P(C) = 3/8
P(D) = 1/8
So P(A or C) = 1/8 + 3/8 = 1/2.
Maybe the first approach I took was wrong. This one makes more sense. But I'll shut up now. :)
 
  • #21
Yeah, I think I get what you mean because the sample space for this question would be
S = {ppp, ppn, pnn, nnn, npp, nnp, pnp, npn} and the subset where no error occurs would be {ppp, ppn, npp, pnp}
 
  • #22
KataKoniK said:
Yeah, I think I get what you mean because the sample space for this question would be
S = {ppp, ppn, pnn, nnn, npp, nnp, pnp, npn} and the subset where no error occurs would be {ppp, ppn, npp, pnp}
If you just want to know if the combination results in error, why would it matter if the numbers were positive or negative? Edit: Also, {ppp, ppn, npp, pnp} is not the event that results in no error. For instance, choosing three positive numbers can result in error if one or all of them are incorrect.

This problem was bugging me, so I did some reading.
The experiment is the computer choosing 3 numbers out 5 correct (c) and 5 incorrect (i). So the sample space S = {(c, c, c), (c, c, i), (c, i, c), (i, c, c), ..., (i, i, i)}. There are 8 sample points or possible outcomes, however they are not all equally likely. Their probabilities follow (I was correct about this part).

P(c, c, c) = 5/10 * 4/9 * 3/8 = 60/720
P(c, c, i) = 5/10 * 4/9 * 5/8 = 100/720
P(c, i, c) = 5/10 * 5/9 * 4/8 = 100/720
P(i, c, c) = 5/10 * 5/9 * 4/8 = 100/720
P(c, i, i) = ... = 100/720
P(i, c, i) = 100/720
P(i, i, c) = 100/720
P(i, i, i) = 5/10 * 4/9 * 3/8 = 60/720

As required, the probabilities of all possible outcomes sums to 1.
The event you need to find the probability of is E = {(c, c, c), (c, i, i), (i, c, i), (i, i, c)} (this is where I made the mistake). Do you know what to do from here?
 
Last edited:
  • #23
Yes, that makes A LOT of sense now. I understand what to do now. My thinking of the subset is probably what threw me off. Thanks a lot for your effort and time honestrosewater :smile: I really appreciate it.
 

Question 1: What is the formula for calculating combinations (n choose r)?

The formula for combinations (n choose r) is n! / (r! * (n-r)!), where n is the total number of items and r is the number of items being chosen at a time.

Question 2: How do combinations differ from permutations?

Combinations and permutations both involve selecting items from a larger set, but combinations do not consider the order in which the items are selected, while permutations do.

Question 3: Can you explain the concept of "n choose r" in real-world terms?

Imagine you have a bag with 10 different colored marbles. You need to select 3 marbles from the bag, but the order in which you select them does not matter. The number of ways you can choose 3 marbles from the bag is the combination of 10 items taken 3 at a time, or "10 choose 3".

Question 4: What is the relationship between combinations and the binomial theorem?

The binomial theorem is a formula for expanding binomial expressions, and combinations are used in the coefficients of the expanded terms. Specifically, the coefficient for the term in the expansion of (a + b)^n with degree r is given by the combination "n choose r".

Question 5: How are combinations used in probability and statistics?

In probability and statistics, combinations are used to calculate the number of possible outcomes in a given scenario. For example, in a lottery with 50 numbers and you need to choose 6 numbers, the number of possible combinations is "50 choose 6". This can then be used to calculate the probability of winning the lottery.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
12
Views
964
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
14
Views
930
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
12
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
998
Back
Top