Detecting Pivotal Moments Using Changepoint Analysis of Noble Marriages during the Time of the Republic of Venice

: The Republic of Venice was one of the longest-lived states in modern history, and its stability and survival have been studied through many different angles. One of the main research angles is to try and find pivotal moments in its history that explain its eventual demise. In this paper, through the rigorous statistical analysis of a dataset of marriages by nobles in the Republic, we attempt to define a methodology for the detection of these events through mono and multivariate changepoint analysis, validating the proposed methodology through cross-validation of different procedures, as well as matching the results to historical events. Our analysis shows that these changepoints occur with statistical significance and that they match political and historical events. These results can be built upon for a better understanding of the historical causes of the success and failure of the Republic of Venice and, by extension, other states.


Introduction
Historical records reflect the day-to-day events of cities and states, but they also forcibly include any great trends that affect the course of their history.A statistical analysis of the time series of these records can show us which watershed events occurred and how they affected society Blossfeld et al. (2014).An analysis of population numbers, for instance, can show when a certain city or state reached its peak and relate it to a specific event; an analysis of historical production of a certain raw material will show when it reached its peak but also when the introduction of technologies led to boosts in production.Beyond (or in addition to) trend analysis, which precisely places peaks and finds periodicities, changepoint analysis seeks to identify turning points in the time series where an abrupt variation takes place, revealing some structural change Sharma et al. (2016).
In order to relate pivotal historical moments and the possible underlying cause of those turning points to changepoints in a time series, we must first focus on the history of specific states or nations; otherwise, it would be impossible to match statistically computed changepoints to actual events.In this paper, we will focus on the Republic of Venice.This polity has been repeatedly studied in computational humanities research papers Merelo (2023); Merelo-Guervós (2022); Molinari (2020); Smith et al. (2021); Telek (2017), mainly because, for the bigger part of its history, it was a well-organized, centralized bureaucracy, with very extensive archives, most of which have been conserved.The history of the republic begins in the late 7th century Lane (1973) and goes through many events that affected the history of the West: from the conquest of Constantinople in the 13th century through to the battle of Lepanto in 1571 and its eventual takeover by the French state in 1797.
More importantly, from the point of view of this paper, the state was governed by a representative figure with the rank of a prince, a doge, who was elected for life.This election was initially by popular acclamation but eventually by male representatives of all noble families Maranini (1927); Ruggiero (1979), members of the Great Council, and the sovereign body of the Republic.
Nobles were the only class with full rights and, as such, they were moved by commercial as well as political interests Sperling (1999); their unit of participation was the casata or extended family Merelo Guervos (2024); Raines (2013).For instance, marriages in the Republic of Venice were arranged Brown (2021); Cowan (2007a); Cox (1995) by the family according to dynastic, political, or commercial interests.As Brown (2021) states, . . .brides were the creation of male agency and mediation, and marriages were, as always, favored ways to create new alliances and cement old ones.
The bride's family had to pay a dowry to the groom Chojnacki (1975); sometimes, noble families could only afford to marry off a single woman in their household, considering their marriage rather an investment, one that could possibly pay off in the near or far future in the form of administrative positions for grandchildren, political support for any cause they would be interested in, including any appointment they aspired to, e.g., becoming doges, and, of course, commercial partnerships that would secure or enlarge the family's fortune 1 .This is why political, social, and historical events would certainly have an effect on the social status and fortunes of all patrician families, as well as in their total amount.As such, noble status conferred just a position and a set of rights, not guaranteed wealth or even income.This is why examining shifts and detecting shift points in the time series of marriages will give us insights into events of such epochal importance, which could have changed the whole social panorama of the Republic of Venice.These pivotal moments or turning points might have occurred sometime before the changepoint, which would make them a consequence of the pivotal moment or mean occurred after, with the change in marriage trends creating a different moment; in general, social changes take hold very slowly and may take a generation or even more to actually appear in historical data.A priori, these turning points could be simply the consequence of changes in customs related to marriage, but we are, in general, more interested in what caused those changes in customs and how they relate to specific internal or external events in the history of the Republic of Venice.
In this paper, we will attempt to answer the following research questions: RQ1 Is there a statistically significant changepoint in the Venetian matrimonial time series?RQ2 Is there a statistically significant change in trend in the number of marriages?RQ3 Can we match these changepoints or changes in trends to historical events?RQ4 Can we validate these changepoints or changes in trends with any other measure in the matrimonial time series?
We will do this by analyzing a publicly available temporal series related to marriages in the Republic of Venice using robust statistical techniques such as changepoint and trend analysis.
The rest of the paper is organized as follows.Next, we will present the state-of-the-art method of applying changepoint analysis to historical data, as well as the literature on marital practices in the Republic of Venice.We will then present the dataset used in this paper (Section 3).Then, we will perform changepoint and trend analysis on the time series and attempt to answer the research questions in two parts: first, by analyzing the trends (Section 4) in the time series, and then, applying changepoint detection (Section 5) algorithms.Finally, we will present our conclusions (Section 6) and discuss their implications.

