Family Tree

Family Tree

About Me

My photo
Kathmandu, Bagmati Zone, Nepal
I am Basan Shrestha from Kathmandu, Nepal. I use the term 'BASAN' as 'Balancing Actions for Sustainable Agriculture and Natural Resources'. I am a Design, Monitoring & Evaluation professional. I hold 1) MSc in Regional and Rural Development Planning, Asian Institute of Technology, Thailand, 2002; 2) MSc in Statistics, Tribhuvan University (TU), Kathmandu, Nepal, 1995; and 3) MA in Sociology, TU, 1997. I have more than 10 years of professional experience in socio-economic research, monitoring and documentation on agricultural and natural resource management. I had worked in Lumle Agricultural Research Centre, western Nepal from Nov. 1997 to Dec. 2000; CARE Nepal, mid-western Nepal from Mar. 2003 to June 2006 and WTLCP in far-western Nepal from June 2006 to Jan. 2011, Training Institute for Technical Instruction (TITI) from July to Sep 2011, UN Women Nepal from Sep to Dec 2011 and Mercy Corps Nepal from 24 Jan 2012 to 14 August 2016 and CAMRIS International in Nepal commencing 1 February 2017. I have published articles to my credit.

Friday, June 29, 2018

Discrete Probability Distribution of Sampling Without Replacement, Tree Diagram and Formula, Statistical Note 18

Among 40 participants in a training, 18 were vegetarians and 22 were non-vegetarians. 2 participants are selected at random one after another without replacement of the name of the first selected participant. Calculate the probability distribution of vegetarians in which the order does not matter whether the vegetarians are sampled or not in the first or second draw.

Counting the total and favorable numbers of outcomes constituting the specified number of objects sampled without replacement from the finite discrete binary population is important to calculate the probability of favorable events. Tree diagram is an important means to visualize, count the number of outcomes and calculate the probability. Formula is another means of counting the outcomes and calculating the discrete probability distribution. I have taken an example from my statistical notes 3 and 6 to show how to visualize and calculate the discrete probability distribution without replacement using the tree diagram and formula.

Tree Diagram

In this example, two participants will be selected consecutively without replacement, referred to as sampling without replacement. The probability of each outcome is presented in Diagram 1. For detailed discussion on how they are derived please refer to my statistical note 6.










Diagram 1: First and second steps showing marginal and conditional probabilities (without replacement of the first selected participant)

There are two possibilities, either the selected participant is a vegetarian or a non-vegetarian. The joint probability that both the first and second selected participants are the vegetarians, denoted by P(V1∩V2), is the product of P(V1) and P(V2/V1) which is equal to 0.197. Following the same process, other joint probabilities are calculated, P(V1∩NV1) equal to 0.253, P(NV1∩V1) equal to 0.253, and P(NV1∩NV2) equal to 0.297.
  
Table 1: Discrete probability distribution of vegetarians sampled without replacement
The probability distribution of vegetarians as per the question is discussed (Table 1). Let X be an event that takes the discrete value or the number of vegetarians in two consecutive selection of participants. X takes the value 2 for the joint probability P(V1∩V2) that vegetarians are selected both the times, 1 for both joint probabilities P(V1∩NV1) and P(NV1∩V1), which are same as one of two participants are randomly selected at the first stage or the second stage is a vegetarian if the position of the vegetarian does not matter. Thus, their probabilities are added. X takes the value 0 for the joint probability P(NV1∩NV2) that none of two selected participants is a vegetarian.

The probability distribution of vegetarians shows that there is 29.7 percent chance that no vegetarian (or both non-vegetarians) is selected, there is 50.6 percent chance that one of two participants selected will be a vegetarian and there is 19.7 percent chance that both participants will be vegetarians or none of them will be non-vegetarian. If the probabilities are added, there is 80.3 percent chance that up to one vegetarian will be selected. There is cent percent chance of getting two or less number of vegetarians in the draw of two participants.

Formula

This example has three characteristic features. First, the example has a finite population of 40 participants, denoted by ‘N’. Second, each participant can be characterized as success or failure. Since the question asks the probability of vegetarians, the selection of a vegetarian is considered as a success, say denoted by ‘Z’, and there are 18 successes in the population. Third, a sample of two participants, denoted by ‘n’, is selected without replacement in a way that each sample of 2 participants is equally likely to be selected.

