Statistical method to detect possible electoral frauds In Colombia there are 12.000 voting centers that consist of one or more electoral tables (the number of electoral tables depends on the number of registered voters in the voting center, and voting tables have a maximum of 400 voters). One could potentially detect electoral frauds by identifying electoral tables with very different number of votes for each candidate compared to the other electoral tables in the same voting center or in nearby voting centers. However, there are some problems, a voter is assigned to a voting table not randomly but according to his/her age (in the first electoral table older people vote). Additionally, the number of voters in each electoral table varies (a voting center with 500 people registered could have an electoral table with 400 voters and the other one with 100). Which statistical method could be the best to identify outliers or anomalies  in some electoral tables that could account for the difference in ages and different number of voters?

I would suggest creating relevant age ($a$) intervals (e.g. $a < 30$, $a \in [30,50)$, $50 < a$), such that people within an age interval have similar voting habits, and then group all the votes with respect to age and voting center. So you get a table with as many rows as there are voting centers ($r$) and with as many columns as there are age groups ($c$). Each table cell contains the pertinent vote percentages for all candidates. Thus, if there are $k$ candidates, you will get in each table cell $(i, j)$ a $k$-dimensional "percentage vector" $p_{ij}\in[0, 1]^k, i=1,\ldots,r, j=1,\ldots,c$.
Next, you collect in each column (age interval) all those vectors $p_{ij}$ over all $r$ voting centers, so you get $c$ sets $S_m$, each of size $r$, of vectors $p_{ij}$:
$$
S_m := \{p_{im}\}_{i=1,\ldots,r}, \qquad m=1,\ldots, c.
$$
Now you compute for each $p_{ij}$ its standard-score in its age set $S_j$. Recall that the standard score tells you how anomalous a point is within its set. So we take this as an anomaly score.
Thus, finally, each $p_{ij}$ has an anomaly score. It describes the anomaly of the $j$-th age interval in the $i$-th voting center. Now you simply order all those anomaly scores from highest to lowest and investigate fraud from left
to right.
If you want to also use the fact that similar voting centers should have similar voting percentages for the candidates, you could collect the $p_{ij}$ only within the group of similar voting centers, instead of all voting centers as above.
