If you only have one type of troop, it’s a binomial distribution:
Prob(k) = (n choose k) * p^k * (1-p)^(n-k),
where k is the number of hits, n is the total number of units, and p is the probability of a hit.
If you have different units, you need a product of binomial distribution for each permutation of possible events.
So, for the example of two tanks and two infantry, what is the probability of three hits? I’ll in words, then write it out: You can have either 2 infantry hit, and one tank, or two tanks and one infantry. Those are the only two ways that you can get two hits:
Prob(3) = (2 choose 2) * (1/6)^(2) * (5/6)^(2-2) * (2 choose 1) * (3/6)^(1) * (3/6)^(2-1) + (2 choose 1) * (1/6)^(1) * (5/6)^(2-1) * (2 choose 2) * (3/6)^(2) * (3/6)^(2-2)
Prob(3) = 1 * 1/36 * 1 * 2 * 3/6 * 3/6 + 2 * 1/6 * 5/6 * 1 * 9/36 * 1
Prob(3) = 18/1296 + 90/1298
Prob(3) = 108/1298
Now, if you have 3 INF, 2 TANKS, and 1 FGT, what is the probability of 2 hits?
Well, how many ways are there to make two hits? I’ll write them out:
2 INF, 0 Tanks, 0 Fighters
1 I, 1 T, 0 F
1 I, 0 T, 1 F
0 I, 1 T, 1 F
0 I, 2 T, 0 F
An example of how one of these terms expands:
1 I, 1 T, 0 F:
(2 choose 1) * (1/6)^(1) * (5/6)^(2-1) * (2 choose 1) * (3/6)^(1) * (3/6)^(2-1) * (1 choose 0) * (3/6)^0 * (3/6)^(2-2)
If you want Prob(2), then you need to take the sum of the probabilities of all those possible ways to make 2 hits.
Clear as mud?