# A Probabilistic Analysis to Quantify the Effect of March 11, 2004, Attacks in Madrid on the March 14 Elections in Spain: A Dynamic Modelling Approach

Authors: Juan-Carlos Cortés; Francisco Sánchez; Francisco-José Santonja; Rafael-Jacinto Villanueva
Journal: Abstract and Applied Analysis
 (2015)

---

## Abstract

The bomb attacks in Madrid three days before the general elections of March 14, 2004, and their possible influence on the victory of PSOE (Spanish Workers Socialist Party), defeating PP (Popular Party), have been a matter of study from several points of view (i.e., sociological, political, or statistical). In this paper, we present a dynamic model based on a system of differential equations such that  it, using data from Spanish CIS (National Center of Sociological Research), describes the evolution of voting intention of the Spanish people over time. Using this model, we conclude that the probability is very low that the PSOE would have won had the attack not happened. Moreover, after the attack, the PSOE increased an average of 5.6% in voting on March 14 and an average of 11.2% of the Spanish people changed their vote between March 11 and March 14. These figures are in accordance with other studies.


---

## Body

## 1. Introduction

In March 11, 2004, there was a terrorist bomb attack in Madrid. As a consequence, 192 people died and around 2000 were wounded. Three days after, on March 14, general elections were held in Spain.Due to events that happened between March 11 and March 14 broadly treated in [1–3], the final days of the electoral campaign were not typical.The PSOE (socialist party) unexpectedly won the March 14 elections. Consequently, some authors and people in general have wondered if the victory of the PSOE would have occurred if the attacks had not happened.In the book [3], the authors tried to analyse what happened these days through different points of view. Most of them conclude that the victory of the PSOE would have happened independently of the March 11 attacks, maybe with a more reduced difference, and they attribute an increasing of 2%–4% of the votes to PSOE after the attacks. In particular, in [4, 5], they use statistical techniques and different surveys before the attack to quantify the effect of the March 11 attack on the results of the general elections, and in [4] the authors conclude that the increase of the votes to PSOE was 3.88% and in [5] 3.5% with a decrease in the PP of 5%.However, in [1], the author states that the PSOE victory wasan unexpected electoral upset for the incumbent party and using also data from surveys, before and after the elections, she analyses the impact of the Madrid attacks on Spanish citizens’ participation and vote choice.In this way, it is mentioned in [2] thatagainst all forecasts published up to a week before the election and against widespread expectations on the previous Thursday and Friday, on Sunday March 14 the PSOE won almost 11 million votes. Also, it is remarked in [2] that 2.6 million voters, more than 10%, changed their behaviour as a consequence of the attacks [6].In this paper, we propose a dynamic model based on nonlinear differential equations to study how the voting intention evolved. Differential equations have been successfully applied to model social phenomena and they are not a novel idea to deal with such models. Some examples are as follows: in [7] one explores a variety of specifications using differential equations that address the dynamics of a class consciousness and the left of vote; from a sociological standpoint, in [8] authors discuss a number of methodological approaches to the study of social dynamics using systems of differential equations; in [9] one considers differential equations in an award-winning treatment of political interstates rivalries; in [10] differential equations are used to model environmental degradation as a consequence of political decisions to either exploit or defend the environment.In [11], the author exhibits a number of advantages, both theoretical and practical, of using differential equations to model social phenomena. Apart from retaining the capability of making punctual and probabilistic (confidence intervals) predictions as classical statistical techniques do,nonlinear differential equations allow us to model social behaviour which is a key feature that determines/influences voting intention. Additional advantages of this approach include that it does not need a large amount of available data to simulate different scenarios and predict future situations in any time instant.As we mentioned above, we are going to build a dynamic model based on nonlinear differential equations to study the evolution of the votes. With the proposed model, we use the CIS data, from October 2002 until January 2004 assuming that each individual may be influenced by his/her environment (friends, mates, media, etc.) to change his/her voting intention. Once the model is stated and calibrated to the CIS data, we will be able to predict the voting intention of the Spanish people on March 14 as if the bomb attacks had not happened with a confidence interval of 95%. Then, we will compare the real results of the March 14 elections to the ones predicted by the model in order to find out if the March 11 attacks and the events occurring between March 11 and March 14 had influence on the results and, if so, quantify it.The paper is organized as follows. In Section2, we describe the model building. In Section 3, the model is applied to obtain the voting intention of the Spanish people on March 14 as if the bomb attacks had not happened. Section 4 is devoted to presenting and analysing the results. Finally, in Section 5, we present the conclusion.


