I have an object like
const data = {
'Washington' : { ElectoralVotes : 12, RChance: 0 },
'Oregon': { ElectoralVotes: 7, RChance: 15 },
.
.
.
'Hawaii' : { ElectoralVotes: 4, RChance : 35 }
}
where a key-value pair like
'Washington' : { ElectoralVotes : 12, RChance: 0 }
means "Washinton state has 12 electoral votes and the Republican candidate has a 0% chance of winning the state." From this I'm trying to approximate the chance of the Republican winning.
I realize that there are 2^51 subcollections of states and so the correct method, which involves too much computation for ordinary computers, would be
total = 0;
For each array A in [ [], ['Washington'], ['Oreogon'], ... , ['Washington', 'Oregon', ..., 'Hawaii'] ]
If (sum of electoral votes of states in A) >= 270
p = multiply together chances of winning states in A
total += p;
and then total
is the chance that the Republican wins. But since I can't do that, let's say I instead run the procedure over a random collection of 2^10 collections of states. Would I then multiply total
by 2^41 to get an approximation of the true value?