Stars and bars and probabilities So this is related to unordered sampling with replacement, suppose I have a ball that bounces 4 times, there are 3 spots on the ground and it can only bounce on those, all 3 are equally likely.
We are interested in the probability that the ball bounces on one specific spot all 4 times.
One way would be: there are 3 spots for the first bounce and we want one specific so it's $\frac{1}{3}$ and we repeat it 4 times so $\frac{1}{81}$.
Another is the solution to $x_1+x_2+x_3=4$, where $x_1=4$ out of all the possible ones, which comes out to $\frac{1}{15}$.
The second is wrong but I'm not sure how to articulate where it fails.
 A: You randomly place a ball in one of the three spots (named A, B, C) and you repeat it four times.
Are these two probabilities same?
i) All four times the ball is placed in spot A
ii) Three times the ball is placed in spot A and one time in spot B
When you find number of ways using stars and bars as $15$, one of those $15$ ways is event (i) and another of them is (ii).
But if you think further, (ii) is more likely to happen. Why? There are different orders in which event (ii) can occur. The ball could land in spot B in any of the four attempts and rest of the attempts it lands in spot A. So (ii) is $4$ times more likely. But stars and bars misses it. That is why we say that events we count in stars and bars are not equally likely (or probable).
Take a simple example of two tosses of a fair coin, which has been talked about many times on this site. What is the probability you get one H and one T? $\frac{1}{2}$ or $\frac{1}{3}$?
A: Let's denote $X_i^j$ to be a binary indicator (Bernoulli) random variable denoting whether or not $i^{th}$ bounce of the ball ended in $j^{th}$ spot, where $i \in \{1,2,3,4\}$ and $j \in \{1,2,3\}$. Then we have the constraint: $\sum\limits_{j=1}^{3}{X_i^j}=1$, $\forall{i}$, which can (trivially) be solved using stars and bars, s.t., we have $3+1-1 \choose 1$ $=3$ ways, for each bounce $i=\{1,2,3,4\}$. (as mentioned by @Math Lover, we need to consider the order of bounce)
Now, since variables $X_i^j$ and $X_{i'}^{j'}$ are independent for $i \neq i'$, we have total possible outcomes in sample space = $3^4=81$, out of which only one (e.g., for spot 1, we must have $X_1^1=X_2^1=$ $X_3^1=X_4^1=1$) is favorable to the event.
Off course, it could be done simply by having a binomial r.v., $X\sim B(4,\frac{1}{3})$, with $P(X=4)=\frac{1}{81}$