## 2. Model Building

We retrieve data from CIS [12] on the voting intention of Spanish people from October 2002 until January 2004, the last before the March 14 elections. Taking into account that the electoral victory was disputed between PP and PSOE, we consider only four options among those described in the CIS surveys: voting intention to PSOE, to PP, to other political parties, and abstention. Data grouped in these four groups can be seen in Table 1 and are depicted in Figure 1.Table 1
Percentage of voting intention and abstention in CIS surveys from Oct. 2002 until Jan. 2004, the last one before elections of Mar. 14, 2004 [12].
PSOE
PP
Other political parties
Abstention
Oct. 2002
27.83
30.96
15.81
25.40
Jan. 2003
27.76
29.61
17.03
25.60
Apr. 2003
29.31
27.68
17.21
25.80
Jul. 2003
26.06
30.50
17.47
25.97
Oct. 2003
26.16
31.97
17.27
24.60
Jan. 2004
26.32
31.37
16.65
25.66Figure 1
Evolution of the percentage of voting intention and abstention in CIS surveys from October 2002 until January 2004, the last one before elections of March 14, 2004 [12]. Only in April 2003, the PSOE voting intention was above the one of the PP. According to [2], this happened because public opinion in Spain was more widely opposed to the country’s involvement in the Iraq war at the beginning of 2003.Table2 collects the results of the March 14, 2004, elections [13]. If we compare them against the CIS data in Table 1 for January 2004, we can note substantial changes in PSOE and PP, changing in less than 2 months from 26.32% to 31.89% and from 31.37% to 28.24%, respectively. Taking into account that data in Table 1 come from surveys, they have an intrinsic uncertainty (sample error) that we should deal with and it is an additional inconvenience to get the objective of finding out whether the March 11 attacks and the events between March 11 and March 14 had effect on the electoral results and its quantification.Table 2
Results (percentages) of the elections of Mar. 14, 2004 [13].
PSOE
PP
Other political parties
Abstention
Mar. 14, 2004
31.89
28.24
15.53
24.34Bearing in mind Table1, we distinguish four main groups and we divide the population into the following compartmental subpopulation groups (time t in years):(i)
A1(t): percentage of people who would vote for PSOE at the time instant t,(ii)
A2(t): percentage of people who would vote for PP at the time instant t,(iii)
A3(t): percentage of people who would vote for other political parties at the time instant t,(iv)
A4(t): percentage of people who would abstain at the time instant t.In order to build the model, in accordance with the ideas described in [14], we assume the following.(i)
A subpopulationAi, whose people share a voting intention to a political party, can influence people of another subpopulation, Aj, to vote for the same party. This influence can be provoked either by direct contact, that is, when people from Ai and Aj interact, or by indirect contact, that is, through the interaction of a person in Ai with his/her environment.(ii)
Regarding this latter way, in this context, it is assumed that the environment of a person inAj is made up of the flows and channels of information able to reach his/her sensorial system. Note that reaching sensorial system does not imply necessarily reaching perception. Thus, alteration in that environment either can provoke changes in the voting intention of that person in Aj or can not. Environment alteration can be provoked, in turn, by the behaviour of people from the other subpopulations among other factors, attitude being itself considered as a part of that behaviour.(iii)
It is assumed that all people could access all relevant information channels and flows; that is, there is a homogeneous environment affecting people of all the subpopulations. However, the interaction of a person with the environment varies on an individual basis, depending on both situational and nonsituational factors. The individual initial attitude itself towards the subject of influence, for instance, is a nonsituational factor which modulates environment influence, acting on that initial attitude either as an enabler or as a shield.(iv)
The goal of this work is not to clarify those factors of variation but to show the eventual changes in attitudes of the target populations and, if possible, to attribute those changes to the influence of other subpopulations, either directly or indirectly. However, a rough idea as to the processes involved, differences in the effects of the environment, and so forth, as a whole, can be obtained from the model. The nonlinear termβijAiAj is the one that models these influences, where the effects of the environment and the rest of the above-mentioned factors are embedded in the parameters βij.Then, taking into account the above hypotheses, the system of differential equations that models the evolution of voting intention in Spain over the time is given by(1)A1′t=β12-β21A1tA2t+β13-β31A1tA3t+(β14-β41)A1(t)A4(t),A2′t=β21-β12A2tA1t+β23-β32A2tA3t+(β24-β42)A2(t)A4(t),A3′t=β31-β13A3tA1t+β32-β23A3tA2t+(β23-β43)A3(t)A4(t),A4′t=β41-β14A4tA1t+β43-β34A4tA2t+(β43-β34)A4(t)A3(t).In Figure2, we can see a diagram representing the flow among the subpopulations.Figure 2
Model flow graph. Graphic representation of the people flow among the subpopulations.The parametersβij, i,j=1,2,3,4, i≠j, determine the transitions among the PSOE, PP, other political parties, and abstention, and it is well known that some of these transitions are more likely than others. To be precise [1, 15] [16, pages 591–594] [5, page 184],(i)
the transition PP-abstention is greater than the transitions PP-PSOE and PP-other political parties; that is,β24>β21 and β24>β23;(ii)
the transitions PSOE-PP and PP-PSOE,β12 and β21, respectively, are very small;(iii)
the transition PSOE-other political parties,β13, is also small.All the above restrictions will be taken into account in the further developing.


## 3. Predicting the Results of March 14, 2004, Using the CIS Data, the Model, and Assuming That March 11, 2004, Attacks Had Not Happened

In this section, using a technique called probabilistic estimation and prediction introduced in [17], we are going to provide model 95% confidence bands capturing the uncertainty (surveys sample error) of the CIS surveys data.This technique consists of using information of the data survey to assign probability distributions to the data. Then, we sample data values from these probability distributions and fit the model to the sampled data. Thus, we find model parameters that fit not only the data but also the uncertainty contained into the intrinsic survey error. Then, these model parameters will allow the model to capture the data uncertainty (with 95% confidence intervals) and to provide reliable predictions.


### 3.1. Assigning Probability Distribution to the Survey Data

Data in Table1 correspond to the mean percentage obtained from the CIS surveys since October 2002 to January 2004. In the technical specifications of each survey we can see sample sizes of 2489, 2480, 2494, 2476, 2488, and 2489 interviews, respectively.Taking into account the fact that the sample is not the same for each survey, let us assume that the survey outputs are independent. For each one of the 6 available surveys, let us denote byXj=(X1j,X2j,X3j,X4j), 0≤Xij≤nj, i=1,2,3,4, j=1,…,6, a random vector whose entries are X1j = PSOE, X2j = PP, X3j = other political parties, and X4j = abstention and n1=2489, n2=2480, n3=2494, n4=2476, n5=2488, and n6=2489 are the sample sizes of surveys. These components represent exclusive selections (events) with probabilities(2)PjX1j=x1=θ1j,PjX2j=x2=θ2j,PjX3j=x3=θ3j,PjX4j=x4=θ4j,j=1,…,6,where θ1j, θ2j, θ3j, and θ4j are the percentages collected in Table 1 for each survey j, j=1,…,6. Thus, each random vector Xj follows a multinomial probability distribution. Therefore, the probability that X1j occurs x1 times, X2j occurs x2 times, X3j occurs x3, and X4j occurs x4 times is given by(3)Pnjjx1,x2,x3,x4=nj!x1!x2!x3!x4!·θ1jx1θ2jx2θ3jx3θ4jx4,j=1,…,6,where x1+x2+x3+x4=nj. The resulting multinomials for each CIS survey can be seen in Table 3.Table 3
Data distributions for probabilistic model estimation. Date and joint multinomial probability function of each survey.
Survey dates
Joint multinomial probability function
t
1 = Oct. 02
P
2489
1
x
1
,
x
2
,
x
3
,
x
4
=
2489
!
x
1
!
x
2
!
x
3
!
x
4
!
0.278
3
x
1
0.309
6
x
2
0.158
1
x
3
0.25
4
x
4
t
2 = Jan. 03
P
2480
2
x
1
,
x
2
,
x
3
,
x
4
=
2480
!
x
1
!
x
2
!
x
3
!
x
4
!
0.277
6
x
1
0.296
1
x
2
0.170
3
x
3
0.25
6
x
4
t
3 = Apr. 03
P
2494
3
x
1
,
x
2
,
x
3
,
x
4
=
2494
!
x
1
!
x
2
!
x
3
!
x
4
!
0.293
1
x
1
0.276
8
x
2
0.172
1
x
3
0.25
8
x
4
t
4 = Jul. 03
P
2476
4
x
1
,
x
2
,
x
3
,
x
4
=
2476
!
x
1
!
x
2
!
x
3
!
x
4
!
0.260
6
x
1
0.30
5
x
2
0.174
7
x
3
0.259
7
x
4
t
5 = Oct. 03
P
2488
5
x
1
,
x
2
,
x
3
,
x
4
=
2488
!
x
1
!
x
2
!
x
3
!
x
4
!
0.261
6
x
1
0.319
7
x
2
0.172
7
x
3
0.24
6
x
4
t
6 = Jan. 04
P
2489
6
x
1
,
x
2
,
x
3
,
x
4
=
2489
!
x
1
!
x
2
!
x
3
!
x
4
!
0.263
2
x
1
0.313
7
x
2
0.166
5
x
3
0.256
6
x
4Now, we compute the quantiles 2.5 and 97.5 (95% CI) of each one of the joint multinomial distributions in Table3, j=1,2,…,6. The obtained 95% CI are collected in Table 4. These CI are plotted in Figure 3.Table 4
95
% CI of the CIS surveys data using the joint multinomial probability function of each survey.
Survey dates
PSOE
PP
Other political parties
Abstention
t
1 = Oct. 02
[
26.07,29.57
]
[
29.17,32.78
]
[
14.42,17.24
]
[
23.70,27.12
]
t
2 = Jan. 03
[
26.01,29.56
]
[
27.82,31.41
]
[
15.56,18.51
]
[
23.91,27.30
]
t
3 = Apr. 03
[
27.55,31.11
]
[
25.94,29.43
]
[
15.72,18.68
]
[
24.10,27.51
]
t
4 = Jul. 03
[
24.35,27.79
]
[
28.72,32.31
]
[
15.99,18.98
]
[
24.23,27.71
]
t
5 = Oct. 03
[
24.44,27.89
]
[
30.14,33.80
]
[
15.80,18.77
]
[
22.91,26.29
]
t
6 = Jan. 04
[
24.59,28.04
]
[
29.57,33.19
]
[
15.19,18.12
]
[
23.95,27.40
]Figure 3
Percentiles 2.5 (lower black points), 97.5 (upper black points), and the mean (red points corresponding to data from Table1) of data. The percentiles determine the 95% confidence intervals. These confidence intervals capture 95% of data uncertainty.
(a)
(b)
(c)
(d)


