What is a simple function (i.e., b/N²) that describes the odds, where b is a constant?
There is no such simple function.
First of all, you can only affect the election outcome this way when there are an equal number of other voters for each side, which requires that N be even. For example, if there are 5 other voters they might have voted 0:5, 1:4, 2:3, 3:2, 4:1, 5:0 and in none of those does your vote change the outcome of the election, unless you describe forcing a tie as changing the outcome (but the problem does not describe what happens when there is a tie.)
So given an even number N, the odds that you affect the election is the same as the odds that exactly N/2 people voted for each side. There is an analytic expression for that. The number of different ways in which exactly N/2 people voted for each side is Binomial(N, N/2) which is factorial(N)/factorial(N/2)/factorial(N/2) which is factorial(N)/factorial(N/2)^2 . There are 2^N ways in which a list of people can vote for two possibilities, so the odds that exactly N/2 will vote for each side becomes factorial(N)/factorial(N/2)^2/(2^N) .
factorial(N)/factorial(N/2)^2/(2^N) is not expressible in the form b/(N^2) .
You can test whether the formula is correct:
syms N
G(N) = factorial(N)/factorial(N/2)^2/(2^N);
n = 20;
sum(sum(dec2bin(0:2^n-1)-'0',2) == n/2)/2^n
double(G(n))
ans = 0.176197052001953
ans = 0.176197052001953
Exact match. Here, dec2bin()-'0' is doing the work of building all possible votes for n voters; sum across the second dimension gives the total number of votes for one side; we test whether that is exactly half of the voters, and we total the number of such occurrences and divide by the total number of possibilities in order to get the odds.
If, hypothetically, there were a b such that b were constant and b/N^2 were the odds, then if we were to take G(N)*N^2 for two different N, we would expect to see something approaching a constant. The question believes that the pattern should be settled by N = 100000 . So take double(G(N)*N^2) for 100000 and 200000 and if the question is right then you would expect to see something close to the same value. But you don't.
There is a relationship: the probability for P*N compared to the probability for N is 1/sqrt(P) times smaller as N approaches infinity.
0 Comments
Sign in to comment.