State-of-the-Art in Changepoint Analysis
Changepoint analysis has been extensively used in environmental and climate studies Beaulieu et al. (2012); however, it has only recently been incorporated into the set of tools used in historical research, with good manuals such as Wawro and Katznelson (2022) introducing quantitative methods to historians and social scientists in general, focusing mainly on probabilistic models.For instance, recent papers have analyzed how a natural event, Hurricane Harvey, created a shift in the number of crimes reported in the Houston area Augusto (2021).This type of analysis can detect underlying patterns; for instance, Yang et al. (2021) found that the reduction in mobility brought about by the COVID-19 pandemic occurred before any lockdown measures were taken; the COVID-19 pandemic was also the focus of Shang and Xu (2021), who analyzed excess deaths in Belgium while looking for a changepoint and discovered that they varied depending on the age group studied.Furthermore, Fagan et al. (2020) analyzed historical battle deaths to determine a turning point in technologies or tactics that affected them.Similarly, Hee Park (2010) applied a Bayesian changepoint analysis method to the use of force by the US abroad, finding such a changepoint in 1942, and identifying the attack on Pearl Harbor as the pivotal moment that brought that change.In that sense, changepoint detection has become a true tool in the hands of historical researchers, allowing them to rank changes in battlefield methodologies according to the shift they provoke in the number of deaths, and thus, in history as a whole.
Focusing on Venice, Smith et al. (2021) went in the opposite direction: they first established a date on which the procedure of the election of doges was changed; then, showed that the time doges remained in office decreased exponentially after that date.However, doges' terms were researched using shift point analysis in Merelo (2023), finding that the change to elect older doges occurred after the Serrata, and discovering that shift point (or changepoint) analysis is able to identify events that produced significant shifts in the political landscape of the Republic of Venice.
This landscape, focusing on matrimonial politics, has been examined by a number of researchers; lately, statistical analysis has been used extensively, for instance, in Telek (2017) and, of course, Puga and Trefler (2014), which look at how status in the social network of noble marriages matches their economic or political status and how tactical marriage allowed some families to improve their standing among other families of the Republic of Venice.However, these papers must be supported by solid historical investigation, of which Chojnacki (1975) is the main source, and propose a possible shift point in the history of Venice: this shift point is what they call the third Serrata, the moment at the end of the 15th century when a law to restrict marriages between patricians and non-nobles was announced Chojnacki (2000) 2 .Other papers Cox (1995); Sperling (1999), look at matrimonial politics from different perspectives, such as gender studies.This paper, as well as the previously cited Chojnacki (1975), prove that the number of marriages and their dynamics will be closely related to the number of marriages with non-noble families.Finally, studies such as Cowan (2007a) and Hacke (2017), look at other aspects of history, with the first one, in its chapter Cowan (2007b), examining a particular moment in the history of Venice and how marriage between non-Venetians and non-patricians evolved after different events.
In the rest of the paper, we will apply statistical techniques to the analysis of the Venetian matrimonial time series.Next, we will present the dataset used.

Dataset
The dataset used was extracted from the Venetian Archivio dello Stato and released by Puga and Trefler for their paper Puga and Trefler (2014).Since marriages with a patrician man had to be registered at the Avogadori di Comun, the archive includes a thorough registration of all marriages occurring since the late Middle Ages up to a few decades after the fall of the Republic.
This dataset has been filtered in the following ways: • Only marriages that had a date were considered; the rest were dropped.• There were only a few marriages before 1398, probably due to registration problems; therefore, they were dropped too.

•
The Republic of Venice ceased to exist in 1797; therefore, all marriages in the dataset after that date were also dropped.
The resulting time series has 399 data points starting in 1398 and ending in 1797.The total number of marriages is 13,019.In some cases, the wife did not belong to the aforementioned closed set of noble families, which is why the normalized noble family name for such individuals was an empty string; the total number of such marriages is 1507.Additionally, there are 335 cases of intra-family marriages, in which the wife and husband belonged to the same (extended) family.This time series is plotted in Figure 1, and split into three lines: the total number of marriages, the number of marriages with non-patrician wives, and the number of marriages within the same family 3 .One way of validating these figures is by cross-referencing them with other datasets published elsewhere.A limited number of years were analyzed in Cowan (2007b), focusing on the presence of "outside" (i.e., non-patrician) wives.The data published in the afore mentioned book in its Table 3.1, are plotted against the data used in this paper for the same period in Figure 2.For reference, marriages including non-patricians have also been plotted in Figure 1 as a first spot check of their importance in the series.
In general, the figures are of the same order of magnitude.The data used in this paper seem to show more marriages than the data published in Cowan (2007b).This might be due to some marriages taking place in a different year than the contract; only on two occasions is the figure slightly higher (by one or two years).Given that the original data are nominal, with names of the bride and groom, it is consistent that there are more in this dataset than in the paper quoted.Although it is not central to our study, the number of "outside" marriages is also similar and in the same order of magnitude.At any rate, the discrepancies detected should not be sufficient to invalidate the following analysis.The data have also been validated by their use in several papers, the main of which is the one published by Puga and Trefler (2014).
From this comparison, we can conclude that our data are sufficient and do not have any major bias; as a matter of fact, our dataset is one of the datasets with the longest time span and with the best-documented sources, allowing us to have unique insights into the workings of late Medieval-early Modern society.Cowan (2007b); the red line corresponds to the number of marriages in Puga and Trefler (2014) for the same period.

Peak Marriages in the Republic of Venice
We will first attempt to determine long-term trends as well as local periodicities or anomalies in the previously explained time series using the R package anomalize.In the default configuration, it uses the STL method Cleveland et al. (1990) for seasonal trend decomposition.We will also apply a method for anomaly detection in order to check either the existence of anomalous events or the anomalous registration of events.
Figure 3 shows the analysis of the time series using the default method, STL, as indicated above, plotted using the plot_anomaly_decomposition function.From top to bottom, it shows the original series, the seasonal component, which follows a period of five years with three years above trend and two years below trend, the trend component with a peak around the mid-16th century, and the remainder, which is the original series minus the sum of the previous two components.Any anomaly using this method would be shown as a circled red dot; in this case, there were no anomalies detected.Trend smoothing, which is computed automatically using this method, is 30 years.
The trend peaks in 1552, with a value of 51.4538416 marriages.We show this trend by itself in Figure 4.
The trend is seen to rise sharply at the beginning of the 16th century, reaching the indicated peak, with another peaklet a decade later; from then on, the decrease is quite clear, with only a very small peaklet, which is indeed lower than the initial value of the series toward the latter years of the Republic of Venice.
Using this analysis, let us try to answer research question 2: is there a statistically significant change in trend in the number of marriages?There clearly is one by the mid-16th century.To validate this, we will use a different trend analysis method, which is generically called "Twitter" Vallis et al. (2014), and a different statistical method to estimate trends based on the median.Using the same function as before, the results of this analysis are shown in Figure 5.
In this case, the maximum is 50, which is clearly similar to the previous one.As a matter of fact, the year where the previous analysis found the trend peak, 1552, is the next-to-last year of the period with the highest trend value in this analysis, which covers 1523 to 1553.The trend smoothing period is 31 years in this case, as opposed to the 30 years using the previous method; however, the seasonality is again 5 years with the same patterns as before.However, this method does show a single anomaly in 1562, which is the actual peak value of the time series, with 84 marriages.In either analysis, this is the actual peak, although in the previous analysis, it would be part of the seasonality component.Interestingly, in this case, it would be slightly beyond it.Consequently, both analyses agree on the existence of a peak in the mid-16th century, positively answering RQ2.From the point of view of historical research, it is even more interesting to consider RQ3: is this change in trends associated with any historical event?It is evident that, in most historical states, events with a certain historical impact occur every single year, and it might be impossible to determine a single year where nothing relevant happened.However, we must try to restrain ourselves from seeking actual historical causes that might have caused this peak, showing a direct causal relationship.As such, we must also take into account that social changes respond slowly to their probable causes, so we might have to go back a number of years, even a generation, to find it.Considering that marriage can be considered a market Becker (1973) where dowries and people are exchanged for the possibility of acquiring political and commercial influence Munno and Derosas (2015), it is quite clear that the number of marriages will depend on the supply of available (noble) males.There is no single source we can check for this, although Statista (2016), which cites Maddison (2006) as its source, mentions 1557 as the year when Venice reached a peak population of approximately 158,000 persons.Not all of them, however, were nobles, and the proportion of nobles in the total population might vary widely.Therefore, we need to look at Todesco (1989), which looks at different sources, including registers from the Maggior Consiglio (supreme legislative council of the Republic, which included representatives of all the noble families).In that paper, chart number 2 shows a slow decline in the number of nobles who voted from 1500 onward, with small peaks later in the 17th century; the peak of the number of voting nobles would be somewhere in the late-15th century or early 16th century.In addition, Table 5 in the same paper presents a census of "male nobles", showing a peak in 1563 (the first year shown).Graph number 5 in the same paper shows a peak in the population of Venice in the same year, 1563.
As a result, RQ3 can be answered positively: this peak in the number of marriages in the Venetian time series precedes the peak overall population (according to several sources) and the peak number of nobles in the census by a few years, which is to be expected since marriages must precede births.On the other hand, this also confirms the validity of trend analysis as a tool for historical research.
However, this is a short and not entirely satisfactory answer since peak population, even peak noble population, is not, by itself, a historical event; clearly, both facts must be caused by another event that can be considered as such.The Ottoman-Venetian war, which started in 1570 Burkiewicz (2022), can be seen as a consequence of a perceived weakness of the Venetian Republic rather than a cause.While it would be relatively easy to find causes of dips in population (e.g., plagues and wars), causes of peaks are more difficult to identify.The history of Venice in the first half of the 16th century Lane (1973) is rather uneventful after the War of the League of Cambrai.The timeline features a succession of doges with no outstanding events listed for their time in office; for instance, during the Turkish War of 1537-1540, Venice was simply a minor ally to the Spanish emperor.
However, an undercurrent of economic irrelevancy was flowing since the takeover of the spice trade by Portuguese merchantmen during the same period.Galley trade ground to a halt during those times, and territorial expansion reached its peak in 1509.Furthermore, 1556 saw the creation of the provveditori sopra luoghi incolti (also beni inculti) Tiepolo et al. (1997) to put land in the Terraferma, that is, the part of the Republic that included the northern provinces in Italy, to cultivation, giving economic profits to nobles and the Republic of Venice as a whole.According to some authors, there was a famine and plague by the end of the Venier doge tenure in 1556.Thus, this might have been the tipping point that caused the demographic decline of the Republic, exacerbated by the war with Cyprus and subsequent plagues, and possibly counterbalanced by economic changes, although not in a decisive way.
Consequently, the longer answer to RQ3 is that the peak in the number of marriages matches the peak in the economic performance of the republic.Furthermore, it slightly precedes the onset of a series of wars and famines that definitely caused the peak in noble marriages (and in the general population) to never be reached again.
Despite this, pivotal moments can occur away from peaks in the series.Changepoint detection is a technique that works with long-term economic, environmental, and social changes and might discover other turning points in Venetian history.We will apply it and analyze the results next.