### 3.2. Probabilistic Estimation

In order to perform the probabilistic estimation, we are going to sample the multinomial distributions in Table3 and fit the model with these samples using as a measure of goodness-of-fit the χ2-test. Then, we select the model parameters that fitted the data samples in such a way that the data uncertainty is captured as much as possible. To be precise, cosnider the following.Step 1.
Fori=1 to 104.(A)
Data sampling: sample values of all the multinomial distributions in Table3. Then, we will have one sample, similar to the data collected in Table 1, corresponding to 6 surveys with percentages for PSOE, PP, other political parties, and abstention from October 2002 until January 2004.(B)
Model fitting with the sampled data: find the model parameter valuesβij, i,j=1,2,3,4, i≠j, such that, when we
(i)
substitute them into the model,(ii)
compute the model output int1 = October 2002, t2 = January 2003, …, and t6 = January 2004 for the four subpopulations, PSOE, PP, other political parties, and abstention,(iii)
compare the model output, for each subpopulation, to the data values we sampled in Step1(A) using the χ2-test [18] and obtain a p value for each subpopulation,(iv)
calculate the minimump-value among the four.Thisp-value is the highest possible. To do that, Nelder-Mead optimization algorithm is used [19] using as a goodness-of-fit the χ2-test.Step 2.
Filtering and ordering: once the above process is completed, store the obtained parameter values and thep-value. Reject the model parameters with p-value less than 0.05. In our case, 6621 out of 104 satisfy this restriction. Then, they are sorted by p-value descending order as follows:(4)(βijl,p-valuel),i,j=1,2,3,4,i≠j,1≤l≤6621.Step 3.
Find the model parameters where model output captures the data uncertainty as much as possible. Fork = 2 to 6621,(A)
substitute into the model the parametersβijl, for l=1,2,…,k, and compute the model output in t1 = October 2002, t2 = January 2003, …, and t6 = January 2004;(B)
calculate the quantiles 2.5 and 97.5 of thek model outputs for PSOE, PP, other political parties, and abstention at time instants t1 = October 2002, t2 = January 2003, …, and t6 = January 2004;(C)
compare, for each subpopulation, the calculated quantiles to the ones in Table4 obtained from the data, using as a goodness-of-fit the χ2-test;(D)
calculatemk the minimum p-value among the four above and build the pair (k,mk);(E)
select the pair(k,mk) among the 6621 − 1 with the maximum mk.In our case, the obtained value isk=69 with m69=0.9999 and consequently the p-values corresponding to percentiles 2.5 and 97.5 for each subpopulation are greater than or equal to m69=0.9999.Now, we take the firstk=69 set of parameters from (4), compute the model output from t1 = October 2002, t2 = January 2003, …, and t6 = January 2004, in jumps of 0.05 and, in each point, we calculate the percentiles 2.5 and 97.5 for each subpopulation. The result (probabilistic estimation) is depicted in Figure 4 as black continuous lines.Figure 4
Probabilistic fitting. The red points and the black points determine the mean and the 95% confidence interval of the CIS surveys data, respectively. The black lines determine the 95% confidence bands obtained by the model. The blue line is the model mean. The model captures the uncertainty of the data. Data for PSOE and PP in April 2003 do not lie completely inside the band, probably because of citizen protests related to the war in Iraq.
(a)
(b)
(c)
(d)More details about this procedure can be found in [17].


