📜 ⬆️ ⬇️

Solving the riddle of round numbers on the 2018 election chart



This article is the answer to this article here ( Analysis of the results of the presidential elections of 2018. At the federal and regional levels ).

In that article I was surprised by the phrase of the author:
Instead of a normal or lognormal distribution, we see an interesting curve, with very strange peaks at round values ​​(70%, 75%, 80%, etc.), increasing the turnout by about 100% and going upwards by 100%.
Immediately there are questions:
')

That article is highly politicized and relevant comments in it. In this article we will discuss only mathematics, so I will ask you to keep your political views with you.

And as a bonus, at the end of the article will be laid out the key to solving the riddle of “round numbers” on the 2018 election chart.

Initial data


DB file (MongoDB) with voting results (parsing from a state site ), which was posted by the author of the original article:

File = 15-04-18.tar.xz
MD5 = 3a1c198cbc4ce102fbc074752fc0ca99

We will explore the graph of the turnout percentage and the number of PECs with a given turnout. In the original article, it looks like this:



Introduction


Anyone can download the database and independently check for errors. From the obtained database, I randomly selected and checked data from several PECs, which makes it possible to state with some probability that the data were downloaded from the state. site is correct.

But, there are some notes:
The author of the original article has not yet given explanations on the questions asked:

1. What is the formula you considered% turnout on each wiki?

2. Please explain the purpose of the attributes share and number_bulletin.

3. How were the values ​​rounded to 0.1%?
, , , number_bulletin - «», share – ,

share = number_bulletin / results_0;

results_0 – « , ».
. number_bulletin share .

, number_bulletin ( - ).

, :

  • , +
  • , +
  • ,

number_bulletin , , number_bulletin , - 1-2 , .

hash- , :

:

ID —
RESULTS_0 – results.0 (« , »)
TEST_NUMBER_BULLETIN –
RESULTS_NUMBER_BULLETIN —
TEST_YAVKA —
RESULTS_SHARE —

5ab557a2866a6a69f2cf8c90 2241 1368 1367 0,610441 61
5ab557aa866a6a69f2cf8ca8 2853 1665 1662 0,583596 58,25
5ab557b1866a6a69f2cf8cba 2138 1413 1412 0,660898 66,04
5ab557b1866a6a69f2cf8cbb 2093 1291 1290 0,616817 61,63
5ab557b3866a6a69f2cf8cc2 2463 1688 1687 0,685343 68,49
5ab557b5866a6a69f2cf8cc7 1583 1085 1084 0,685407 68,48
5ab557b9866a6a69f2cf8cd7 1483 912 911 0,614969 61,43
5ab557ba866a6a69f2cf8cdb 2166 1403 1402 0,647737 64,73
5ab557bb866a6a69f2cf8cdd 2186 1204 1203 0,550777 55,03
5ab557bc866a6a69f2cf8ce1 1574 986 985 0,626429 62,58
5ab557bd866a6a69f2cf8ce5 1284 803 802 0,625389 62,46
5ab557bd866a6a69f2cf8ce6 2543 1610 1608 0,63311 63,23
5ab557bf866a6a69f2cf8ced 2215 1353 1350 0,610835 60,95
5ab557cf866a6a69f2cf8d36 1627 1374 1372 0,844499 84,33
5ab557f7866a6a69f2cf8dbd 449 262 261 0,583518 58,13
5ab557f8866a6a69f2cf8dbf 597 349 347 0,584589 58,12
5ab55809866a6a69f2cf8dfa 194 156 155 0,804123 79,9

, share – . , , share .

, .

:


:
=

:

10.2 => 10
10.5 => 11

..:

0.22 => 0.2
0.25 => 0.3

#1


- , , :

_1:

– ( = 1%)
Y() –
Y() – (- . )



, X=100 , . fediq :
— , , .
10 - 100% :

K_ALL — -
K_100 — - 100%
REGION —

K_ALL K_100 REGION
393 346 foreign-countries
1580 213 primorsk
1911 165 dagestan
482 156 sakhalin
596 138 murmansk
2817 132 tatarstan
2052 128 st-petersburg
317 123 kamchatka_krai
948 67 arkhangelsk
854 60 khabarovsk


_1:

– ( = 0.1%)
Y() –
Y() – (- . )
+ 100%, .. .



.

_1:

– ( = 0.01%)
Y() –
+ 100%, .. .



- .

_1:

– ( = 0.001%)
Y() –
+ 100%, .. .



, .. – .

_1:

– ( = 0.001%)
Y() –
80%



, 80% .

#2


, . X ( ) ( - -, ....), , , - .

.. , - , , - .

_2:


Y() –
Y() – ( = 1%)