Detecting Changepoints in the Matrimonial Time Series
In general, changepoint analysis detects epochal changes in a time series based on different aspects: average, median, or standard deviation.In this paper, we will be looking at changes in these averages.A changepoint will occur when the differences between averages before and after the changepoint are maximized van den Burg and Williams (2022).Several different algorithms can be used for this, with Lanzante (1996) and Pettitt (1979) being two of the most popular.All of them are included in the package trend Pohlert (2020), which we used in this paper.
Thus, we used Lanzante's test to determine a single changepoint in the sequence with the yearly number of marriages and found that point to be in 1654.We can also used Pettitt's test, which found a changepoint at 1654, thus validating the previous test.In both cases, the p-value is very small, indicating that the changepoint found is statistically significant.The average number of marriages before the changepoint is 38.0588235; after the changepoint, it is 23.0138889.Furthermore, after the changepoint, there are, on average, 15 marriages less per year, indicating a significant change in the trend.The results of these tests are presented in Table 1 4 .This positively answers RQ1.RQ4 is also answered positively because we validated the changepoint using two different measures.We validated this specific changepoint via a different measure.Using the changepoint R package Killick and Eckley (2014), we detected the point in the time series where the mean and the variance changed maximally.We call this the cpt.meanvar function, which detects the point where the mean as well as the variance have the maximum difference.The changepoint was detected at 1676, as shown in Figure 6, which also shows averages computed before and after the changepoint.The resulting year computed in this case is different from the one used in the previous analysis; this is mainly due to the fact that we analyzed the maximal change in variance in addition to the maximal change in average.At any rate, there is not a big difference in years since there are only 22 years of difference between the two changepoints.We will refer later to the interpretation of this changepoint or rather change period, but this additional method is a validation of the approach to detect changepoints and the validity for this specific time series.

Index
It would be interesting to look at the dataset from another point of view: the entropy of the sequence of marriages.We computed the entropy over the frequencies of families appearing as brides or grooms in a specific year.Entropy is a measure of the amount of information or surprise in a group of data; in this case, it can also be interpreted as diversity.If a single family appears, then the set is totally ordered and predictable, which would yield the lowest entropy; many different families appearing only once would have the highest entropy; anything in between (e.g., fewer families appearing only once or more families with a random number of appearances) will yield any value in between.Since entropy is influenced by the number of different marriages in a year, we normalized this entropy by dividing it by logN, where N is two times the number of marriages in a year, i.e., the number of persons appearing in marriages in a year.Normalized entropy goes from 0 to 1 in this case.This normalized entropy is depicted in Figure 7, with the computed changepoint marked as a blue vertical line.We attempted to answer RQ4 by measuring the changepoint in this specific series.
Using only Lanzante's test because the rest (Pettitt, SMH) yielded the same changepoint in the previous analysis, this test found a changepoint in 1645, 9 years before the previous one that was computed.The average value of entropy before the changepoint is 0.8478995; after the changepoint, it is 0.8817361.revThese values, along with the other changepoints found so far using different methods (and series), are shown in Figure 8.This answers the question with a qualified yes: the values are close enough to be caused by the same event, or at least to have a cause-effect relationship; namely, changes in the average entropy (in the surprise) of marriages causes an eventual decrease in their number.
At any rate, entropy is a quantitative measurement, but it cannot be a cause of a change in regime.One quantity that is included in the dataset is the number of marriages with non-patrician wives.After the so-called third Serrata, women had to undergo public examination by the Senate; therefore, it could be an important source of entropy in the dataset.
We will now work with the percentage of marriages that included a non-patrician wife instead of the absolute number, which will give us a more precise estimation of this factor's impact on the time series.In this case, the changepoint was detected in 1638.The average percentage of marriages with non-patrician wives before the changepoint was 9.88%; after the changepoint, it was 16.94%.Again, this changepoint occurs 7 years before the previous one; furthermore, it is statistically significant and indicates a year in which the number of marriages with non-patrician wives doubled with respect to the previous value.This answers the research question positively: from 1638 to 1654, a change in the regime concerning marriages rook place in the Republic of Venice, causing higher entropy and a higher number of marriages with non-noble wives combined with the overall lower number of total marriages.Since we are looking at several variables at the same time, we needed to use a multivariate analysis of the changepoint.For that purpose, we used the ecp package James et al. ( 2019), which includes several algorithms for non-parametric multiple changepoint analysis James and Matteson (2014).As a bonus, the included algorithms are able to detect multiple changepoints in a time series as opposed to the ones we used previously, which only detected a single changepoint.
We used the e.divisive procedure, which implements a hierarchical divisive estimation procedure James and Matteson (2014); it essentially iteratively applies a procedure to locate changepoints in the whole series and the fragments created by them.This procedure resulted in a total of five changepoints, which were located in 1654, 1525, 1592, 1684, and 1435, sorted by importance.This multivariate analysis confirmed the year 1654 as the one in which the main changepoint took place, but it also found a series of other significant changepoints: 1525, 1592, 1684, and 1435, which are interesting by themselves.We plot the entire time series and changepoints in Figure 9.
This visualization of the results enables the appreciation of differences before and after the main changepoint and between them.We can see, for instance, how the number of marriages essentially decreased after it, while before, there were more ups and downs.There was a greater abundance of "big dots", representing a high percentage of nonpatrician marriages, after the changepoint, and the color of those dots tended toward "warmer" colors, such as red and orange, over all in the years with fewer marriages.Years with more marriages tended toward green (entropy around 0.85), while before they were darker; years with many marriages tended to have, paradoxically enough, lower entropy.
However, let us not forget the four research questions.We can answer RQ1 positively: there is a statistically significant changepoint in the time series, and it is placed in 1654, according to multivariate changepoint tests as well as univariate changepoint tests applied to the series of number of marriages.The other two series analyzed yield changepoints that were also statistically significant; if we want to declare a "confidence interval", we can say that there was a change period, rather than a point, between 1638 and 1654.This changepoint shows clear changes in trends in the number of marriages, their entropy, and the percentage of non-patrician marriages, answering RQ2, as we have already shown.The measures were cross-validated using different analyses for a single variable and multivariate analysis, answering RQ4.
We must also answer RQ3: can these changepoints be matched with a historical event?The years of this change period fully fall within what was called the War of Candia, or fifth the Ottoman-Venetian war Lane (1973); Mason (1972).This war started with skirmishes in 1638 and reached its full-blown phase in 1644.It lasted until 1669, with its last phase consisting mainly of naval battles and the siege of the city of Candia itself, now known as Heraklion.Although the Ottomans experienced heavy losses, Venice lost 30,000 men, many of which were nobles 5 .This will certainly account for the decrease in the number of marriages.However, wars in general had another effect: Raines (2003) mentions that new families were included into the nobility per soldi; that is, some families simply paid for their seat in the Maggior Consiglio, with 75 families in total, accounting for the increase in entropy.As a result, their presence will add to the number of different families participating in marriages during those years.With the loss of Candia, its cash crop, cotton, and the decrease in commerce, there was a general relaxation of matrimonial laws together with the vanishing of the fortunes of the noble families.Marrying a non-patrician meant, for these impoverished noble families, an injection of cash and commercial relations that could allow the casata to survive, at least for another generation.This would answer RQ3 and highlight how statistical analysis of the time series, coupled with historical analysis, allows us to go beyond qualitative speculation to enter into quantitative proof of historical social and economic phenomena.
Table 2 summarizes the values of the different quantities examined in the time series by period between changepoints found by multivariate analysis.We can again attempt to answer the third research question: can we match these periods to historical events in the Republic of Venice?We will examine each question in turn in the following subsections.Years are represented on the x axis, while the number of marriages is represented on the y axis.The percentage of marriages with non-patrician brides (percent.non.patrician) is represented as dot size; the yearly entropy is represented with a color scale.Furthermore, changepoints found by hierarchical divisive estimation are represented as vertical lines labeled with the year, with line width and color related to their order in the hierarchy (grayer means higher value).

First Period: 1399-1435
This changepoint is the least important of all the points detected.This period has middle values of entropy, a low number of marriages, and a medium number of nonpatrician marriages.It ended a few years later than what Chojnacki called the second Serrata Chojnacki (1994); Sperling (1999), which required every candidate to become a new member of the Consiglio and to be presented by his father 6 , and clarified the requirements on women able to marry in order to enable the transmission of noble status from father to son.Although this might seem like a minor requirement, this measure was accompanied by a series of sumptuary laws that limited the amount that could be given as a dowry; more importantly, it was accompanied by a bureaucratization of all processes related to marriages, including dowry contracts.Chojnacki (1975) showed that, in this period, the amount of money the family had to put up as a dowry was the highest of the period under study, with an average of more than DC 2000 (ducats) for paternal dowries.This was certainly more than what was approved under the sumptuary law (DC 2000) in 1420.The effective enforcement of this law might have contributed to the pivotal point evidenced by the statistical analysis.

Second Period: 1435-1525
The changepoint at the end of the period is the second-most important.The introduction of the laws mentioned in the previous period caused an increment in the number of marriages and no change in entropy but mainly resulted in a decrease in marriages that included a non-noble partner.
This period began soon after the beginning of the tenure of doge Francesco Foscari Law (1992), which was characterized by an expansion into Terraferma, that is, the mainland, which included many cities and towns in Northern Italy, as well as a progressive change in nobility from merchants to producers.This increase in wealth and consequent demographic expansion will explain the increase in the number of marriages; on the other hand, restrictions to marriage to non-nobles that included, by the end of the period, the so-called third Serrata Chojnacki (2000) account for the decrease in the number of marriages with non-patricians as well as the maintenance of entropy.This demographic increment is also reflected in Raines (2013); the end of this period is characterized by a peak in the number of nobles with voting rights (op.cit., Graphique VII).We are talking about a number of legislative, economic, and political factors that, combined, contributed to this pivotal point by the end of the period, which matches the peak number of patrician voters.