### 3.3. Probabilistic Predictions for March 14, 2014

Now, taking the model and thek=69 set of parameters obtained in the probabilistic estimation, we are going to give the probabilistic prediction for March 14, 2004, by computing the model outputs for t = March 14, 2004. The results can be seen in Table 5.Table 5
Results (percentages) of the elections of Mar. 14 predicted by the model in case the Mar. 11 attacks had never happened.
Political party
Mean
CI 95%
PSOE
26.29
[
23.94,28.69
]
PP
30.66
[
28.51,33.37
]
Other political parties
17.07
[
15.43,19.17
]
Abstention
25.98
[
23.66,28.55
]In Figure4, we can see the red points and the black points determining the mean and the 95% confidence interval of the CIS surveys data, respectively. The black lines determine the 95% confidence bands obtained by the model. The blue line is the model mean. The model captures the uncertainty of the data. Data for PSOE and PP in April 2003 do not lie completely inside the band. This fact can be justified because of citizen protests against the involvement of Spain in the war in Iraq.Now, using the model, we are able to predict the result of the elections in March 14 with 95% confidence intervals in case that the March 11 bomb attacks had not happened. The results can be seen in the rightmost part of the graphics in Figure4 and numerically in Table 5.


## 3.1. Assigning Probability Distribution to the Survey Data

Data in Table1 correspond to the mean percentage obtained from the CIS surveys since October 2002 to January 2004. In the technical specifications of each survey we can see sample sizes of 2489, 2480, 2494, 2476, 2488, and 2489 interviews, respectively.Taking into account the fact that the sample is not the same for each survey, let us assume that the survey outputs are independent. For each one of the 6 available surveys, let us denote byXj=(X1j,X2j,X3j,X4j), 0≤Xij≤nj, i=1,2,3,4, j=1,…,6, a random vector whose entries are X1j = PSOE, X2j = PP, X3j = other political parties, and X4j = abstention and n1=2489, n2=2480, n3=2494, n4=2476, n5=2488, and n6=2489 are the sample sizes of surveys. These components represent exclusive selections (events) with probabilities(2)PjX1j=x1=θ1j,PjX2j=x2=θ2j,PjX3j=x3=θ3j,PjX4j=x4=θ4j,j=1,…,6,where θ1j, θ2j, θ3j, and θ4j are the percentages collected in Table 1 for each survey j, j=1,…,6. Thus, each random vector Xj follows a multinomial probability distribution. Therefore, the probability that X1j occurs x1 times, X2j occurs x2 times, X3j occurs x3, and X4j occurs x4 times is given by(3)Pnjjx1,x2,x3,x4=nj!x1!x2!x3!x4!·θ1jx1θ2jx2θ3jx3θ4jx4,j=1,…,6,where x1+x2+x3+x4=nj. The resulting multinomials for each CIS survey can be seen in Table 3.Table 3
Data distributions for probabilistic model estimation. Date and joint multinomial probability function of each survey.
Survey dates
Joint multinomial probability function
t
1 = Oct. 02
P
2489
1
x
1
,
x
2
,
x
3
,
x
4
=
2489
!
x
1
!
x
2
!
x
3
!
x
4
!
0.278
3
x
1
0.309
6
x
2
0.158
1
x
3
0.25
4
x
4
t
2 = Jan. 03
P
2480
2
x
1
,
x
2
,
x
3
,
x
4
=
2480
!
x
1
!
x
2
!
x
3
!
x
4
!
0.277
6
x
1
0.296
1
x
2
0.170
3
x
3
0.25
6
x
4
t
3 = Apr. 03
P
2494
3
x
1
,
x
2
,
x
3
,
x
4
=
2494
!
x
1
!
x
2
!
x
3
!
x
4
!
0.293
1
x
1
0.276
8
x
2
0.172
1
x
3
0.25
8
x
4
t
4 = Jul. 03
P
2476
4
x
1
,
x
2
,
x
3
,
x
4
=
2476
!
x
1
!
x
2
!
x
3
!
x
4
!
0.260
6
x
1
0.30
5
x
2
0.174
7
x
3
0.259
7
x
4
t
5 = Oct. 03
P
2488
5
x
1
,
x
2
,
x
3
,
x
4
=
2488
!
x
1
!
x
2
!
x
3
!
x
4
!
0.261
6
x
1
0.319
7
x
2
0.172
7
x
3
0.24
6
x
4
t
6 = Jan. 04
P
2489
6
x
1
,
x
2
,
x
3
,
x
4
=
2489
!
x
1
!
x
2
!
x
3
!
x
4
!
0.263
2
x
1
0.313
7
x
2
0.166
5
x
3
0.256
6
x
4Now, we compute the quantiles 2.5 and 97.5 (95% CI) of each one of the joint multinomial distributions in Table3, j=1,2,…,6. The obtained 95% CI are collected in Table 4. These CI are plotted in Figure 3.Table 4
95
% CI of the CIS surveys data using the joint multinomial probability function of each survey.
Survey dates
PSOE
PP
Other political parties
Abstention
t
1 = Oct. 02
[
26.07,29.57
]
[
29.17,32.78
]
[
14.42,17.24
]
[
23.70,27.12
]
t
2 = Jan. 03
[
26.01,29.56
]
[
27.82,31.41
]
[
15.56,18.51
]
[
23.91,27.30
]
t
3 = Apr. 03
[
27.55,31.11
]
[
25.94,29.43
]
[
15.72,18.68
]
[
24.10,27.51
]
t
4 = Jul. 03
[
24.35,27.79
]
[
28.72,32.31
]
[
15.99,18.98
]
[
24.23,27.71
]
t
5 = Oct. 03
[
24.44,27.89
]
[
30.14,33.80
]
[
15.80,18.77
]
[
22.91,26.29
]
t
6 = Jan. 04
[
24.59,28.04
]
[
29.57,33.19
]
[
15.19,18.12
]
[
23.95,27.40
]Figure 3
Percentiles 2.5 (lower black points), 97.5 (upper black points), and the mean (red points corresponding to data from Table1) of data. The percentiles determine the 95% confidence intervals. These confidence intervals capture 95% of data uncertainty.
(a)
(b)
(c)
(d)


