*by Antonio Galves**

Imagine a packed Maracanã soccer stadium, on a day of a derby of Flamengo against Fluminense, in Rio de Janeiro. Seventy thousand fans are in the stadium. Now imagine that someone can hear the crowd, but has no view over what happens on the field. He tries to make sense of what happens in the game —scores, good hits, fouls, penalty kicks, red cards— based on the crowd’s reactions.

In fact, the situation of this person is even more complicated, with two kinds of constraints on his possibilities:

- The first type of constraint: he does not see or hear the reactions of all the fans in the stadium. He can only see and hear reactions of tens or at most hundreds of fans.
- Second type of and even more drastic constraint: he is outside the stadium, and only hear from afar the reactions of the fans.

This is in a way the situation a neuroscientist deals with. In the image of the stadium, fans are neurons, with the major difference that instead of seventy thousand units one is dealing with a number that revolves around a hundred billion units. The soccer game going on in the field may be interpreted as any experience around us in the world, or if we are very strict as a laboratory to study the functioning of the brain, which in our history is represented by the crowd.

The first type of constraint in the observation scope is similar to that of an experimenter that makes individual records of a small set of neurons. The second type of constraint, more drastic, is similar to that of an experimenter who records EEGs, a method for measuring variations in brain activity.

**Identifying fans**

The purpose of the person who hears the soccer crowd is to understand how fans translate into gestures and sounds what happens on the field. This leads him to attempt to identify small groups of fans, for instance according to their affinities. The need for this classification is clear. For example, one sees that when Flamengo scores supporters with black and red jerseys celebrate and fans who wear shirts with three colors (green, red, white) regret. Thus, the event “Score by Flamengo" produces different reactions in different groups of fans.

In the comparison with neuroscience, the scientist is in a more complicated situation since, unlike supporters, neurons do not wear club shirts. He has to identify different groups of neurons by their behavior in the context of how they experience the game. Two fans scream simultaneously "goal" in a joyful way, then one can think with great certainty that they support the same team. But what should one do in a game that ends without any score? Here, Mathematics may provide some help to the scientist. He can try to identify supporters who cheer for the same team or different teams, calculating the percentage of their concordant and divergent reactions. If the percentage of concordant reactions is high, it is very likely that they support the same team. If the percentage of discordant reactions is high, it is very likely that they support for different teams: one is a Flamengo fan, the other is for Fluminense.

If for a moment the observer could look simultaneously to the public and to what happens on the pitch, he would probably pay attention to another type of supporters, a small group that celebrates all goals, independently of the team, and basically enjoys beautiful plays, regardless of the team that does them. These are possibly tourists from other countries, soccer lovers, who on transit through Rio would not miss the opportunity to see a play at the legendary Maracanã stadium.

These supporters may also be identified even without looking at what happens on the pitch. It is enough, again, to calculate the percentage of times in which each one of them has a concurring or dissenting reaction to given supporter, say a Flamengo supporter. If the game is balanced with both teams playing well, at the end the percentage of concordance between the tourist who likes soccer and the Flamengo supporter is fifty percent. If the game is unbalanced, with one team playing better than the other, this percentage will be different, depending on the relative proportion of fine plays from one team and from the other.

A famous mathematical theorem ensures that relative frequencies of agreement and disagreement between two supporters converge at the end of the game to a well defined number between 0 and 1, despite all variations of game situations, moods of several individual supporters, rain showers, regardless of the quality of the referee or any other of the many circumstances that might occur in a soccer derby, especially a Flamengo against Fluminense, a spectacle that is almost always unforgettable. The mathematical theorem that ensures the convergence of relative frequencies is called the Law of Large Numbers.

**The Law of Large Numbers**

As an introduction to the Law of Large Numbers, consider an experiment that has two possible outcomes: success or failure. Suppose this experiment is repeated many times, independently of each other. The Law of Large Numbers states that the percentage of successes in a long series of experiments converges to a well defined number between 0 and 1. This happens always, regardless of the details in partial results. At the end, the relative frequency of successes in the sequence of experiments will always be the same.

In the previous paragraph, "relative frequency of successes" means the number of successes throughout the sequence of repetitions of the experiment divided up by the total number of attempts. Relative frequency is an expression used by statisticians to talk about percentages.

But let’s move back to the Law of Large Numbers. An example will help us understand its meaning. Imagine a concrete experience: randomly select a ball from an urn that has white and black balls with a certain proportion. This selection is done with closed eyes, without seeing the color of the ball that one draws. After the selection, one writes down the color of the chosen ball, then puts the ball back into the urn and resumes. One draws one more ball, again with closed eyes, and so on. If one repeats this experience several times, always putting the selected ball back into the urn and choosing with no bias a new ball, the relative frequency of black balls that are drawn always converges to a well-defined number. What number is this? This number is the proportion of black balls contained in the urn. For example, if the urn has the same number of black and white balls, the percentage of times that a black ball is selected converges to the number 0.5. If in the urn there are seven black balls and three white balls, then the percentage of times that a black ball is selected will converge to 0.7. In everyday language, we would say that in 70 percent of the draws a black ball is selected.

The Law of Large Numbers is both a law of physics and a result of mathematics. As a law of physics, it can be experimentally verified by each reader who is willing to reproduce the experience of performing many successive draws of a ball from an urn, each draw being made with closed eyes and putting the ball back into the urn after the selection and the color is recorded. It can be verified experimentally that the percentage of times that a black ball is selected gets closer and closer to a given number between 0 and 1: this number is exactly the proportion of balls in the urn. A question that immediately arises is how the distance between the proportion of black balls that are selected gets closer the number expressing the proportion of black balls in the urn. This is precisely the mathematical result mentioned above. This result is a "theorem" of Probability Theory. It says that when the number of draws increases the proportion of black balls that are drawn gets closer and closer to number between 0 and 1, which in turn is the proportion of black balls in the urn. The theorem also gives information about the speed at which the proportion of black balls that are drawn approximates the proportion of black balls in the urn set at the start of the experiment. In its simplest form this result can be presented even an introductory course in Probability Theory. In its simplest form, this theorem allows the answering of questions such as: what is the minimum number of draws that are necessary to ensure that, in with a large likelihood, the difference between the proportion obtained experimentally is at a shorter distance than any other given value. For example, we can ask how many draws are at least needed so that there is a probability larger than 0.95 for the difference between the proportion of black balls that are drawn is at a distance of less than 0.01 from the proportion of black balls in the urn.

The Law of Large Numbers perfectly illustrates how mathematics helps us find the model for phenomena and situations in which "chance" is intrinsically present. Indeed, every time we draw blindly and successively balls from an urn, we get different results. In a series of drawings, you can, for example, get black in the first and second time, white the third time etc. In another series of draws, we get white the first time, black the second time, white again the third time etc. At first glance, there is nothing one can say about this experience, since its results are inherently variable. However, the Law of Large Numbers tells us that there is a hidden regularity behind this experience. This regularity is hidden behind the visible disorder of the results obtained in each draw. This regularity appears when instead of looking at individual results of successive draws we look at the proportion of black balls obtained in the total of a large number of draws. When the number of draws increases, this proportion converges to a well defined number, regardless of details from the results of successive draws. This happens if the experience is always repeated in the same conditions, without the result of a draw modifying the structure of the experience. Hence the need for putting the ball back into the urn. Thus, each new draw takes place in the same experimental conditions of the previous draws. One may find the proportion of black balls in the urn without directly examining the content of the urn. The percentage of draws in which a black ball is selected allows one to find the proportion of black balls in the urn, and this is true with an increasing accuracy as the number of draws increases.

This is the basic research paradigm developed by FAPESP's Research, Innovation and Dissemination Center for Neuromathematics (RIDC NeuroMat), a research center that seeks the hidden regularity that looms behind the intrinsically variable brain functioning. The RIDC NeuroMat relies on a branch of mathematics called theory of probability to build models for brain functioning and, from these models, find hidden regularities behind the apparent variability of neurobiological data. The example of the observer interpreting crowd behavior in the Maracanã during a soccer derby summarizes this scientific approach.

**Understanding how the brain works**

In the case of neurons, we assume that some sets react similarly given the different types of stimuli, as with supporters from the same team given the many game mishaps. To rely on the Law of Large Numbers, let’s consider that each draw corresponds to the simultaneous expression of two given neurons at a certain time period. The result of each "draw" will be marked as "successful" if the neurons behave in the same way and "failure" if they behave differently.

The delicate point in this modeling is whether the assumptions of the Law of Large Numbers are satisfied when we define each "draw" as the behavior of a set of neurons in a given time period. The way it was described just above, the Law of Large Numbers requires that the experience is always repeated in the same way without the result of a "draw" affecting each other. The latter condition may clearly not be satisfied. Indeed, it is quite reasonable to assume that the behavior of neurons in a certain time period has a bearing impact on the next behavior, in the next time period. But, in fact, this complete independence is not really crucial for the Law of Large Numbers to be valid. It is enough to consider that the behavior of neurons in a certain period affects only slightly the behavior of the same neurons in the next period, and even less when we consider time periods that are increasingly larger. In a soccer game, this weak independence is something that every sportswriter knows well. Indeed, in a game, joy blasts for a goal that might secure the championship title to one's team are often followed almost immediately by a feeling of despair in the face of an opponent's goal, tying the game and giving the championship title to another team.