Third Period: 1525-1592
This period ends with the third most important changepoint.This is a period that starts soon after what Chojnacki called Chojnacki (1994) the second Serrata and ends with the already mentioned third Serrata, also cited by the same author Chojnacki (2000).What Chojnacki (and ourselves so far) called the second Serrata was a series of enactments, the most important of which was the introduction of requisites to participate in the Barbarella, or annual lottery of early induction to membership of the Maggior Consiglio Sperling (1999), including a registry of participants Chojnacki (1986).This act required sponsorship by an existing member, thus closing a loophole that allowed mainly illegitimate descendants of nobles to enter it; this closing act is why it was called a Serrata or closure.What Chojnacki called the third Serrata, on the other hand, was a series of laws approved in the first quarter of the XVI century that required births (1506) as well as marriages (1526) to be registered with the Avvogadori del Comun or city registrars Chojnacki (2000).
This last enactment of legislation implied that nobility started at birth since marriages had to be processed by the Avogadori del Comun.Effectively, the main feature of this period was the lowest average percentage of non-patrician marriages, which was also accompanied by low entropy: the restriction in the possibility of marriages entrenched and stabilized existing families.The peak reached by dowry expenses was exacerbated, in the case of non-patrician wives, by the fact that they had to pay a premium of DC 400 to marry a noble groom Sperling (1999), although this law dated back to the second Serrata Chojnacki (1994).Laws approved during this period, according to Chojnacki (2000), . . .put an additional premium on intermarriage among patricians, and this was due to a number of factors, most of which were made legal and approved by the Maggior Consiglio or Senate by the end of this period.The constraints to dowries, as well as the restriction on the number of available brides since non-patrician wives were mostly excluded, might explain the low entropy.
There is another factor that is in play during this period.We have not yet considered the number of self-marriages; that is, marriages in which the two members belong to the same family.However, during this period, as shown by Raines (2013), this period had the highest number of rami or branches of noble families in the absence of other valid (or valuable) candidates.Furthermore, with the objective of keeping wealth within the same family, marriages could occur between two branches of the same family, and obviously, a peak in the number of branches would translate to more marriages within the same family.What we see in Figure 10, which represents the yearly average number of marriages within the same family and its standard deviation, is precisely that peak during this period, with a sharp increase from the previous period and a slight decrease toward the end of the Republic of Venice, when it was reduced to practically 0. Although this peak is of approximately two marriages within the same family every 3 years, it is explained, on the one hand, by legal adjustments and, on the other hand, provides additional causes to the features of this period: low entropy, a high number of marriages, and a low number of non-patrician marriages.
An important feature of this period is that the number of marriages reached its peak, and in fact, as indicated in Section 4, the year with the highest number of marriages was found in this period.As indicated in that section, and also shown in Davis (1962), toward the end of the period, the Cyprus War (which includes the Battle of Lepanto) and the first plague contributed to a decline in the population of nobles and, thus, marriages, which will become more evident in the next period.Table 1 in Davis (1962) shows a peak population of 170,000 persons for the whole of Venice in 1570; 1581 sees the population decrease to 134,871, of which 1888 were nobles (1.4%); the next years listed show the noble population hovering around 2000 (from a peak of around 2500 in 1550), a quantity that is not reached again 7 .

Fourth Period: 1593-1654
The period starts with the second weakest changepoint in the series, ending with the most important changepoint, which divides the time series into two.The number of marriages decreases, entropy increases slightly, and the number of non-patrician marriages increases.
The decrease in the number of marriages is due, among other factors, to the demographic reasons that have been commented on previously regarding population; within this factor, the number of nobles is past its peak and is in continuous decline.According to Raines (2013), family branches start to have more importance, being more autonomous in decisions such as marrying one of their male descendants, making them pursue other economic interests, marrying off one of their female descendants, paying a dowry, or saving them by sending them to convents.
The plague also intervened in this period, taking a good percentage of the population in the year 1630.Beltrami (1951) shows, in Table 1, a dip in the population of popolani (popular classes) that went from 130,000 to 87,000 8 , when infant mortality experimented a never-before-seen peak, with more than 1000 recently born died in that year (p.177 of the same document).
However, the dramatic change in entropy, and overall, the main changepoint at the end of the period, already analyzed in part in the introduction to this Section, cannot possibly be explained simply by these demographic flows.Again, Raines (2013) provide an explanation.This period saw the start of the Cretan war, also known as the War of Candia; Canea on the western coast fell early, in 1646 Mason (1972).This book draws a sad picture of the cultural, technological, social, and economic state of Venice at the time of the war, a combination of factors that, together, probably contributed to the major turning point in 1655.However, from the point of view of entropy, that war provoked the exile of many noble families from Crete (noted, again, in Raines ( 2013)), increasing the diversity of marriages and, thus, entropy.In many cases, these were non-noble but rich families, which is one possible explanation for the increase in non-patrician marriages.This, added to the families from Terraferma that paid their way into nobility Raines (2020), definitely contributed to the increase in entropy, if not to the number of marriages, because these numbers could barely compensate for the general decline in the number of nobles, which was down to 1620 by 1645 according to Davis (1962) (Table 1).The general relaxation of law enforcement, already mentioned in Section 4, propitiated the increase in non-patrician marriages, whose number was also boosted by the presence of eligible brides coming, again, from Candia/Crete.
Another factor that might have contributed to the increase in marriages to non-nobles is a law approved right before this period, in 1589 Cowan (2007c), which created a procedure, through the avogaria del comun, to vet non-noble brides who were to marry nobles.This procedure probably paved the way for the larger number of marriages to non-nobles found in this period.

