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 “The sound of a bottle being filled”

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 “How many packs to complete the album?”

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 comment!

Photos used to build the graph: