I’m sorry, I thought the formulas I gave were evident of what I needed to calculate. If for example you take 6 choose 3, this gives you 20 combinations. If you apply the variance formula on each set of combinations, you get a range of results from 0.666 to 4.666. If I wanted to count the number of combinations that lie between 1 and 4, what would the formula be to do this?
In what sense does a combination "lie between 1 and 4"? A combination is a
set.
Let's see if I can figure out what you mean.
First, it appears that you are interested in combinations
of the set {1, 2, 3, 4, 5, 6}; nothing about the concept requires that, as you can have, say, combinations of letters or of club members.
Now you are listing all 20 such combinations, and finding the variance of each of them; for example, the variance of the set {1, 2, 3] is 2/3, and the variance of {1, 2, 6} is 4 2/3. (I notice that you are using the population variance formula, not the sample variance, and it could be argued that the combination is actually a sample; but it's your problem, so I won't worry about that.)
So now you are asking, I think, how to count (or list?) the combinations whose
variance is within an arbitrary interval, in this case [1, 4].
Is that what you mean?
Then the remaining question is, do you have some reason to think there should be a
formula for this? It doesn't seem likely to me, but someone might be interested in trying.