Independence in counting problems I have been re-working some counting problems that I did in college (a long time ago in a galaxy far far away) and I just had an insight that I would like verification on.

Consider the following two problems:


  How many meals can be formed from 3 appetizers 2 mains and 3 desserts?


Everyone learns that this is simply,
$$3*2*3$$
and that this resulting set is unordered, meaning that $$\{Salad,Chicken,Pie\} = \{Pie,Chicken,Salad\} $$
People call this the fundamental counting rule sometimes.

Okay, now on the opposite end we have complete dependence, 


  How many ways can a president and vice president be chosen from a group of 5 people?


Everyone's intuition here is again
$$5*4$$
which looks an awful lot like the above, except our result is ordered.
How can that be since in both cases we are just taking the product over all possibilities? 

This confused me for a long time until I realized the crucial difference is independence. The reason the top is unordered is because appetizer is independent of main course which is independent of dessert, whereas the reason the bottom is ordered is because picking a vice president is not independent of picking a president because the sample space decreases by $1$

Is this true?
Yes. That is correct. You can refer to Rule of Product to understand why the first one order doesn't matter but the second one does. 


  Rule of product. If there are $a$ ways of doing action $A$ and $b$ ways of doing action $B$ thing, then there are $ab$ ways of performing both actions.


For the first one, three actions are: choosing appetisers, choosing mains and choosing deserts. The combination of three actions will be choosing an appetiser, a main and a desert in which order doesn't matter.

For the second one, two actions are: choosing the first one out of $5$ people to be present and choosing one from the rest $4$ people to be vice president. With these actions, we can see that the order matters, where first person we choose must be president. Hence, we have $(A,B) \ne (B,A)$ since with $(A,B)$ then $A$ is the president, but with $(B,A)$ then $B$ is the president.
The  product rule for counting says that if a task consists of three steps, there are $n_1$ ways to do the first step of the task, there are $n_2$ ways to do the second step regardless of which choice was made in the first step, and there are $n_3$ ways to do the third step regardless of which choices were made in the first two steps, then the number of ways to complete the task is the product $n_1 n_2 n_3$.  

This formula is applicable to both your examples.  There is some kind of independence here (and therefore some kind of independence in both your examples) because the number of ways $n_2$ to do the second step is independent of which choice was made in the first step, and similarly for $n_3$.