## 3.2. Probabilistic Estimation

In order to perform the probabilistic estimation, we are going to sample the multinomial distributions in Table3 and fit the model with these samples using as a measure of goodness-of-fit the χ2-test. Then, we select the model parameters that fitted the data samples in such a way that the data uncertainty is captured as much as possible. To be precise, cosnider the following.Step 1.
Fori=1 to 104.(A)
Data sampling: sample values of all the multinomial distributions in Table3. Then, we will have one sample, similar to the data collected in Table 1, corresponding to 6 surveys with percentages for PSOE, PP, other political parties, and abstention from October 2002 until January 2004.(B)
Model fitting with the sampled data: find the model parameter valuesβij, i,j=1,2,3,4, i≠j, such that, when we
(i)
substitute them into the model,(ii)
compute the model output int1 = October 2002, t2 = January 2003, …, and t6 = January 2004 for the four subpopulations, PSOE, PP, other political parties, and abstention,(iii)
compare the model output, for each subpopulation, to the data values we sampled in Step1(A) using the χ2-test [18] and obtain a p value for each subpopulation,(iv)
calculate the minimump-value among the four.Thisp-value is the highest possible. To do that, Nelder-Mead optimization algorithm is used [19] using as a goodness-of-fit the χ2-test.Step 2.
Filtering and ordering: once the above process is completed, store the obtained parameter values and thep-value. Reject the model parameters with p-value less than 0.05. In our case, 6621 out of 104 satisfy this restriction. Then, they are sorted by p-value descending order as follows:(4)(βijl,p-valuel),i,j=1,2,3,4,i≠j,1≤l≤6621.Step 3.
Find the model parameters where model output captures the data uncertainty as much as possible. Fork = 2 to 6621,(A)
substitute into the model the parametersβijl, for l=1,2,…,k, and compute the model output in t1 = October 2002, t2 = January 2003, …, and t6 = January 2004;(B)
calculate the quantiles 2.5 and 97.5 of thek model outputs for PSOE, PP, other political parties, and abstention at time instants t1 = October 2002, t2 = January 2003, …, and t6 = January 2004;(C)
compare, for each subpopulation, the calculated quantiles to the ones in Table4 obtained from the data, using as a goodness-of-fit the χ2-test;(D)
calculatemk the minimum p-value among the four above and build the pair (k,mk);(E)
select the pair(k,mk) among the 6621 − 1 with the maximum mk.In our case, the obtained value isk=69 with m69=0.9999 and consequently the p-values corresponding to percentiles 2.5 and 97.5 for each subpopulation are greater than or equal to m69=0.9999.Now, we take the firstk=69 set of parameters from (4), compute the model output from t1 = October 2002, t2 = January 2003, …, and t6 = January 2004, in jumps of 0.05 and, in each point, we calculate the percentiles 2.5 and 97.5 for each subpopulation. The result (probabilistic estimation) is depicted in Figure 4 as black continuous lines.Figure 4
Probabilistic fitting. The red points and the black points determine the mean and the 95% confidence interval of the CIS surveys data, respectively. The black lines determine the 95% confidence bands obtained by the model. The blue line is the model mean. The model captures the uncertainty of the data. Data for PSOE and PP in April 2003 do not lie completely inside the band, probably because of citizen protests related to the war in Iraq.
(a)
(b)
(c)
(d)More details about this procedure can be found in [17].


