Noise in my balcony: a lockdown history

From March 17 to May 11, France was in lockdown due to COVID-19 [1, 2]. At these times, leaving your house was limited to essential displacements (buying groceries, work if working from home was impossible, short close-to-home workout, etc). Several locations remained closed after May 11 (like movie theaters), but “non-essential movements” were allowed. As expected, these restrictions had an incredible impact on the motion of people and vehicles, thus, the urban noise. I live next to a 4 lanes avenue, about 8 km from an airport and 3 km from a hospital, so transportation noise is something that is part of my routine. A few days into the start of moving restrictions I had an idea to somehow measure the effect of the lockdown on the noise pollution I’m confronted.

For that, from March 31 to June 30 (92 days), I went to my balcony at 18h30 and recorded 5 minutes of ambiance sound using my smartphone (with Smart Recorder app, at the sampling frequency 44.1 kHz and with automatic gain control disabled). All analysis, from data treatment to plotting, is performed in Python. An example of what I recorded is presented next (note that the audios are downsampled and compressed for publication):

Sample of recording (May 28, after the end of lockdown) where we can hear, for example, vehicles passing by [1:40-2:00, 3:15-3:25] and an airplane landing [2:03-2:40].

Continue reading →

The sound of a bottle being filled

I got interested in seeing how do the spectral distribution of everyday sounds look like. So I got an app in my phone (Smart Recorder) and started recording them. The most interesting result (until now) is from the simplest sound I have recorded: a bottle of milk being filled at my kitchen’s tap. I present the audio, associated spectrogram and the theoretical analysis in this post. All the work is performed in Python, from reading the data to plotting.

Audio recording

Here is the audio:

As it sounds, it is just a bottle being filled with water. At the beginning (\(t\) < 1 second) there is nothing, until I open the tap. After about 32 seconds, the bottle is full and water is overflowing to the sink. There is a constant component lied to the impact of the particles on the bottom of the bottle/water column. Besides that, an indistinguishable and interesting tone that is changing in time can be heard. This sound is a resonance of air column with a closed-end (that is actually the water) and an open-end:

Illustration of the change of resonance frequency with the air column height

Change of resonance frequency with the air column height.

There is an increase of the frequency with the reduction of the wavelength \(\lambda\), that is linear in time until around 20 seconds. After that the increase is not constant due to the non linear modification of the available space for the air inside the bottle originated from the reduction of the diameter with the height.

Continue reading →

How many packs to complete the album?

The World Cup was recently over. Along with the competition, the sticker album also arises, it’s a quite big tradition, but I’ve never joined it. I got interested in the statistics behind it and asked myself how many stickers you must buy to fill the album completely.

My approach is a statistical simulation, modeling each package, until the album is complete. The same procedure is repeated for a large number of runs to get an estimated distribution of the total number of packages/stickers that are necessary to complete the album. First, I tested the convergence of the routine, initially based on 2 unanimous assumptions: the distribution of the stickers is uniform (that means, you have an equal chance to get any of the stickers) and that there are no repeated stickers for each pack (this one is maintained for all the tests here). Secondly, I tested what are the advantages of buying the missing stickers (from 1 to 50). Finally, two cases where the distribution is not uniform are evaluated: for a selected nation, the stickers are more abundant (from +10% to +50%) or rarer (from -10% to -50%) than the others.

This analysis can be performed for any album, being the number of stickers in the album and the number of stickers in a pack the necessary variables. So, for this case, the values for the Panini World Cup sticker book are selected:

  • 681 stickers in the album;
  • 5 stickers per pack.

Also, the possibility to buy missing stickers directly from them (maximum of 50) is also considered in this work.

Continue reading →

A pie chart about pie charts names

As a part of my PhD, I’ve re-taken classes of statistics recently. Somewhere in the process, I realized that pie charts are called camembert, a type of cheese, in France. After a couple of seconds until I realized that those are pie charts, I recalled that they are also called differently in Brazil: pizza charts. Since then I’ve been thinking of what circle charts are called in different countries/languages.

To fulfill my curiosity, I’ve looked at Wikipedia articles on circle charts in several languages (full list on the Wikidata page). I’ve also stumbled across this french course on circle charts by J. R. Lobry of the University of Lyon that took me to the ISI (International Statistics Institute) glossary.

To see what the graph nicknames are, I used Google translate, always from the original language to English. The process started from the “Also known as” column on the Wikidata page, and later on the article itself if necessary, where I looked for expressions that looked like “something diagram” or “something chart” and occasionally I translated the full article. A total of 38 languages were analyzed, mostly indo-european (26).

The results are presented in the following graph: pie (36.8%) stands for languages where circle graphs are called pie charts, or some regional recipe that Wikipedia told me that it was a type of pie; cake (15.8%), pizza (2.6%) and cheese (2.6%) respect the same idea; pie/cake (13.2%) are either cases where the two versions were presented, such as for german, Kuchen-oder Tortendiagramm, or the translated word resulted in the two terms; and none (28.9%) represents cases where I could not recognize any related food analogy in the articles. In most of those cases only different terminologies related to circle or sectors were found.

A circle chart about circle charts. Each sector shows a food that associated to circle charts in different languages: pie (36.8%); none (28,9%); pie/cake (13,2%); cake (15.8%); pizza (2.6%); and cheese (2.6%). Each slice is filled by the food it stands for, light grey for none.

The nicknames of circle charts.

Although the pie chart is not really a good choice for representing any type of data, I considered it a must for the analysis of pie charts. Data treatment and plotting is done with Excel 2016, with a little help of Inkscape to prepare the images. The raw data is available here.

My results are obviously limited to my not so extensive sources, that don’t account for regionalisms (such as the use of different terms in countries that speak the same language). Also, there is a strong chance that mistakes were made in translation, what is really a problem when similar foods, such as cake and pie, may be called by the same word and vary by the situation. Certainly, such type of nuances are neglected by Google translate when no context is given (or even when it is supplied!). Finally, I miss the proper knowledge to technically distinguish a pie and a cake, so the “cake” and “cake/pie” categories must be considered with care.

Surprisingly, the only outliers (highlighted in the figure) are the ones that I have personally encountered in my academic life, according to my results. That explains why I have not found any type of analysis like this over the Internet.

If you find this slight interesting, please share!

Photos used to build the graph: