Win / TheDonald
Sign In
DEFAULT COMMUNITIES Front All General AskWin Funny Technology Animals Sports Gaming DIY Health Positive Privacy
Reason: None provided.

Here is the quick and dirty Matlab script that I wrote to revise the Edison data in the json file that NYT and AP use on their websites that attempts to find the most likely pre-roundoff forms of the 3-digit ratios that they provide. I am currently working on translating it to other programming languages and including an input reader/writer function that acts directly on the json file itself, I just have been a little busy over the past few days to spend enough time on getting this totally together.

Here it is, including the example inputs for a1, b1, and c1 respectively, and I know it looks very crude.

% Trump's 3-digit percentage, reduced from a larger 'n'-digit percentage

a1 = 0.567;

% Biden's 3-digit percentage, reduced from a larger 'n'-digit percentage

b1 = 0.414;

% The total raw number of votes

c1 = 2915801;

% A simple calculation that generates the 'm' number of significant figures

% for the raw data

dig = floor(log10(c1));

% The simple calculation that produces the number of partitions needed to

% pin-point the right ratios with the same significant figures of the raw

% data

d1 = 10^(dig+1);

% The following is the initialization of the 3 arrays that will be used to

% find the largest and smallest fractional parts of the calculation between

% the 3-digit ratios and the raw data. The goal is to find the most logical

% integer values for raw partisan vote totals that are associated with the

% input value of percentages expanded to 'm' significant figures.

u1 = ones(d1,2);

v1 = ones(d1,2);

w1 = ones(d1,2);

% The following reproduces the floating point repeated number trailing both

% the largest and smallest rounding 'm'-digit number when reduced to a

% '3'-digit number, which is just a 'm-3'-digit array of 4's

g1 = 4;

for j1 = 1:(dig-2)

g1 = g1+4*10^j1;

end

% The following produces the 'd1'-sized arrays that generates the unique

% spans of 'm'-digit ratios that when rounded to '3'-digits reproduces the

% original input ratios; 'u1' displays the 2 respective ratios; 'v1'

% displays the 2 respective artificial partisan vote totals with trailing

% decimals; 'w1' displays the 2 fractional parts of the artificial partisan

% vote totals

for j1 = 1:d1

u1(j1,1) = a1+((j1+g1)/(d1*10^3));

u1(j1,2) = b1+((j1+g1)/(d1*10^3));

v1(j1,1) = u1(j1,1)*c1;

v1(j1,2) = u1(j1,2)*c1;

w1(j1,1) = v1(j1,1)-floor(v1(j1,1));

w1(j1,2) = v1(j1,2)-floor(v1(j1,2));

end

% The following sorts a new array formed between the individual legs of

% this simple procedure, on either side of the partisan line, which yields

% the artificial partisan vote totals with the smallest number of 'm-3'

% digits for the artificial partisan vote totals, which represents the most

% likely integers-ratio pairs that relates to the original round-off errors

u2 = sortrows([w1(:,1) u1(:,1) v1(:,1)],1);

v2 = sortrows([w1(:,2) u1(:,2) v1(:,2)],1);

% The following sorts a new array formed between the individual legs of

% this simple procedure, on either side of the partisan line, which yields

% the artificial partisan vote totals with the largest number of 'm-3'

% digits for the artificial partisan vote totals, which represents the most

% likely integers-ratio pairs that relates to the original round-off errors

u3 = sortrows(u2,1,'ascend');

v3 = sortrows(v2,1,'ascend');

% The most likely raw partisan vote totals from smallest fractional

% calculation

x1 = [u2(1,2) v2(1,2) (1-u2(1,2)-v2(1,2))];

y1 = [u2(1,3) v2(1,3) (c1-u2(1,3)-v2(1,3))];

% The most likely raw partisan vote totals from largest fractional

% calculation

x2 = [u3(1,2) v3(1,2) (1-u3(1,2)-v3(1,2))];

y2 = [u3(1,3) v3(1,3) (c1-u3(1,3)-v3(1,3))];

% The two answers should point to the same result after all values are

% compared

ans1 = [x1 y1];

ans2 = [x2 y2];

% eof

If you know Matlab, this could be very useful in generating the graphs and plots needed in order to demonstrate a comfortable conclusion about the original unmodified ratios.

I will update this posts pending future developments over the next few days.

107 days ago
19 score
Reason: None provided.

Here is the quick and dirty Matlab script that I wrote to revise the Edison data in the json file that NYT and AP use on their websites that attempts to find the most likely pre-roundoff forms of the 3-digit ratios that they provide. I am currently working on translating it to other programming languages and including an input reader/writer function that acts directly on the json file itself, I just have been a little busy over the past few days to spend enough time on getting this totally together.

Here it is, including the example inputs for a1, b1, and c1 respectively, and I know it looks very crude.

% Trump's 3-digit percentage, reduced from a larger 'n'-digit percentage

a1 = 0.567;

% Biden's 3-digit percentage, reduced from a larger 'n'-digit percentage

b1 = 0.414;

% The total raw number of votes

c1 = 2915801;

% A simple calculation that generates the 'm' number of significant figures % for the raw data

dig = floor(log10(c1));

% The simple calculation that produces the number of partitions needed to % pin-point the right ratios with the same significant figures of the raw % data

d1 = 10^(dig+1);

% The following is the initialization of the 3 arrays that will be used to % find the largest and smallest fractional parts of the calculation between % the 3-digit ratios and the raw data. The goal is to find the most logical % integer values for raw partisan vote totals that are associated with the % input value of percentages expanded to 'm' significant figures.

u1 = ones(d1,2); v1 = ones(d1,2); w1 = ones(d1,2);

% The following reproduces the floating point repeated number trailing both % the largest and smallest rounding 'm'-digit number when reduced to a % '3'-digit number, which is just a 'm-3'-digit array of 4's

g1 = 4;

for j1 = 1:(dig-2) g1 = g1+4*10^j1; end

% The following produces the 'd1'-sized arrays that generates the unique % spans of 'm'-digit ratios that when rounded to '3'-digits reproduces the % original input ratios; 'u1' displays the 2 respective ratios; 'v1' % displays the 2 respective artificial partisan vote totals with trailing % decimals; 'w1' displays the 2 fractional parts of the artificial partisan % vote totals

for j1 = 1:d1 u1(j1,1) = a1+((j1+g1)/(d110^3)); u1(j1,2) = b1+((j1+g1)/(d110^3)); v1(j1,1) = u1(j1,1)*c1; v1(j1,2) = u1(j1,2)*c1; w1(j1,1) = v1(j1,1)-floor(v1(j1,1)); w1(j1,2) = v1(j1,2)-floor(v1(j1,2)); end

% The following sorts a new array formed between the individual legs of % this simple procedure, on either side of the partisan line, which yields % the artificial partisan vote totals with the smallest number of 'm-3' % digits for the artificial partisan vote totals, which represents the most % likely integers-ratio pairs that relates to the original round-off errors

u2 = sortrows([w1(:,1) u1(:,1) v1(:,1)],1); v2 = sortrows([w1(:,2) u1(:,2) v1(:,2)],1);

% The following sorts a new array formed between the individual legs of % this simple procedure, on either side of the partisan line, which yields % the artificial partisan vote totals with the largest number of 'm-3' % digits for the artificial partisan vote totals, which represents the most % likely integers-ratio pairs that relates to the original round-off errors

u3 = sortrows(u2,1,'ascend'); v3 = sortrows(v2,1,'ascend');

% The most likely raw partisan vote totals from smallest fractional % calculation

x1 = [u2(1,2) v2(1,2) (1-u2(1,2)-v2(1,2))]; y1 = [u2(1,3) v2(1,3) (c1-u2(1,3)-v2(1,3))];

% The most likely raw partisan vote totals from largest fractional % calculation

x2 = [u3(1,2) v3(1,2) (1-u3(1,2)-v3(1,2))]; y2 = [u3(1,3) v3(1,3) (c1-u3(1,3)-v3(1,3))];

% The two answers should point to the same result after all values are % compared

ans1 = [x1 y1]; ans2 = [x2 y2];

% eof

If you know Matlab, this could be very useful in generating the graphs and plots needed in order to demonstrate a comfortable conclusion about the original unmodified ratios.

I will update this posts pending future developments over the next few days.

107 days ago
19 score
Reason: Original

Here is the quick and dirty Matlab script that I wrote to revise the Edison data in the json file that NYT and AP use on their websites that attempts to find the most likely pre-roundoff forms of the 3-digit ratios that they provide. I am currently working on translating it to other programming languages and including an input reader/writer function that acts directly on the json file itself, I just have been a little busy over the past few days to spend enough time on getting this totally together.

Here it is, including the example inputs for a1, b1, and c1 respectively, and I know it looks very crude.

% Trump's 3-digit percentage, reduced from a larger 'n'-digit percentage a1 = 0.567;

% Biden's 3-digit percentage, reduced from a larger 'n'-digit percentage b1 = 0.414;

% The total raw number of votes c1 = 2915801;

% A simple calculation that generates the 'm' number of significant figures % for the raw data dig = floor(log10(c1));

% The simple calculation that produces the number of partitions needed to % pin-point the right ratios with the same significant figures of the raw % data d1 = 10^(dig+1);

% The following is the initialization of the 3 arrays that will be used to % find the largest and smallest fractional parts of the calculation between % the 3-digit ratios and the raw data. The goal is to find the most logical % integer values for raw partisan vote totals that are associated with the % input value of percentages expanded to 'm' significant figures. u1 = ones(d1,2); v1 = ones(d1,2); w1 = ones(d1,2);

% The following reproduces the floating point repeated number trailing both % the largest and smallest rounding 'm'-digit number when reduced to a % '3'-digit number, which is just a 'm-3'-digit array of 4's g1 = 4;

for j1 = 1:(dig-2) g1 = g1+4*10^j1; end

% The following produces the 'd1'-sized arrays that generates the unique % spans of 'm'-digit ratios that when rounded to '3'-digits reproduces the % original input ratios; 'u1' displays the 2 respective ratios; 'v1' % displays the 2 respective artificial partisan vote totals with trailing % decimals; 'w1' displays the 2 fractional parts of the artificial partisan % vote totals for j1 = 1:d1 u1(j1,1) = a1+((j1+g1)/(d110^3)); u1(j1,2) = b1+((j1+g1)/(d110^3)); v1(j1,1) = u1(j1,1)*c1; v1(j1,2) = u1(j1,2)*c1; w1(j1,1) = v1(j1,1)-floor(v1(j1,1)); w1(j1,2) = v1(j1,2)-floor(v1(j1,2)); end

% The following sorts a new array formed between the individual legs of % this simple procedure, on either side of the partisan line, which yields % the artificial partisan vote totals with the smallest number of 'm-3' % digits for the artificial partisan vote totals, which represents the most % likely integers-ratio pairs that relates to the original round-off errors u2 = sortrows([w1(:,1) u1(:,1) v1(:,1)],1); v2 = sortrows([w1(:,2) u1(:,2) v1(:,2)],1);

% The following sorts a new array formed between the individual legs of % this simple procedure, on either side of the partisan line, which yields % the artificial partisan vote totals with the largest number of 'm-3' % digits for the artificial partisan vote totals, which represents the most % likely integers-ratio pairs that relates to the original round-off errors u3 = sortrows(u2,1,'ascend'); v3 = sortrows(v2,1,'ascend');

% The most likely raw partisan vote totals from smallest fractional % calculation x1 = [u2(1,2) v2(1,2) (1-u2(1,2)-v2(1,2))]; y1 = [u2(1,3) v2(1,3) (c1-u2(1,3)-v2(1,3))];

% The most likely raw partisan vote totals from largest fractional % calculation x2 = [u3(1,2) v3(1,2) (1-u3(1,2)-v3(1,2))]; y2 = [u3(1,3) v3(1,3) (c1-u3(1,3)-v3(1,3))];

% The two answers should point to the same result after all values are % compared ans1 = [x1 y1]; ans2 = [x2 y2];

% eof

If you know Matlab, this could be very useful in generating the graphs and plots needed in order to demonstrate a comfortable conclusion about the original unmodified ratios.

I will update this posts pending future developments over the next few days.

107 days ago
1 score