## 3.3. Probabilistic Predictions for March 14, 2014

Now, taking the model and thek=69 set of parameters obtained in the probabilistic estimation, we are going to give the probabilistic prediction for March 14, 2004, by computing the model outputs for t = March 14, 2004. The results can be seen in Table 5.Table 5
Results (percentages) of the elections of Mar. 14 predicted by the model in case the Mar. 11 attacks had never happened.
Political party
Mean
CI 95%
PSOE
26.29
[
23.94,28.69
]
PP
30.66
[
28.51,33.37
]
Other political parties
17.07
[
15.43,19.17
]
Abstention
25.98
[
23.66,28.55
]In Figure4, we can see the red points and the black points determining the mean and the 95% confidence interval of the CIS surveys data, respectively. The black lines determine the 95% confidence bands obtained by the model. The blue line is the model mean. The model captures the uncertainty of the data. Data for PSOE and PP in April 2003 do not lie completely inside the band. This fact can be justified because of citizen protests against the involvement of Spain in the war in Iraq.Now, using the model, we are able to predict the result of the elections in March 14 with 95% confidence intervals in case that the March 11 bomb attacks had not happened. The results can be seen in the rightmost part of the graphics in Figure4 and numerically in Table 5.


## 4. Results

On the one hand, we can see in Table5 that the percentage of expected votes predicted by the model for the PSOE and PP on March 14 is [23.94,28.69] and [28.51,33.37], respectively. There is an intersection in the intervals, which means that the PSOE could have won the elections. In Appendix, we present the mathematical development in order to quantify the probability of PSOE’s victory if the March 11 attacks had not happened, and it is around 0.07% (A.8).On the other hand, in Table2 we can see the results of the March 14 elections and we are going to compare these values to the ones predicted by the model, which are collected in Table 5. Then, we have the following:(i)
PSOE: a positive variation of mean 31.89% − 26.29% = 5.6% with CI 95% [31.89% − 28.69%, 31.89% − 23.94%] = [3.2%,7.95%];(ii)
PP: a negative variation of mean −2.42% with CI 95% [−5.13%, −0.27%];(iii)
other political parties: a negative variation of mean −1.54% with CI 95% [−3.64%, 0.1%];(iv)
abstention: a negative variation of mean −1.64% with 95% confident interval [−4.21%, 0.68%].Note that the figures given in [4, 5], 3.5% and 3.88% of the increase in the PSOE, respectively, are captured by the 95% confidence interval of our prediction [3.2%, 7.95%] and the decrease of 5% of the PP given in [5] is also captured by the 95% confidence interval of our prediction [−5.13%, −0.27%]. Moreover, if we sum the absolute value of the means obtained above, there are 5.6 + 1.54 + 2.42 + 1.64 = 11.2% of people, with CI 95% [9%, 16.18%], who changed their voting behaviour as a consequence of the attacks, which is in accordance with the values given in [2, 6].


## 5. Conclusion

In this paper, we propose a dynamic model to study the evolution of the voting intention in Spain over the time before the bomb attacks in Madrid, March 11, 2004, three days before the general elections. This model allows us to predict the result of the elections if the attacks would not have happened. This prediction says that the probability that the PSOE had won the election without the bomb attacks is around 0.07%, that is, very unlikely, and by a very short difference.Moreover, we were able to compare the model prediction to the real results of the general elections of March 14, and we conclude that the PSOE increased an average of 5.6% in voting from March 11 to March 14. Additionally, an average of 11.2% of Spanish people changed their vote as a consequence of the attacks. All these figures are in accordance with [2, 6].



---

*Source: 387839-2015-08-05.xml*