19hertz

ramblings of an electronic engineer.


2 Comments

Coursera – a free online university.

I thought I’d quickly share something I came across a few weeks ago. Coursera is a free online university that offeres various university quality courses online for free. Each course has about 2+ hours of video lectures per week with weekly quizes and a few assignments. So far I’ve been enjoying the courses I’ve enrolled in however I won’t be planning to finish then by the course end date due because I don’t have enough time and I’m already studying. So if you have some spare time it’s worth a look.

[Coursera]

Advertisements


3 Comments

Benfords Law

Benfords Law is one of the most fascinating things that I have ever come across, however to explain what it is lets play a game (actually the game I learnt about Benford law). Lets firstly list the numbers from 1-9

1 2 3 4 5 6 7 8 9

Now we are going to group these into two groups, one from 1-3 (Group A) and the other from 5-9 (Group B). For the purposes of our game the number 4 will be a dead zone that us no points will be gained on it (keep reading it will make sense).

(1 2 3) 4 (5 6 7 8 9)

Now the way the game will work is we will pick each pick a different group of numbers group A or group B. Each round we will then times two unknown values together in wolfram alpha and look at the first digit of the number, if it falls in your set of numbers you get a point, first to ten points wins.

So for example it first round might be the mass of the sun * the number of people living in america = 6.14×10^38 person kilograms (mixed units can be strange). The first digit is a 6 therefore group B would get a point.

Again if you searched for US debt * planks number = 15.86 trillion planck US dollars, group A would get a point.

So we start our game and you been a logical rational human begin choose group B because there are more numbers in that particular group and you have more changes of the first digit been one of your numbers. I however foolishly choose group A.

Now let me tell you why I will win almost every time. (hint its due to benfords law)

So we expect the probability of the first digit been any given number to be something like this:

In actual fact the probability distribution looks something like this:

So yeah, Benfords Law essentially states that there is a logarithmic probability distribution of the first digit of most lists of real-world data. This means looking back to our game the actual probability of each group winning per round is:

Group A: 60.2%

Group B: 30.1%

‘Dead Zone’: 9.7%

I’m not going to get into why the probability is distributed this way, however if your interested check out Wikipedia or Wolfram MathWorld. (My way of saying I can’t explain why it is that way)

Benfords Law works for a large range of real life data, testingbenfordslaw.com has many various examples of real life data sets that follow Benfords Law for example twitter users by followers count.

There are however some data sets that do not follow Benfords Law these include

  • Data sets where numbers are influenced by human thought (eg. shopping centre prices which are set through psychological thresholds)
  • Data sets where numbers are assigned (bank account numbers, telephone numbers…)
  • Data sets of bank accounts with a built-in minimum or maximum

In the real world Benfords Law is actually used as part of a set of analytical tools to detect fraud. If data sets in accounting don’t follow the logarithmic probability, accounting fraud has likely taken place. Here is an example of Benfords Law used to detect accounting fraud.

So there you have it. Benfords Law. One of my favourite counterintuitive curiosities.


4 Comments

7 Eleven BYO Cup Day 2012

Each year 7 Eleven has a special day where you can fill up a cup with slurpee mixture for $2.90 and this year that date is today. But before you go searching for the biggest vessel you can find here are some thing to note.

  • The cup must me water tight
  • The cup must be clean and safe to consume from.
  • The cup must be no larger then 23cm (width) x 26cm (height)

So currently I have three candidates for cup from myself, a 4 litre ice cream can, a celebrations (chocolate) box and a glass jar (complete with cork). By far the glass jar is my favourite choice (and it fits within the size restrictions, just) however measuring all sort of things around the house got be thinking. What is the maximum amount of slurpee you can get?

The Maths

Ok so first we need to calculate the amount of volume the ideal vessel can hold. The size dimensions are 23cm wide and 26cm high however we aren’t told if the width is the diameter of a circular base, width of a square base or the hypotenuse of a square base. From the promo video (above) we see that the hole each cup has to pass through is round so we will run with that.