, , X ( ) Y() , Y() - , X ( X ).



X 60 :
= 95
- = 1680

_2:


Y() –
Y() – ( = 0.1%)
+ 100%, .. .



80% ( ), .

( ).

_2:


Y() –
Y() – ( = 0.01%)
+ 100%, .. .



, , . 80% , .. .

_2:


Y() –
Y() – ( = 0.001%)
+ 100%, .. .



– . - …


, «» :

PROCENTX KOLVO X2 X5 X10
25 2 2 0 0
40 5 2 5 2
45 3 3 3 3
50 70 70 15 15
55 10 10 10 10
60 108 57 108 57
65 34 34 34 34
70 57 57 57 57
75 140 140 29 29
80 122 62 122 62
85 36 36 36 36
90 78 78 78 78
95 64 64 64 64
100 2613 1370 582 324


, « ».
, 40% 5% 2, 5 10. .

PROCENTX –
KOLVO – - -
X2 – - . 2
X5 – - . 5
X10 – - . 10

, 1…

PROCENTX KOLVO X2 X5 X10
25 2 2 0 0
34 1 1 1 1
36 1 1 1 1
40 5 2 5 2
42 1 1 1 1
44 2 0 2 0
45 3 3 3 3
46 1 1 1 1
47 1 1 1 1
48 2 0 2 0
50 70 70 15 15
51 3 3 3 3
52 7 4 7 4
53 4 4 4 4
54 4 4 4 4
55 10 10 10 10
56 10 6 10 6
57 5 5 5 5
58 9 9 9 9
59 4 4 4 4
60 108 57 108 57
61 3 3 3 3
62 18 18 18 18
63 1 1 1 1
64 23 10 23 10
65 34 34 34 34
66 14 14 14 14
67 8 8 8 8
68 22 10 22 10
69 2 2 2 2
70 57 57 57 57
71 4 4 4 4
72 17 5 17 5
73 6 6 6 6
74 8 8 8 8
75 140 140 29 29
76 23 11 23 11
77 4 4 4 4
78 10 10 10 10
79 2 2 2 2
80 122 62 122 62
81 10 10 10 10
82 14 14 14 14
83 6 6 6 6
84 24 11 24 11
85 36 36 36 36
86 10 10 10 10
87 3 3 3 3
88 23 8 23 8
89 4 4 4 4
90 78 78 78 78
91 4 4 4 4
92 31 17 31 17
93 6 6 6 6
94 13 13 13 13
95 64 64 64 64
96 25 11 25 11
97 6 6 6 6
98 17 17 17 17
99 4 4 4 4
100 2613 1370 582 324

, 100 ( , – ).

, x2-10 :

KOLVO X2 X3 X4 X5 X6 X7 X8 X9 X10
97699 49413 32753 24724 20283 16649 13923 12464 10917 10411


KOLVO – -
X2-10 – - . 2-10

x2-10 :

KOLVO X2 X3 X4 X5 X6 X7 X8 X9 X10
97699 49268 32712 24634 20608 16492 14085 12192 10938 10752


KOLVO – -
X2-10 – - 2-10

, … :)

Update:


, , , . , .

( ) , «» ?
— .
, — , ( ) — .

«»?
— « , «» .», «, .»

«» ?
— , .

— _1, _1 — — ,
____ / ____

«» , « ». , «» « » , .. _1 _1. _1 — « » , , «» « » « ». , «» . , « » .

, . , «», , , , . , , , , «» , .

( , ):

2 , 1 — .

.. 79,80,81 — (, -, ) , .. 80 79 81 , . .. «» , , «». – 1, « », .. , , - . . 2. , , 1, - «» .

2 , 1, - . , , , ( ), «». .. «» .

_2 ( 1%):
, , «», .
, 56% 68% .… (, ) .
, «» 1, «» « , X% - , (X-1)% (X+1)% ?», «» « X – N - , (X+1) (X-1) ( N+1 N-1 N) ?»

, , .

_2 ( 0.1%):
, , _2 – , . 80%, _1 80% — , 80% 80% ( ).

«» 1, «» «» .

, «», .

_2 ( 0.01%):
, X , , . . , «» - , (, :).

_2 ( 0.001%):
… , , «» . – , – , «» , «», «».
. , ( ) , ( ), , , ? , . … , . , ( - ), ( ).

:

1:
«» . , , «». 1 – «» - «» ( - , ), , «» . , , «» , . , - , – , .

1:

, «» « , ». .. , – «» .

_1 ( 1%):
, «».

_1 ( 0.1%):
, «» . , , «» , – .

_1 ( 0.01%):
, . ? ? ?

_1 ( 0.001%):
, – , – , – () , , _1 «» — . , .

2:
1 – , «» — «» , _1 , _ .

:

_1, _1 — — , :

____ / ____

«» , « ».

, _1, 80%.

:

1. , «» – - . 2,5 10.

2. 2,3,4,5,6,7,8,9,10
- ()

- . ()

, , . - , .

:
(- .) = 3
= 7746



Update2:
''
, « » :)

, , , . «» , , , , «» . , … .

, :

(1%)


(0.1%)


(0.01%)


(0.001%)


«»:

x2-10 :
KOLVO X2 X3 X4 X5 X6 X7 X8 X9 X10
97699 49413 32753 24724 20283 16649 13923 12464 10917 10411

KOLVO – -
X2-10 – - . 2-10

x2-10 :

KOLVO X2 X3 X4 X5 X6 X7 X8 X9 X10
97699 49268 32712 24634 20608 16492 14085 12192 10938 10752

KOLVO – -
X2-10 – - 2-10

:

0. X2-X10
VerX2 = X2 / KOLVO
VerX3 = X3 / KOLVO


1. - = 97699
2. 3 — 7746
3. , — . , ().
4. - 0… .
5. — . , - ().
6. - +1.
7.

c++
	
	int k_uchastok = 97699;
	int arr[] = {49413 ,32753 ,24724 ,20283 ,16649 ,13923 ,12464 ,10917 ,10411};
	std::vector<int> all_kratnost(arr, arr + sizeof(arr) / sizeof(int));

	std::vector<double> ver_kratnost(all_kratnost.size());
	for (int i = 0; i < all_kratnost.size(); i++)
	{
		ver_kratnost[i] = (double)all_kratnost[i] / (double)k_uchastok;
	}


	int arr2[] = {49268, 32712, 24634, 20608, 16492, 14085, 12192, 10938, 10752};
	std::vector<int> all_kratnost2(arr2, arr2 + sizeof(arr2) / sizeof(int));

	std::vector<double> ver_kratnost2(all_kratnost2.size());
	for (int i = 0; i < all_kratnost2.size(); i++)
	{
		ver_kratnost2[i] = (double)all_kratnost2[i] / (double)k_uchastok;
	}



	for (int i = 0; i < k_uchastok; i++)
	{
		//    0  1
		double ver_value = (double)rand() / RAND_MAX ;

		uik_size = 3 + rand()%7743;

		int k;
		for (k = 0; k < all_kratnost.size(); k++)
		{
			if (ver_value < ver_kratnost[k])
			{
				//  2+k
				int ostatok = uik_size % (k+2);
				if (uik_size > (ostatok+3))
				{
					uik_size -= ostatok;
				}

				uik_yavka = uik_size - rand()%uik_size;


				//    0  1
				double ver_value2 = (double)rand() / RAND_MAX ;
				for (int k2 = 0; k2 < all_kratnost2.size(); k2++)
				{
					if (ver_value2 < ver_kratnost2[k2])
					{
						//  2+k2
						int ostatok = uik_yavka % (k2+2);
						if (uik_yavka > ostatok)
						{
							uik_yavka -= ostatok;
						}

						break;
					}
					else
					{
						ver_value2 -= ver_kratnost2[k2];
					}
				}


				procentx = (double)uik_yavka / uik_size;
				procentx = RoundTo(procentx * 100.0, round_digits);

				result_map[procentx] += 1;

				break;
			}
			else
			{
				ver_value -= ver_kratnost[k];
			}
		}

		//     
		if (k == all_kratnost.size())
        {
			uik_yavka = uik_size - rand()%uik_size;

			procentx = (double)uik_yavka / uik_size;
			procentx = RoundTo(procentx * 100.0, round_digits);

			result_map[procentx] += 1;
		}
	}



	std::map<double, int>::iterator it;
	for (it = result_map.begin(); it != result_map.end(); ++it)
	{
		m_BarSeries_Bottom->AddXY(it->first, it->second);
	}



1%, . 0.1% — , (90,85,80,75,70,65,60,50...). :) «» , , 10 , 5 .

:
— . / ( 50% , ( 0.1% 50%)). , - — « », « » « ».

:
, «» ( , ). — «», , , .


Update3:

, 0 .

.. , « » «/ ».

1%
( «» 5 . .).


0.1%
5 .

1


2


3


4


5


0.01%


0.001%


:

1. — 0.1% 0.01% 0.001%.

2. , «» 5 — (9 — 16 ).

3. 0.001% — «» , . , . «» , 0.01% , 0.1% ( ) , .

, 0.001% — . , « ».

- , , :
  • «».
  • «» « » , . , «» . , « » .




P.S.
, , :)

Source: https://habr.com/ru/post/354020/


All Articles