Let X be a random variable of interest that takes one of 0, 1 or 2 values as the number of vegetarians in the sample of two participants sampled without replacement, denoted by ‘x’. The probability distribution of X depends on the parameters, ‘n’, ‘M’ and ‘N’, and is given by the expression
P(X=x) = h(x;n,M,N) = Number of outcomes having X=x divided by total number of outcomes
P(X=x) = h(x;n,M,N) = [C(M,x) X C(N-M,n-x)]/C(N,n)

This distribution is referred to as Hypergeometric distribution.

In this example, n=2, M=18, N=40 and ‘x’ takes the value 0 to 2. Putting these values in the above formula, one gets
  
P(X=0) = [C(18,0) X C(22,2)/C(40,2)] = (22 X 21)/ (40 X 39)= 0.297
P(X=1) = [C(18,1) X C(22,1)/C(40,2)] = (18 X 22 X 2)/ (40 X 39) = 0.506
P(X=2) = [C(18,2) X C(22,0)/C(40,2)] = (18 X 17)/ (40 X 39) = 0.197

These values are equal to the ones presented in table 1 above. It indicates that both tree diagram and formula produce the same values are useful to calculate the discrete probability distribution without replacement.

Discrete Probability Distribution of Sampling With Replacement and Tree Diagram and Formula, Statistical Note 17

Among 40 participants in a training, 18 were vegetarians and 22 were non-vegetarians. 2 participants are selected at random one after another with replacement of the name of the first selected participant. Calculate the probability distribution of vegetarians in which the order does not matter whether the vegetarians are sampled or not in the first or second draw.

Counting the total and favorable numbers of outcomes constituting the specified number of objects sampled with replacement from the finite discrete binary population is important to calculate the probability of favorable events. Tree diagram is an important means to visualize, count the number of outcomes and calculate the probability. Formula is another means of counting the outcomes and calculating the discrete probability distribution. I have taken this example from statistical notes 3 and 7 to show how to visualize and calculate the discrete probability distribution with replacement using the tree diagram and formula.

Tree Diagram

There will be two consecutive selections of two participants with replacement, referred to as sampling with replacement. The probability each outcome is presented in Diagram 1. For detailed discussion on how they are derived please refer to my statistical note 7.
Diagram 1: First and second steps showing marginal probabilities (with replacement of the first selected participant)

There are two possibilities, either the selected participant is a vegetarian or a non-vegetarian. The joint probability that both the first and second selected participants are the vegetarians, denoted by P(V1∩V2), is the product of P(V1) and P(V2) which is equal to 0.202. Following the same process, other joint probabilities are calculated, P(V1∩NV1) equal to 0.248, P(NV1∩V2) equal to 0.248, and P(NV1∩NV2) equal to 0.303.

Table 1: Discrete probability distribution of vegetarians sampled with replacement

The probability distribution of vegetarians as per the question is discussed (Table 1). Let X be an event that takes the discrete value or the number of vegetarians in two consecutive selection of participants. X takes the value 2 for the joint probability P(V1∩V2) that vegetarians are selected both times, 1 for both joint probabilities P(V∩NV) and P(NV∩V) are same as one of two participants randomly selected at the first stage or the second stage is a vegetarian if the position of the vegetarian does not matter. Thus, their probabilities are added.  X takes the value 0 for the joint probability P(NV∩NV) that non-vegetarians are selected both times.

The probability distribution of vegetarians shows that there is 30.3 percent chance that no vegetarian (or both non-vegetarians) is selected, there is 49.6 percent chance that one of two participants selected will be a vegetarian and there is 20.2 percent chance that both participants will be vegetarians or none of them will be non-vegetarian. If the probabilities are added, there is 79.9 percent chance that up to one vegetarian will be selected. There is cent percent chance of getting two or less number of vegetarians in the draw of two participants.

Formula

This example has three characteristic features. First, the example has a finite population of 40 participants, denoted by ‘n’. Second, each participant can be characterized as success or failure. Since the question asks the probability of vegetarians, the selection of a vegetarian is considered as a success, say denoted by ‘p’, and there are 18 successes in the population; and the selection of a non-vegetarian is considered as a failure, denoted by ‘q’. Third, each observation is independent so that the probability of ‘p’ or ‘q’ is same for each outcome. Fourth, a sample of two participants, denoted by ‘x’, is selected with replacement in a way that each sample of 2 participants is equally likely to be selected.