Fifth Period: 1655-1684
After the major changepoint that marks the beginning of the terminal decline in the Republic of Venice, the number of marriages continues to descend; however, entropy and the number of non-patrician marriages increase, as shown in Table 3.The onset of this period was caused by the largest changepoint detected in the series, which has already been explained.Entropy increased along with the number of nonpatrician marriages, whereas the total number of marriages decreased.The War of Candia took its course during this period, as did the first War of Morea, which started in 1684.Although it acquired some territories, it costed between ten and fifteen thousand persons from the republic, giving way to its last, terminal period.
As shown again in Raines (2013), the census starts to include (the term generally used for this, which is aggregate) new families in the Golden Book of Venetian nobility.Even families of foreign origin Gelder (2013) were accepted, provided they paid DC 100,000 and their aggregation was approved by a vote in the Maggior Consiglio.As a result, many new families were added 9 .However, marriages including nobles continued to decline, creating a diversity that explains the high entropy.Since aggregation was not immediate but required a slow process of search of social status, Gelder (2013); Raines (2006), this also explains the increase in the number of marriages to non-noble brides: families aspiring to be aggregated and managed, through dowries and tactical marrying, to establish a good rapport with existing noble families, bound to later vote in favor of their aggregation.
Additionally, Pezzolo (2006) shows (in its Table 5) that during this period, Venice reached its peak of expenses in debt servicing as well as war expenditures, carrying it to a highest-ever negative balance of DC 1.55 million in 1665.The following years saw increases in income, but big budget deficits were again incurred in 1670 and 1673.The war in this period left the state in virtually bankrupt and provoked the last changepoint, which we will explain next.

Sixth Period: 1684 to the End of the Republic of Venice
This period follows the second-weakest changepoint and ends with a definitive change, the disappearance of the Republic of Venice 10 .
During this period, the number of marriages reached its lowest value and the entropy and percentage of non-patrician marriages was at its highest.This is mostly a continuation of the trends that had already started in the previous period since the changepoint is one of the least significant; the final point is the end of the Republic of Venice.The War of Morea and the aggregation of new families continued the churn and, thus, the entropy in marriages reached its highest average.In addition to a decline in the number of nobles, many of them were impoverished: the barnaboti, or poor nobles Zennaro (2018), could not even sustain themselves, much less a family.Apparently, they could no longer attribute to marriage the social value it once had: Davis (1962) shows how, during the 18th century, 64.5% of only sons did not marry (Table 5), extinguishing the corresponding branch of the family.Of those who married, there was no value placed on family alliances or preservation or elevation of status, so many of the marriages were to non-nobles (see Table 2, where almost one in five decided to do so).As a result, the portrait of a society in terminal decline is painted FitzSimons (2013), so its lack of social dynamism is only one of the symptoms of a much deeper malaise.
This leads us to think that, by this time, the destinies of the Republic of Venice and the fate of the ruling class were effectively decoupled.Referring again to Beltrami (1951), it is shown that, by 1773 (Table in p. 166), there were almost twice as many grocery shops (2000) as there were one century before; with 50% more open shops than in that period.There were also 25% more shops to rent (p 167); in general, the citizens and common people showed an economic dynamism and entrepreneurship that nobility was lacking.If there is a single structural change that can be pointed out as causing this changepoint, it is the fact that the series of noble marriages was simply a series of events of a small group of people whose personal interests, attitudes, and jobs were no longer tightly interlocked with the fate of the Republic of Venice, if there was to be one.

A General Overview of the Resulting Periods
The changes in every year identified as a changepoint are shown in Table 3.These periods provide the longest answer to RQ3, whether shift points match historical events, in the sense that we can identify law enactments, trends, or external events that might have caused an epochal shift of nature evidenced by the statistical analysis.In two cases, at the ends of the second and third periods, shifts were provoked by changes in legislation; the others were caused by external events (mainly conflicts) supported by legislation (the fact that citizens could become nobles by paying a fee for instance), but also, in many cases, the convergence of several different trends.Technological and other changes are in the background, but by themselves, cannot cause a shift in a time series of social data such as this one.
What we need to take into account is that what we are looking at is a time series of noble marriages.Being the ruling class in the Republic of Venice, changes in its composition or social dynamics were bound to affect the rest of the state in the medium or long run; however, first and foremost, changepoints in the marriages time series will be the direct consequence of legislative, economic, and cultural changes related to the nobility.The kinds of historical causes that have been identified as triggers for the changepoints are summarized in Table 4.This Table shows that three of them, 1435, 1525, and 1684, are mainly internal in the sense that they were provoked by changes in legislation related to noble marriages, which may or may not have been caused by external (economic or social) events; however, identifying them is beside the point 11 .The most important changepoint, detected in 1654, as well as the third-most statistically significant, in 1592, can be attributed mainly to external events that affected the state at large, and nobles (and their marriages) as a part of it, even more so than other classes, since a bigger proportion of the nobility fought (as officials) in the wars that occurred in these periods.At any rate, using multi-changepoint analysis allows a more natural division of the history of a certain state or region into periods, focusing on the effects of internal (in the strict sense of belonging to the state or pertaining to the specific kind of event that the time series represents, noble marriages in this case) or external events (or combinations thereof), rather than on (possible) causes without demonstrated quantifiable effects.

