Probabilities, 7 items, 4 containers

In summary, the conversation discusses a method for determining the probability of different outcomes when using a tetrahedron as a random number generator to place items into containers. The approach involves counting the number of occurrences of each possible outcome and comparing it to the total number of possible outcomes. The conversation also mentions a book, "An Introduction to Probability Theory" by Feller, which provides a similar example and raises the concern of long run times when increasing the number of items or containers. The conversation ends with a discussion on using permutations versus combinations to determine probabilities.
  • #1
rcgldr
Homework Helper
8,876
638
Starting a new thread to avoid hi-jacking my previous thread:

https://www.physicsforums.com/forumdisplay.php?f=73

There are 7 items, and 4 containers. A 4 sided die (tetrahedron) is used as a random number generator and is thrown 7 times. After each toss, an item is dropped into a container corrersponding to the bottom side of the die.

There are (n+r-1)c(r) = 10c7 = 120 possible outcomes. Here is a table showing the possible outcomes. Each digit of each 4 digit number represents the number of items in a container:

0007 0016 0025 0034 0043 0052 0061 0070 0106 0115
0124 0133 0142 0151 0160 0205 0214 0223 0232 0241
0250 0304 0313 0322 0331 0340 0403 0412 0421 0430
0502 0511 0520 0601 0610 0700 1006 1015 1024 1033
1042 1051 1060 1105 1114 1123 1132 1141 1150 1204
1213 1222 1231 1240 1303 1312 1321 1330 1402 1411
1420 1501 1510 1600 2005 2014 2023 2032 2041 2050
2104 2113 2122 2131 2140 2203 2212 2221 2230 2302
2311 2320 2401 2410 2500 3004 3013 3022 3031 3040
3103 3112 3121 3130 3202 3211 3220 3301 3310 3400
4003 4012 4021 4030 4102 4111 4120 4201 4210 4300
5002 5011 5020 5101 5110 5200 6001 6010 6100 7000

Out of these 120 outcomes, (7-1)c(4-1) = 6c3 = 20 of them have no empty containers.

1114 1123 1132 1141 1213 1222 1231 1312 1321 1411
2113 2122 2131 2212 2221 2311 3112 3121 3211 4111

The goal here is to determine the probability of occurrence for each of the 120 possible outcomes.

One method that could be used to calculate the probablities would be to consider the total number of possible outcomes of the 7 throws of the 4 sided die as a 7 digit number in base 4, going from {0,0,0,0,0,0,0} (all items in first container), to {3,3,3,3,3,3,3} (all items in last container), so total number of cases = 47 = 16384.

A program could cycle through all 16384 cases, creating a histogram for the 120 possible outcomes. For examples of the output of using such a program, each of the 4 permutations for {0,0,0,7} occurs in 1 of the 16384 cases, each of the 4 permutations of {1,1,1,4} occurs in 210 of the 16384 cases, each of the 12 permutations of {1,1,2,3} occurs in 420 of the 16384 cases, and each of the 4 permutations of {1,2,2,2} occurs in 630 of the 16384 cases.

I'm wondering if this is a valid approach for determining the probabilities of the outcomes.
 
Last edited:
Mathematics news on Phys.org
  • #2
Beware: not all distributions are equally likely. For example, (1,1,1,4,0,0,0...) is less likely than (1,1,2,3,0,0,0,...).

You can find this type of problem all worked out in Feller, "An Introduction to Probability Theory", Volume 1, 3rd edition, section II.5. He has an example which is very similar to your problem.
 
  • #3
awkward said:
Beware: not all distributions are equally likely. For example, (1,1,1,4,0,0,0...) is less likely than (1,1,2,3,0,0,0,...).
I have {1,1,1,4} => 210/16384, {1,1,2,3} => 420/16384, so it's 1/2 as likely using my method.

awkward said:
You can find this type of problem all worked out in Feller, "An Introduction to Probability Theory", Volume 1, 3rd edition, section II.5.
I see if I can find this book in a library.

The main concern is if my approach was OK.
 
  • #4
rcgldr said:
I have {1,1,1,4} => 210/16384, {1,1,2,3} => 420/16384, so it's 1/2 as likely using my method.

I see if I can find this book in a library.

The main concern is if my approach was OK.
Your approach will work, at least if you count the number of occurrences correctly, but you are in for some very long run times if you increase the number of items or containers by much.
 
  • #5
awkward said:
Your approach will work, at least if you count the number of occurrences correctly, but you are in for some very long run times if you increase the number of items or containers by much.
I realize this, there's an expansion series that can be used to count the number of ways to get

7 items into 4 (non-empty) containers:
(4c4) ( (4c4)(47)) - (4c3)(37) + (4c2)(27) - (4c1)(17) ) = 8400.

7 items into 3 containers:
(4c3) ( (3c3)(37) - (3c2)(27) + (3c1)(17) ) = 7224.

7 items into 2 containers:
(4c2) ( (2c2)(27) - (2c1)(17) ) = 756

7 items into 1 container:
(4c1) ( (1c1)(17) ) = 4

You can also use a variation on probability to calculate the number of ways to produce vidual patterns, for each of the the 4 permuations of {1 2 2 2}, number of ways = (7!) / (1! 2! 2! 2!) = 630, for each of the 4 permutations of {1 1 1 4}, number of ways = (7!) / (1! 1! 1! 4!) = 210, ...

Keeping the size of the problem small enough to generate historgrams with a program allowed me to verify that the formulas I use corresponded to the program's results. The numbers match, but the main concern is using permutations instead of combinations to determine probability of patterns (or number of ways for a specific pattern versus number of ways for all patterns).
 
Last edited:

FAQ: Probabilities, 7 items, 4 containers

1. What is the probability of selecting one item from a set of seven?

The probability of selecting one item from a set of seven is 1/7 or approximately 14.3%.

2. If we randomly distribute seven items into four containers, what is the probability of having equal distribution?

The probability of having equal distribution when randomly distributing seven items into four containers is 1/35 or approximately 2.9%.

3. What is the probability of selecting at least one item from a set of seven when there are four containers?

The probability of selecting at least one item from a set of seven when there are four containers is 4/7 or approximately 57.1%.

4. How many different combinations of items can be distributed into four containers?

There are 35 different combinations of items that can be distributed into four containers when there are seven items in total.

5. How does the probability change if we add more items or containers?

The probability will change depending on the number of items and containers. The more items there are, the lower the probability of selecting a specific item becomes. Similarly, the more containers there are, the lower the probability of having equal distribution becomes.

Back
Top