Let X be a random variable of interest that takes one of 0, 1 or 2 values as the number of vegetarians in the sample of two participants sampled with replacement, denoted by ‘x’. The probability distribution of X depends on the parameters, ‘n’ and ‘p’, and is given by the expression
P(X=x) = C(n,x)pxqn-x

This distribution is referred to as Binomial distribution.

In this example, n=2 and p=18/40 and ‘x’ takes the value 0 to 2. Putting these values in the above formula, one gets
  
P(X=0) = [C(2,0) X (18/40)0 X (22/40)2] = (22 X 22)/ (40 X 40)= 0.303
P(X=1) = [C(2,1) X (18/40)1 X (22/40)1] = (18 X 22)/ (40 X 40) = 0.496
P(X=2) = [C(2,2) X (18/40)2 X (22/40)0] = (18 X 18)/ (40 X 40) = 0.202

These values are equal to the ones presented in table 1 above. It indicates that both tree diagram and formula produce the same values are useful to calculate the discrete probability distribution with replacement.

Sunday, June 24, 2018

Binomial Distribution: Counting of Outcomes Using Tree Diagram and Formula, Statistical Note 16

Toss a fair coin three times, list whether a head or tail occurs each time a coin is tossed and count the number of outcomes of three tosses in which the order whether head or tail occurs first or last in an outcome does not matter. Expand the formula to ‘n’ number of tosses.

Counting the total and favorable numbers of outcomes constituting the specified number of objects selected for a binary variable is important to calculate the probability of favorable events for the Binomial Probability Distribution. Tree diagram is an important means to visualize and count the number of outcomes. However, as the number of times the objects are selected increases, the diagram becomes complicated and it will be less possible to show all outcomes in the diagram. Thus, in that case one needs to use the formula to count the number of outcomes. This article presents both tree diagram and Binomial Distribution formula to exemplify the process of counting.

Let X be a binary variable that takes one of two values Head (H) or Tail (T) in any of three independent tosses of a coin, also known as the sampling with replacement. There will be altogether eight outcomes in three tosses, grouped into four combinations if the order of the coin side whether H or T occurs does not matter. This is the case of all objects sampled with replacement in which order does not matter, as discussed in my previous statistical notes 10 and 15  (Diagram 1). Every toss is independent and in every toss any of all possible values are likely to occur.

















Diagram 1: Outcomes of All Objects Selected With Replacement in which the Order of Objects does not Matter

Four combinations of three objects include – one set of all three heads (HHH or H3), three sets of two heads and one tail in any order (3HHT or 3H2T) three sets of one head and two tails in any order (3HTT or 3HT3) or one set of three tails (TTT or T3).

As the number of toss increases, the diagram becomes complicated and it will be less possible to show all outcomes in the diagram. Thus, in that case one needs to use the formula to count the number of outcomes.

The total number of outcomes is, in this case the sum of H3, 3H2T, 3HT3 and T3. It is an expansion of H plus T cube, that is (H+T)3. Using the same logic, the total number of outcomes in four tosses can be calculated using the formula (H+T)4. If a coin is tossed ‘n’ number of times, the total number of outcomes will be (H+T)n. The expanded form of this formula will look like:
(H+T)n = C(n,0)Hn+C(n,1)Hn-1T+C(n,2)Hn-2T2+C(n,3)Hn-3T3+ C(n,x)Hn-xTx+……+ C(n,n)Tn

In the above formula, C(n,x) is the combination of x tails in in ‘n’ tosses. It is termed as Binomial coefficient, which is derived by number of tosses of a coin as exemplified in Diagram 2.









Diagram 2: Number of toss of a coin and Binomial Coefficient using Pascal’s Triangle

The total number of heads or tails over the n independent tosses is a discrete random variable (X) that takes the values from 0 to n. This random variable X is said to follow the binomial distribution. The probability of ‘x’ tails (or ‘n-x’ heads in ‘n’ tosses, P (X=x), is given by the expression C(n,x)Hn-xTx. This helps to calculate the probability of all possible outcomes, for example, three heads in three tosses of a coin. 

Friday, June 22, 2018

Counting of Outcomes Using Tree Diagram and Formula, Statistical Note 15

Counting the total and favorable numbers of outcomes constituting the objects selected is important to calculate the probability of favorable events. An appropriate process of counting needs to be followed to get an appropriate result. Tree diagram is an important means to visualize and count the number of outcomes. However, as the number of objects available and selected increases, the diagram becomes complicated and it will be less possible to show all outcomes in the diagram. Thus, in that case one needs to use the formula to count the number of outcomes. This article presents both tree diagram and formula to exemplify the appropriate process of counting.

1. Conditions for Counting of Outcomes

Population or Sample: Population is the entire count of all objects or the sampling units, also called the sample space. Population census is an example in which all people are counted. Not feasible to study the entire population. Usually, a sample constituting some sampling units or objects is drawn from the population. Household survey is a common example of selecting some households from the entire list of households. This article considers that all objects are different, that is both population or sample constitute objects that are different from one another.

Without or With Replacement: Whether all or some objects are selected one may be interested to know whether the objects are drawn without or with replacement. In selecting without replacement, the object is not replaced back once selected so that the probability of occurrence of an outcome changes from one experiment or trail to the next. This process is also referred to as sampling without replacement. Unlike, the object is replaced back after it is selected so that the object is available for following selections. and the probability of occurrence does not change from one trail to next. This process is also referred to as sampling with replacement.

Order or Non-order: Whether an object is selected without or with replacement, if the order of objects matters, the club of objects forms a separate outcome. This is also called Ordered Sampling. This leads to the calculation of Permutation. If the order of objects does not matter, the outcomes constituting the objects are same whether the objects occur in one order or another. This is called Non-ordered or Unordered Sampling.

2. Formula

Overall, the multiplication principle is applied, which is the product of the number of objects available for selection every time to the times the number of objects need to be selected to get the total number of outcomes whether all objects (population) or some (sample) of them need to be selected. The formula differs from one condition to another as presented in Diagram 1.














Diagram 1: Formula of Counting the Number of Outcomes by Sampling technique and Order of Objects

Let ‘n’ be the total number of objects (population) and ‘r’ be the size of the sample drawn. If out of ‘n’ objects ‘r’ objects (sample) are selected at random without replacement such that the order or the order of each object matters is given by the Permutation formula, denoted by ‘nPr’or P(n,r) is given by n!/(n-r)!, that is ‘n’ Factorial divided by ‘n-r’ Factorial. If the order does not matter, the total number of outcomes constituting the objects selected without replacement is counted using the Combination formula, denoted by ‘nCr’ C(n,r), (nr) is given by n!/ (n-r)! r!, that is ‘n’ Factorial divided by ‘(n-r)’ Factorial divided by ‘r’ Factorial. If out of ‘n’ objects ‘r’ objects are selected at random with replacement such that the order of each object matters is given by the Exponential formula, denoted by ‘nr’or ‘n power r’. If the order does not matter, the total number of outcomes is counted using the formula, denoted by ‘n+r-1Cr’ C(n+r-1,r), (n+r-1 r) is given by (n+r-1)!/(n-1)! r!, that is ‘n+r-1’ Factorial divided by ‘(n-1)’ Factorial divided by ‘r’ Factorial.

3. Example

The examples use tree diagram and formula to visualize and count the number of outcomes using all objects or some of them selected randomly without or with replacement considering or not the order of objects in the outcomes.

Example 1:   Outcomes of All Objects Selected Without Replacement in which the Order of Objects Matters

A bag contains four balls of different colors (A of Red color, B Blue, C Green and D yellow). Select the first ball at random and do not replace back to the bag. Select remaining balls one at a time following the same process. Calculate the total number of possible outcomes containing all four balls selected without replacement in which the order of the balls matters.

Tree Diagram: In this example that I discussed in my statistical note 8, there are 24 unique outcomes each constituting all four balls, Red (A), Blue (B), Green (C) and Yellow (D) selected one at a time without replacement and arranged in which the order of balls matters. The outcomes are indicated by numbers on the right most side of Diagram 2.
Diagram 2: Outcomes of All Objects Selected Without Replacement in Which the Order of Objects Matters

Formula: In above example, the Permutation Formula n!/(n-r)! is used (see formula listed in the cell between ‘Without Replacement’ and ‘Matters order of objects’ in Diagram 1). In this case, all ‘n’ objects are selected so that both ‘n’ and ‘r’ are equal to 4 balls. Using the formula, we get 4!/0!, which is equal to 4! as 0! is equal to 1. On further calculation one gets 4 X 3 X 2 X 1 equal to 24, applying the multiplication principle. Thus, both tree diagram and formula came up with 24 outcomes in which the order of each ball matters.

Example 2:   Outcomes of All Objects Selected Without Replacement in which the Order of Objects does not Matter

A bag contains four balls of different colors (A of Red color, B Blue, C Green and D yellow). Select the first ball at random and do not replace back to the bag. Select remaining balls one at a time following the same process. Calculate the total number of outcomes containing all four balls selected without replacement in which order of the balls does not matter.

Tree Diagram: In this example that I discussed in my statistical note 10, there is only one combination of all 24 outcomes each constituting all four balls, Red (A), Blue (B), Green (C) and Yellow (D) selected one at random without replacement and the order of balls does not matter. Because every of 24 outcomes has all four balls arranged in one way or the other. This is indicated by 1 number on the right most part of the diagram 1 to mean one combination in Diagram 3.
























Diagram 3: Combination of All Objects Selected Without Replacement in which the Order of Objects does not Matter

Formula: In above example, the Combination Formula n!/(n-r)!*r! is used  (see formula listed in the cell between ‘Without Replacement’ and ‘Does Not Matters Order of Objects’ in Diagram  1). In this case, all ‘n’ objects are selected so that both ‘n’ and ‘r’ are equal to 4 balls. Using this value in the formula, we get 4!/0!*4!, which is equal to 1 as 0! Is equal to 1. Thus, both tree diagram and formula came up with one combination of same 24 outcomes in which the order of balls does not matter.
Example 3: Outcomes of All Objects Selected With Replacement in which the Order of Objects Matters

A bag contains three balls of different colors (A of Blue color, B Green and C Red). Select all three balls randomly one at a time and replace back to the bag after selecting. Calculate the total number of combination of possible outcomes containing all three balls selected with replacement in which the order of balls matters.

Tree Diagram: In this example that I discussed in my statistical notes 10, there are 27 outcomes each constituting all three balls, Blue (A), Green (B) and Red (C) selected one at random with replacement and the order of balls matters. Because every of nine outcomes has all three balls arranged in one way or the other. The unique outcomes are indicated by numbers on the right most part of the Diagram 4.











Diagram 4: Outcomes of All Objects Selected With Replacement in which Order of the Objects Matters

Formula: In above example, the Exponential Formula nr is used (see formula listed in the cell between ‘With Replacement’ and ‘Matters Order of Objects’ in Diagram  1). In this case, all ‘n’ objects are selected so that both ‘n’ and ‘r’ are equal to 3 balls. Using this value in the formula, we get 33, which is equal to 27. Thus, both tree diagram and formula came up with 27 unique outcomes of balls in which the order of balls matters.

Example 4: Outcomes of All Objects Selected With Replacement in which the Order of Objects does not Matter

A bag contains three balls of different colors (A of Blue color, B Green and C Red). Select all three balls randomly one at a time and replace back to the bag after selecting. Calculate the total number of combination of possible outcomes containing all three balls selected with replacement in which the order of balls does not matter.

Tree Diagram: In this example that I discussed in my statistical notes 10, there are 10 combinations of all 27 outcomes each constituting all three balls, Blue (A), Green (B) and Red (C) selected one at random with replacement in which the order of balls does not matter. Each combination is indicated by a number on the right most part of the Diagram 5.
Diagram 5: Outcomes of All Objects Selected With Replacement in which the Order of Objects does not Matter

Formula: In above example, a formula (n+r-1)!/(n-1)!*r! is used (see formula listed in the cell between ‘With Replacement’ and ‘Does Not Matters Order of Objects’ in Diagram  1). In this case, both ‘n’ and ‘r’ are equal to 3 balls. Using these values in the formula, we get 5!/2!*3!, which is equal to 10. Thus, both tree diagram and formula came up with 10 combinations of 27 outcomes consisting of three balls in which the order of balls does not matter.

Example 5: Some Objects (Sample) Selected Without Replacement from All Objects (Population) in which Order of Objects Matters

A bag contains four balls of different colors (A of Red color, B Blue, C Green and D yellow). Select two balls randomly one at a time and do not replace back to the bag after selecting. Calculate the total number of combination of possible outcomes containing two balls selected without replacement in which the order of the balls matters.

Tree Diagram: In this example that I discussed in my statistical notes 10 and 11, the process is same as that discussed above in Example 1. There are 12 unique outcomes each constituting two balls selected one at a time without replacement from the total of four balls, Red (A), Blue (B), Green (C) and Yellow (D) in which the order of balls matters. The outcomes are indicated by numbers on the right most part of the Diagram 6.


Diagram 6: Outcomes in Selecting Two Out of Four Balls Without Replacement in which the Order of Balls Matters

Formula: In above example, as in Example 1 the Permutation Formula n!/(n-r)! is used (see formula listed in the cell between ‘Without Replacement’ and ‘Matters order of objects’ in Diagram  1). In this case, ‘n’ is equal to 4 balls and ‘r’ is equal to 2 balls. Using these values to the formula, we get 4!/2!, which is equal to 12. Thus, both tree diagram and formula came up with 12 unique outcomes in which the order of each ball matters.

Example 6: Some Objects (Sample) Selected Without Replacement from All Objects (Population) in which Order of Objects does not Matter

A bag contains four balls of different colors (A of Red color, B Blue, C Green and D yellow). Select two balls randomly one at a time and do not replace back to the bag after selecting. Calculate the total number of outcomes containing two balls selected without replacement in which the order of the balls does not matter.

Tree Diagram: In this example that I discussed in my statistical notes 10 and 11 and in Example 2 above, there are six combinations of 12 outcomes each constituting two balls selected one at a time without replacement from the total of four balls, Red (A), Blue (B), Green (C) and Yellow (D) in which the order of balls does not matter. The outcomes are indicated by numbers on the right most part of the Diagram 7.

Diagram 7: Outcomes in Selecting Two Out of Four Balls Without Replacement in which the Order of Balls Matters

Formula: In the above example, the combination formula n!/(n-r)!*r! is used (see formula listed in the cell between ‘Without Replacement’ and ‘Does Not Matters Order of Objects’ in Diagram  1). In this case, ‘n’ is equal to 4 and ‘r’ equal to 2 balls. Using these values in the formula, we get 4!/(4-2)!*2!, which is equal to 4!/2!*2!, equal to 6. Thus, both tree diagram and formula came up with six combinations of 12 outcomes in which the order of the balls does not matter.

Example 7: Some Objects (Sample) Selected With Replacement from All Objects (Population) in which the Order of Objects Matters

A bag contains three balls of different colors (A of Blue color, B Green and C Red). Select two balls one randomly one at a time and replace back to the bag after selecting. Calculate the total number of outcomes containing two balls selected with replacement in which the order of balls matters.

Tree Diagram: In this example that I discussed in my statistical notes 10 and 12 and Example 3 above, there are nine outcomes each constituting all three balls, Blue (A), Green (B) and Red (C) selected one at random with replacement and the order of balls matters.. The unique outcomes are indicated by numbers on the right most part of the Diagram 8.

Diagram 8: Outcomes in Selecting Two Out of Three Balls With Replacement in which the Order of Balls Matters

Formula: In the above example, the Exponential Formula nr is used (see formula listed in the cell between ‘With Replacement’ and ‘Matters Order of Objects’ in Diagram  1). In this case, both ‘n’ is equal to 3 and ‘r’ equal to 2 balls. Using these values in the formula, we get we get 32, which is equal to 9. Thus, both tree diagram and formula came up with nine unique outcomes of balls in which the order of balls matters.

Example 8: Some Objects (Sample) Selected With Replacement from All Objects (Population) in which the Order of Objects does not Matter

A bag contains three balls of different colors (A of Blue color, B Green and C Red). Select two balls one randomly one at a time and replace back to the bag after selecting. Calculate the total number of outcomes containing two balls selected with replacement in which the order of balls does not matter.

Tree Diagram: In this example that I discussed in my statistical notes 10 and 12 and Example 4 above, there are six combinations of nine outcomes each constituting all three balls, Blue (A), Green (B) and Red (C) selected one at random with replacement and the order of balls does not matters. Each combination is indicated by a number on the right most part of the Diagram 9.

Diagram 9: Outcomes in Selecting Two Out of Three Balls With Replacement in which the Order of Balls does not Matter

Formula: In above example, a formula (n+r-1)!/(n-1)!*r! is used (see formula listed in the cell between ‘With Replacement’ and ‘Does Not Matters Order of Objects’ in Diagram  1). In this case, ‘n’ is equal to 3 and ‘r’ is equal to 2 balls. Using these values in the formula, we get 4!/2!*2!, which is equal to 6. Thus, both tree diagram and formula came up with six combinations of 12 outcomes consisting two balls in which the order of balls does not matter.