max volume = pi*r^2*h

max volume = pi*0.115^2*0.26

max volume = 0.0108 cubic meters

Now we know that there are 1000 litres of water in a cubic meter so…

max litres = 1000*0.0108

max litres = 10.8 litres

Tips/Thoughts

So there you go, the maximum amount you can hope to get 10.8 litres of slurpee mixture which works out to be about 27c per litre. If you can get an optimum square container passed it work out to be about an extra 3 litres you can fit in but it’s up to each 7 Eleven employee to allow your container. So in light of that here are my three tips for BYO cup day.

Find the biggest cup you can, that fulfils the previous conditions.

It just makes sense, the lager the cup the more value for money you get. For my cups I’ve found, each only hold about 4 litres but that’s still not that bad. If you can’t find a cup I have a couple of friends that are going to try to use a family sized KFC bucket so you can give that a try.

Think about how your going to store it

Depending on how thirsty you are (and how many friends claim a share to your spoils) you should probably think about how you are going to store the remains of what you cannot finish. Here I’d recommend freezing it and cutting off pieces to either enjoy as an ice block or crush up with an smoothie maker or similar to try to make a slurpee consistency. What ever you do it’s doubtful you’ll get it to the same texture as you bought it for reason i’ve mentioned before.

Don’t worry if you miss out.

There will be plenty of other opportunities in the following years to get free slurpees and other promotions on 7/11 day, 7/11 $1 Day etc… Not convinced? I find it can be helpful to realise how fortunate we are in Australia. Many (>90%) of the word will never see/know what a slurpee is, so if you miss out on the opportunity to get one for better than normal value  no it’s not the end of the world.


Leave a comment

Map of the Internet

I came across this awesome map of the Internet recently which is quite simply, amazing. Firstly each website is represented by a bubble. The size of each bubble is determined by the number of hits that it receives, whereas the proximity of each bubble is determined by the amount of traffic between sites. The colour of the bubbles also represent the countries they belong to.

This reminds me of a similar map of the internet created back in 2006 by XKCD. The map displayed  all the possible IP addresses (IPv4) and who reserved each IP address space. XKCD also made two other ‘maps’ of the internet that are worth a mention: Online Communities and Online Communities 2.


1 Comment

EURion Constellation

One of the things I enjoy doing in my spare time is hitting the road (or backyard) and doing some astrophotography, and while shooting pictures or star constellations like orion and our southern cross may be fun I won’t be taking pictures of the EURion Constellation anytime soon. That’s because the EURion constellation actually isn’t a star constellation but rather a counterfeiting countermeasure used on bank notes and coins.

There are various techniques used to stop counterfeit money been made, magnetic and uv reactive inks, Guilloché patterns, holograms etc.. however unlike these which were publicly announced the EURion constellation was kept secret from the general public.

The EURion Constellation

The EURion constellation was coined my Markus Kuhn in 2002 when he realised through experimentation that that a colour photocopier wouldn’t copy banknotes with a certain pattern of circles on them. Markus descriped the constellation as:

“five 1 mm large circles that appears on many more recent banknotes, usually in yellow, but often also in green or orange.”

This pattern spotted by Markus was later coined as the EURion constellation. The constellation’s name is mixture of Euro’s ISO 4217 designation (EUR) and the Orion constellation (which happens to have a similar constellation pattern to that of the EURion constellation).

Software/Hardware is used to scan for this particular geometric pattern and stop the replication of it, this is implemented into several several programs (Microsoft Word, Adobe Photoshop) as well as a multitude of printers and photocopiers. Due to this any banknote with the EURion constellation should be prevented from being copied.

The constellation can be found on a large range of noted of various currencies for example the Euro, some United States notes, Japanese Yen and Canadian Dollar.

EURion Constellation on United States $20 Note.

As for Australian banknotes, only one note (the Commemorative $5) utilises the EURion constellation.

Australian Commemorative $5 Note (2001)

If you have any further comments or question feel free to leave a reply.

For more information visit: