
Probability and Statistics Basic Probability and Statistics Math Forum 
 LinkBack  Thread Tools  Display Modes 
July 18th, 2017, 01:30 PM  #1 
Newbie Joined: Jul 2017 From: U.s. Posts: 4 Thanks: 1  Tough Probabilty question
If you had 10 guesses to pick 5 random numbers from 143, what are you chances of guessing 5 correct?(4 correct, 3 correct, etc.) Thanks in advance 
July 18th, 2017, 01:31 PM  #2 
Newbie Joined: Jul 2017 From: U.s. Posts: 4 Thanks: 1 
If you notice any errors in the format please feel free to let me know thanks 
July 18th, 2017, 01:38 PM  #3 
Senior Member Joined: Oct 2009 Posts: 139 Thanks: 56 
Anything you tried already? Can you classify your problem in terms of drawing balls from a jar? Do we draw balls with or without repitition? Do we care about order? Does this make sense to you? 
July 18th, 2017, 01:44 PM  #4 
Newbie Joined: Jul 2017 From: U.s. Posts: 4 Thanks: 1 
I am unsure of how to figure the problem out. We do not care about order. Will be selecting in repetition, meaining once you choose a ball you do not put it back in the jar. I figure the probability of your first choice is 1/43 or somewhere around 2 percent. After that i am not sure where to go. 
July 19th, 2017, 07:31 PM  #5 
Senior Member Joined: Jul 2012 From: DFW Area Posts: 601 Thanks: 80 Math Focus: Electrical Engineering Applications 
Hi Synced23, I think that I have worked out the answers to your questions. I have written a Ruby program to compare random samples with my calculated answers and they compare favorably. I will provide the Ruby code if anyone requests it. The caveat is, the probabilities do not add to 1 since by my method of calculation if the given array is, for example, [1,2,3,4,5] and the first guess is [1,2,6,7,8] and the second guess is [1,2,3,9,10] then this counts as matching both 2 and 3 correct numbers within the 10 guesses. Anyway, my method is to look at the total number of possibilities for 5 matching, 4 matching, etc., divided by the total number of possibilities that could be chosen for the set of numbers. Additionally, since in your last post you start your reasoning of the problem in terms of probabilities of the first digit (1/43), I will work an example that more closely resembles your line of reasoning. So here we go: Since we have 10 tries, I think that we need to use the binomial distribution. Furthermore, since you want to know if you match a given number of elements or not, and not exactly how many matches there are of the given number of elements in the 10 tries, we can use the formula given in the link for 0 matches, and subtract it from 1 (as this gives us the number of matches, 110, of the given number of elements). For 0 matches in 10 tries, the formula reduces to: $\displaystyle \large (1p)^{10}$ where $p$ is the probability of each try, since (as given by the referenced formula): $\displaystyle \large { \normalsize{{10 \choose 0}} = \frac{10!}{0! \ 10!}=1 \quad \text{and} \quad p^0=1}$ So the probability of any number of matches, 110, is: $\displaystyle \large 1  (1p)^{10}$ Now we need to calculate $p$ for the various numbers 05. Let's first calculate the total number of possibilities. Since there is no repetition, we have our choice of 43 numbers, then 42 numbers, etc., down to 39 numbers. So the total number of possibilities is: $\displaystyle \large 43 \cdot 42 \cdot 41 \cdot 40 \cdot 39 = 115,511,760$  To calculate $p$ for all 5 correct numbers we have our choice of 5 numbers, then 4 numbers, etc., down to 1 for the fifth number: $\displaystyle \large 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1 = 120$ So: $\displaystyle \large p_5=\frac{120}{115,511,760} \qquad \text{and}$ $\displaystyle \large P_5=1\left (1\frac{120}{115,511,760} \right)^{10} \approx \fbox{0.000010}$  To calculate $p$ for 4 correct numbers we have our choice of 5 numbers, then 4 numbers, etc., down to 2 for the fourth number. There are then 39 numbers left, one of which is in the given array. So for the last number in the guess we have our choice of 38 numbers. But this represents only the number of possibilities when the last number is the one that does not match. In reality, this may come in any of the 5 positions so we have to multiply by 5. $\displaystyle \large 5 \cdot 4 \cdot 3 \cdot 2 \cdot 38 \cdot \LARGE 5 \large = 22,800$ So: $\displaystyle \large p_4=\frac{22,800}{115,511,760} \qquad \text{and}$ $\displaystyle \large P_4=1\left (1\frac{22,800}{115,511,760} \right)^{10} \approx \fbox{0.001972}$ Generally, since we have 5 numbers and we are matching $m$ numbers, the number of possibilities is: $\displaystyle \large \frac{5!}{m! \ (5m)!} \qquad \text{so in the case above:}$ $\displaystyle \large \frac{5!}{4! \ 1!}= \LARGE 5$  To calculate $p$ for 3 correct numbers we have our choice of 5 numbers, then 4 numbers, down to 3 for the third number. There are then 40 numbers left, two of which are in the given array. So for the last two numbers in the guess we have our choice of 38 numbers, then 37 numbers. Keeping in mind the number of possibilities as described above: $\displaystyle \large 5 \cdot 4 \cdot 3 \cdot 38 \cdot 37 \cdot \frac{5!}{3! \ 2!} = 843,600$ So: $\displaystyle \large p_3=\frac{843,600}{115,511,760} \qquad \text{and}$ $\displaystyle \large P_3=1\left (1\frac{843,600}{115,511,760} \right)^{10} \approx \fbox{0.070678}$  To calculate $p$ for 2 correct numbers we have our choice of 5 numbers, then 4 numbers. There are then 41 numbers left, three of which are in the given array. So for the last three numbers in the guess we have our choice of 38 numbers, 37 numbers, then 36 numbers. So: $\displaystyle \large 5 \cdot 4 \cdot 38 \cdot 37 \cdot 36 \cdot \frac{5!}{2! \ 3!} = 10,123,200$ So: $\displaystyle \large p_2=\frac{10,123,200}{115,511,760} \qquad \text{and}$ $\displaystyle \large P_2=1\left (1\frac{10,123,200}{115,511,760} \right)^{10} \approx \fbox{0.600357}$  To calculate $p$ for 1 correct number we have our choice of 5 numbers. There are then 42 numbers left, four of which are in the given array. So for the last four numbers in the guess we have our choice of 38 numbers, 37 numbers, 36 numbers, then 35 numbers. So: $\displaystyle \large 5 \cdot 38 \cdot 37 \cdot 36 \cdot 35 \cdot \frac{5!}{1! \ 4!} = 44,289,000$ So: $\displaystyle \large p_1=\frac{44,289,000}{115,511,760} \qquad \text{and}$ $\displaystyle \large P_1=1\left (1\frac{44,289,000}{115,511,760} \right)^{10} \approx \fbox{0.992058}$  To calculate $p$ for 0 correct numbers we cannot match any numbers. Since there are 5 numbers in the given array, there is a choice of 38 numbers, then 37 numbers, ... , down to 34 numbers. So: $\displaystyle \large 38 \cdot 37 \cdot 36 \cdot 35 \cdot 34 \cdot \frac{5!}{0! \ 5!} = 60,233,040$ So: $\displaystyle \large p_0=\frac{60,233,040}{115,511,760} \qquad \text{and}$ $\displaystyle \large P_0=1\left (1\frac{60,233,040}{115,511,760} \right)^{10} \approx \fbox{0.999370}$ The averages of 3 runs of 10 million given arrays, with 10 choices each, are given with the approximate computed values: $\displaystyle \large \begin{array}{ccc} \hline P_x & \text{Computed} & \text{Program Output Average} \\ \hline 5 & 0.000010 & 0.000010 \\ \hline 4 & 0.001972 & 0.001969 \\ \hline 3 & 0.070678 & 0.070667 \\ \hline 2 & 0.600357 & 0.600308 \\ \hline 1 & 0.992058 & 0.992062 \\ \hline 0 & 0.999370 & 0.999376 \\ \hline \end{array}$  Finally, let's work the problem in a way that is more similar to your line of reasoning as started in your last post. Let's take $p_3$. For the first number, we have a 5/43 chance of getting one right, a 4/42 chance for the next one, and a 3/41 chance for the third one. For the next number, we have a 38/40 chance of not matching, and a 37/39 chance of not matching for the last number. We still have the same number of possibilities for arrangement so we have: $\displaystyle \large p_3= \frac{5}{43} \cdot \frac{4}{42} \cdot \frac{3}{41} \cdot \frac{38}{40} \cdot \frac{37}{39} \cdot \frac{5!}{3! \ 2!} = \frac{84,360}{115,511,760} \cdot 10 = \frac{843,600}{115,511,760}$ which is the same as before for $p_3$. $P_3$ would be calculated the same way too. I hope this helps (and I hope that it is correct). 
July 20th, 2017, 06:59 PM  #6 
Newbie Joined: Jul 2017 From: U.s. Posts: 4 Thanks: 1 
WOW! you are awesome! i apologize because i did not understand the degree of difficulty that question entailed. I would have never been able to figure that out. your answer makes so much sense and i definitely believe it is right! thank you so much for taking the time to do that. I take my hat off to you sir! 

Tags 
probabilty, question, tough 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Dice type probabilty question  Bulldog177  Probability and Statistics  6  February 26th, 2016 05:26 PM 
Doubt on discrete joint probabilty question  szz  Probability and Statistics  8  April 1st, 2015 06:14 AM 
Probabilty question  yeoky  Probability and Statistics  2  April 19th, 2014 01:32 AM 
A very tough question  cyanide911  Algebra  0  August 5th, 2009 03:26 AM 
Probabilty/Odds Question  dan400  Algebra  1  December 3rd, 2008 04:12 AM 