That’ll depend on how many you get from each state. In the extreme example where everyone tells you the same state, for instance, you have zero pairs that meet your criteria.
In general, though, I would make a list of the number of possible pairs of states (with 6 states, there will be 21 pairs), and for each pair, multiply the number of people in the first state times the number in the second state, to get the number of possible pairs of people from that pair of states. Then I’d add all those up.
Without thinking too much, suppose that the numbers come out to:
a live in state A
b live in state B
c live in state C
d live in state D
e live in state E
Possible pairs is equal to:
a(150-a) + b(150-a-b) + c(150-a-b-c) + d(150-a-b-c-d), or I guess:
a(b+c+d+e) + b(c+d+e) + c(d+e) + d(e)
that’s permutations and not combinations that you got there.
There are (150x149)/2 total combinations with the same 5 variables mcgato uses. Of the total combinations [ax(a-1)]/2 both live in state A, [bx(b-1)]/2 live in state B, etc.
So your number is [(150x149) - (a^2 - a) - (b^2 - b) - (c^2 - c) - (d^2 - d) - (e^2 - e)] / 2
Surely “combination” was being used in the ordinary language sense, which is a perfectly fine way to speak.
But I agree with Saint Cad’s methodology. And if the goal was to only count opposite-sex couples, the problem is even easier: total males * total females - the sum of (males * females for each particular state).
Basically, the easiest thing is to count couples without regard to statehood first, then subtract out the undesired same-state couples.
Yeah, mcgato already accounted for the combination-permutation difference by excluding a from “b(c+d+e)” and a+b from “c(d+e)”, etc. He thusly never double-counted “ab” and “ba”.
{(P^2 - P) - [(a^2 - a) + (b^2 - b) + (c^2 - c) + (d^2 - d) + (e^2 - e)]} / 2
I think I could definately make a math activity that has the students show that the two expressions are equivalent.
FWIW given 5 states and a total population of 150 with at least one resident in each state the minimum number of combinations is 590 and the max is 9000. I love Excel
For what it’s worth, in case anyone was wondering, I realize I had misinterpreted the statement I was replying to with this… So it basically makes no sense in proper context.