Modeling in such a way the functioning of the brain, the Law of Large Numbers states that the percentage of agreements ( "successes") converges to a number very close to one, if the neurons, indeed, behave in the same way as with what happens with two supporters from the same team. And supporters from different teams, in case of someone who is kin of Flamengo and another person who supports Fluminense, behave in the opposite way throughout the game; what is a reason for joy for one of them is a reason for sorrow for the other. If Flamengo charges dangerously Fluminense, Flamengo fans act joyfully and cohesively, whereas Fluminense fans will be silent and follow the course of the game with apprehension.

Similarly, a team of neuroscientists led by Claudia Vargas, a professor at UFRJ and Principal Investigator of the RIDC NeuroMat, in an article published on PlosOne has identified intertwined regions of the brain, examining sets of EEG recorded simultaneously in volunteers exposed to two different movies.

**Identifying the game type based on crowd reactions**

In the experiment by Vargas and colleagues, volunteers were asked to watch two movies. One of them showed schematically a human being moving around; the second movie featured the same picture, but in a totally scrambled pattern, so that the shape of the walker was disturbed and lost.While the films were projected, the volunteer brain activity was recorded using electroencephalograms.

In the analogy with the soccer game, stadium areas correspond to areas of the brain and its activities were recorded using electroencephalograms that mediate global electrical activity in each area. As if we had microphones around the stadium and the observer trying to understand what was going on in the game and the corresponding behavior of the public was listening to the sound, the cries of joy, the "huhhhs" and "ohhhhs" shouted by fans during the game.

Moving forward in our comparison, the two stimuli would correspond to two different games. One would be a soccer game. The other, despite having the same number of players on each side would not be a soccer game with known rules, thus being difficult to grasp. It is analogous to a soccer fan watching for the first time a rugby game. How to know what is a foul, how to understand the scoring in a rugby match when one only knows the rules of soccer?

This was the experimental situation that Claudia Vargas and her collaborators proposed. To understand the relationship between the results recorded in pairs of different areas of the brain they made the assumption that associated areas would have behaviors similar or opposite across the "game". And areas occupied by "tourists" would have disassociated behavior from the ones of other areas, such as foreign tourists who do not support neither Flamengo nor Fluminense.

Claudia Vargas and her team found that a section of the crowd behaved completely differently when watching the soccer match than when watching the rugby match. In the case of rugby, this particular sector of the crowd would talk more with other supporter groups located in other areas of the stadium. It was as if the specific sector identified by Vargas and colleagues established a conversation with other sectors, as if it was inviting them to the collective effort to make sense together of the rules of this strange and unknown game.

**The intrinsic variability of neurobiological data**

The analogy between the simultaneous reactions of two areas of the brain and the results of successive blind draws with putting the ball back in the urn is justified by the visible variability between electrophysiological recordings of neurobiological experiments. Although the experiment is repeated exactly in the same way with the same experimental conditions, with the repetition of identical stimuli, results that are obtained are not identical. The same thing happens to experimental results in neurobiology and with successive draws of a ball in an urn. There is an intrinsic variability in the results. Regularity only appears when one looks at the data with mathematical lenses, using the Law of Large Numbers.

The idealization of the urn with balls have to be completed. Just as the Flamengo and Fluminense supporters keep memories of past derbies and such memory influences and can change their behavior in each new game, the brain also stores memories and possibly "learns" from past experiences . This "learning" possibly alters the relationship between brain areas, while altering the way the set of regions react to situations "on the field".

To model this, we would need to consider that in every new game there is an urn with a different proportion of white and black balls. This new composition reflect the results of previous games. How many previous games are necessary and should be considered to define the appropriate composition of the urn in every new game?

In the case of soccer, the number of previous matches to be considered depends on the sequence of results. So, for all Brazilian soccer fans, of all ages, we have in our memory the 1950 ominous afternoon. And unfortunately this late 1950 event was replaced by another event, in 2014, an even sadder event, less because of the seven goals Germany scored against Brazil and more because of the fact that the joyful soccer that everyone associated to Brazil was not played by Brazilians on this afternoon but by the Germans, who incidentally were playing with a jersey that looked identical to the one Flamengo players traditionally wear.

** Antonio Galves is NeuroMat's scientific director. The Portuguese version of this story will appear in "Revista Mente & Cérebro".*

*This piece is part of NeuroMat's Newsletter #31. Read more here*