Discussion and Conclusions
The initial intention of this study was to apply precise statistical techniques to determine epochal changes in the history of the Republic of Venice.We used a well-documented dataset of marriages involving members of the nobility.A priori, using a time series that represents a social (and, in the case of Venice, commercial) event would not be representative of what happens to the whole society and state.The occurrence of an event need not have information or bear the effects of what happens in the society at large.However, in this paper, we proved that, in general, by analyzing a time series using precise statistical techniques, we can obtain insights into the inner mechanisms that drive a society to its summit and eventually to its demise.
In this paper, we have opted for a methodology that makes it more accessible to historians with assistance or a background in statistics (and statistical software): using nonparametric methods applied directly to the time series provides historical causes that can be directly related to the quantitative changes in the changepoints.More sound methods, as explained in Wawro and Katznelson (2022), are possible: [...] to determine potential causes of a structural break, the posterior probabilities produced by the model are regressed on a set of covariates thought to be causally related to the occurrence of a break.
However, this requires a deep knowledge of Bayesian statistics and a more complex model of underlying phenomena, which would be beyond the reach of many practitioners.This is probably due to the fact that Venice was an aristocracy, a democracy of sorts ruled by the nobility but also governed and administered, and even conducted in war, by the same aristocracy.Social mobility within the nobility, but also from the popolani or citizens to access the highest social level in the republic constitutes a big part of the internal dynamics of the state, and marriages represent, in this case, the main mechanism to achieve this mobility.This explains why changepoints and changes in trends can be easily matched to well-documented events in the history of the Republic of Venice.
Generalizing this result to other societies goes beyond the scope of this paper.It is very likely that if a dataset is able to capture the main social mechanism in a state or region, you can decompose it into several synchronized time series that capture its dynamics and whether that region is relatively closed to external influence.When the dataset is not biased or complete, a division of the history into epochs could be performed; then, in an interdisciplinary endeavor, historical events can be matched to those changepoints.Certainly, using numerical analysis seems a better tool than qualitative appreciations or other assumptions like the importance of a certain state ruler or technology.In this paper, we have proven that using a monovariate single changepoint or multi-variate, multiple changepoints is a useful tool.
According to Raines (2003), citing other authors, 280 Venetian nobles lost their lives in that war, although that number might include local Cretan nobles; the same author mentions a similar number of deaths in prior years, during the plague that took place during 1630-1631. 6 This apparently formal act has a deeper meaning in the clarification of the identity of nobles, in addition to its stated purpose: avoiding people entering the nobility (through their co-optation into the Maggior Consiglio) without having the required requisites.This law was approved in 1414 Chojnacki (1994).
7 Davis (1962) goes on to discuss the decline in fertility in noble families, with more than 40% of marriages during this period having none or one child, something he attributes to the high incidence of gonorrhea, among other possible factors.8 Please note that the document lists "1663" as the year where that dip takes place; however, by the placement of the row (before 1643) as well as the mention in the text ("ad accezione del periodo che segue immediatamente la peste del 1630"), we have interpreted it to actually mean 1630.9 Davis (1962) mentions "127 families added" in his Table 1, which summarizes noble and general demographics; the census in 1696 shows a population that is almost 40% higher than in the previous entry in 1633.10 This is also the last period detected by the changepoint algorithm, and this division has a p-value of 0.19, which is higher than the usual 0.05 threshold for considering it significant.We will still describe it as a changepoint, mainly because it is indicative of the scenario that led to the end of the Republic of Venice.
11 Despite this, it would be interesting to assess the legislative precision of the Republic of Venice and whether the diagnostic and mid-and long-term effects of legislative measures were the intended ones.

Figure 1 .
Figure1.Marriages in Venice from 1398 to 1797.The black line represents the total number of marriages; the red line charts the marriages in which the wife was not a patrician; finally, the blue line shows marriages within the same family.

Figure 2 .
Figure 2. Marriages in Venice from 1580 to 1595.The black line represents the total number of marriage contracts registered according toCowan (2007b); the red line corresponds to the number of marriages inPuga and Trefler (2014) for the same period.

Figure 3 .Figure 4 .Figure 5 .
Figure 3.Time series decomposition via the anomalize package; the default output of the function plotting the anomaly decomposition, which charts the original series along with its periodicity decomposition and the underlying trend.

Figure 6 .
Figure6.Changepoint determined by the optimal change in mean and variance of the matrimonial time series.Please bear in mind that the x value equal to 0 corresponds to the first year in the series, 1398.Red lines represent averages before and after the changepoint.

Figure 7 .
Figure 7. Family diversity entropy plotted for the matrimonial time series; the green line indicates the changepoint found previously, blue line the changepoint found by analyzing this time series.

Figure 8 .
Figure 8. Representation of the entropy time series together with changepoints found using different methods: red and green show the annual number of marriages determined via Lanzante and average/variance difference maximization; dark red indicates the changepoint found via Lanzante maximization for this time series.

Figure 9 .
Figure 9. Synthetic visualization of the matrimonial time series and the multiple change points found.Years are represented on the x axis, while the number of marriages is represented on the y axis.The percentage of marriages with non-patrician brides (percent.non.patrician) is represented as dot size; the yearly entropy is represented with a color scale.Furthermore, changepoints found by hierarchical divisive estimation are represented as vertical lines labeled with the year, with line width and color related to their order in the hierarchy (grayer means higher value).

Figure 10 .
Figure 10.Marriages among members of the same family by period.

Table 1 .
Results of three different analyses of changepoints on the time series of the number of marriages.

Table 2 .
Summary of values in the marriage time series by periods found by change-point analysis.

Table 3 .
Summary of changes in the number of marriages, entropy, and percentage of non-patrician marriages for every changepoint considered.

Table 4 .
Summary of type of events that caused the changepoints.