Saturday 27 August 2016

I'm positive those elevators are making different sounds.

My apartment building has two elevators, descriptively labeled "elevator 1" and "elevator 2".  Recently, something happened, and elevator 2 was out of service for nearly a month.  When it started working again, the floor display didn't work, and the sounds sounded vaguely off.

Over the past two days, I've been trying to ride on both, so I could take videos that I could then extract the audio and do a power spectrum analysis on the beeps.

Those peaks are definitely different.
One thing to note is that the elevator 1 audio is much noisier than elevator 2.  I suspect this is partially my fault (holding the phone in different ways), but it points out another difference since elevator 2's problem: elevator 2 no longer has a functional fan.  There's also some noticeable impacts of my phone's microphone, with the dip at 5500 Hz and 8000 Hz.

The spikes are clearly the sound of the beep, and taking the peaks of the ~1000 Hz spike shows that elevator 1 has the peak at 1007.8125 Hz, with elevator 2 at 937.5 Hz (with these values being very dependent on the fairly low sampling frequency I'm using.  The samples are separated by 23.4375 Hz).

It's easy to scale elevator 2 by the ratio of the peaks.

This aligns the peaks at ~3000 Hz and ~4000 Hz.  The lower noise elevator 2 suggests a peak at ~2000 Hz as well.

So yes, those elevators are definitely making different sounds.



Sunday 21 August 2016

It seemed like there were more women's sports in this Olympics. Is that because they did better?

First up, it's entirely possible that this feeling is just because I never really watch any sports, and the news tends to focus on men's sports (with the possible exception of soccer).  Therefore, against that background, seeing any women's sports might just feel like an improvement.

However, given that NBC tape delayed everything, they had a large amount of leeway to tune what they programmed based on the results they already knew.  In this case, making events where the US won a medal more prominent might help increase ratings.

Conveniently, wikipedia lists all the results, and has a nice set of tables about how the US did.  So the question is: did the women's events produce more medals per participant than the men's events did?

To get a reasonable answer, I simply counted the number of medals won (split by type) per sport category, and divided by the number of participants in that category.  There are some complications with this method.  First, team events produce a higher fraction, so doing well in team events helps.  I've included each team member as a separate medal, and after some minor research, include the team members who didn't participate in the final.  I had them excluded on the first pass, but looking around it seems like those team members do get a medal as well.  This doesn't change the final numbers by much (mostly it just bumps swimming up even more).  Second, this ignores the Biles/Ledecky/Phelps effect, where one person dominates a sport heavily.  Still, normalizing by total participants ensures that it's not just a case of flooding a sport with lots of people, and winning that way.

So the results are:
Full sample average at 44.6%.

Full sample average at 51%.
Obviously there's lots of scatter.  Also obvious is that there is no good angle to rotate the labels to prevent overlaps.  In any case, all those nights of swimming, gymnastics and volleyball make sense, as those are sports that the women do well in.  Same for men's diving, although men's gymnastics might have been slightly over represented.

I also don't remember seeing any basketball, but that might have been sent to one of the other channels, and not the main NBC.  It's also possible based on the score differentials, that NBC just decided that those would be very boring games to watch, and skipped them for that reason.