EmperorFool
Deity
Thanks Dresden. That is an annoying aspect of the localText object and Python together. That does give me an idea for amending BugUtil.getText() -- I can easily force the second argument to be a tuple if it isn't.
I thought about this today, and I think I have a better location for the votes needed:
You could even color the winner's total green if it is over the total needed. I like this better because a) it doesn't require another line to display and b) it puts it right next to the number you'll want to compare it with.
And here's another (great) idea: make the margin error correct. If one or both candidates have a pleased attitude from a given AI, we cannot know for sure which candidate (if any) the AI will vote for. This is the exact meaning of the margin of error.
Now, Ruff being the uber statistics wiz that he is, should be able to calculate the actual margin of error given this uncertainty! If no votes lie in this category, we know for sure the outcome, so the margin of error should be 0%. But if any AI is in this camp (pleased towards either or both candidate), the margin of error is their # of votes divided by the total votes, correct?*
* Probably not, I slept through statistics, but it's gotta be close. Maybe it's their # of votes divided by the total for that candidate, meaning each candidate has a different margin of error? Naw, that seems wrong. There should be a single margin of error. Ah, take the total votes that can go either way and divide by the total votes. Yeah, that's it.
Total: 100 (since we ignore abstentions)
Unsure: 70 (the * lines)
Error: 70%
This way the margin of error becomes something useful rather than a random thing we added for fun.
The question I haven't considered is if it matters which way the uncertainty lies. Does this affect the margin of error? What I mean is if there are 10 uncertain votes for candidate A and 10 uncertain votes for candidate B, is the margin of error the same as if there were only 20 uncertain votes for A?
In the first case, the error can only be (+10, -10, or 0) votes (10% with 100 total votes extreme, 20% range) whereas in the second case it can be (+20 or 0) (20% extreme and range). So is margin of error a +/- max or a range thing?
I thought about this today, and I think I have a better location for the votes needed:
Code:
Total (451 votes needed to win): 472 102
You could even color the winner's total green if it is over the total needed. I like this better because a) it doesn't require another line to display and b) it puts it right next to the number you'll want to compare it with.
And here's another (great) idea: make the margin error correct. If one or both candidates have a pleased attitude from a given AI, we cannot know for sure which candidate (if any) the AI will vote for. This is the exact meaning of the margin of error.
Now, Ruff being the uber statistics wiz that he is, should be able to calculate the actual margin of error given this uncertainty! If no votes lie in this category, we know for sure the outcome, so the margin of error should be 0%. But if any AI is in this camp (pleased towards either or both candidate), the margin of error is their # of votes divided by the total votes, correct?*
* Probably not, I slept through statistics, but it's gotta be close. Maybe it's their # of votes divided by the total for that candidate, meaning each candidate has a different margin of error? Naw, that seems wrong. There should be a single margin of error. Ah, take the total votes that can go either way and divide by the total votes. Yeah, that's it.
Code:
A 30 Fr 30 Pl -
B 40 Pl 40 Ca - *
C 20 Fu Pl 20 *
D 10 Ca - Ca -
E 10 Pl Pl 10 *
Total 70 30
Total: 100 (since we ignore abstentions)
Unsure: 70 (the * lines)
Error: 70%
This way the margin of error becomes something useful rather than a random thing we added for fun.
The question I haven't considered is if it matters which way the uncertainty lies. Does this affect the margin of error? What I mean is if there are 10 uncertain votes for candidate A and 10 uncertain votes for candidate B, is the margin of error the same as if there were only 20 uncertain votes for A?
In the first case, the error can only be (+10, -10, or 0) votes (10% with 100 total votes extreme, 20% range) whereas in the second case it can be (+20 or 0) (20% extreme and range). So is margin of error a +/- max or a range thing?