neděle 12. srpna 2012

Distribution of Friends on Facebook

I looked at the distribution of friends' friend count. I thought that I will just see an another example of Pareto distribution. Little did I know...


The distribution has a long tail but once the number of friends hit 150 it goes down quickly.


I thought ok, it's because they are mine friends and not a general population. I am more likely to be friend with someone who has many friends then with someone who has just a few friends. Hence my tail must be clipped at the tail.


I sampled people of the same frequent name and I have got the same strange result. I thought ok, it's because Facebook truncates the output to the first 300 people who are likely to be my friends. Hence the plot contains people with many friends.


But if I sample a rare name I still get a deformed curve. I have concluded that it can because of some power users with many friends. By Dunbar number our brain is designed to accommodate up to 150 friends with whom we maintain friendly relationship. And if we cross this limit we begin to neglect some of our friends. Hence I filtered all people with more than 150 friends.

And guess what, Pareto curve fitted the data perfectly!


To take away from this exercise:
  1. Be careful about the population you sample. If you ask people in a bus how far do they travel you will get a higher average than if you ask people at a bus station of the bus. A nice article called Why Your Friends Have More Friends Than You Do describes it nicely.
  2. Be careful about the extremes. They are likely to be somehow biased.  
Edit: once I wrote this article I found a similar article directly from Facebook and they observed the same things as I did! 

pondělí 6. srpna 2012

Co dělat, když jste neplodní

Máte tři možnosti:
  1. Být se s někým, kdo je taky neplodný, a adoptovat děti. Protože ani jeden z vás nemůže mít vlastní děti, partner vám nemůže vyčítat, že kvůli vám nemá vlastní děti. Navíc k dětem se oba dva budete chovat jako k vlastnímu, protože ani jeden z vás nemůže mít vlastní děti.
    Tenhle přístup není nerealistický, protože asi 10% populace je neplodné.
  2. Být s někým, kdo už děti má a další nechce a jen hledá partnera k výchově svých dětí. Nevýhodou je, že partner bude asi o dost starší než vy a pokud děti jsou už vyrostlé, tak vás špatně přijmou jako rodiče.
    Pravděpodobným partnerem je vdovec/vdova.
  3. Být s někým, kdo nechce mít děti ani v pozdějším věku.

čtvrtek 2. srpna 2012

Adwords pro Dropbox

Tak jsem si zvětšil dva Dropbox účty a to zadarmo. Návod v Angličtině je na lifehacker.com. Principiálně použijete $100 nebo $75 od Googlu, co dostane zdarma k novému Adwords účtu, k propagaci vašeho referral linku. A za každého uživatele, který si nainstaluje Dropbox pomocí vašeho linku dostanete 250MB (stejně jako ten, kdo instaluje Dropbox), a to až do 16GB.

úterý 31. července 2012

Panoramatic pictures and HDR

The best application for panoramic pictures I have found is ICE from Microsoft. The application is small to download, easy and fast to operate and it creates the best seamless pictures I have ever got from any panoramic software I have ever tried. And a bonus: it's free.

In the case of HDR I am indifferent. HDRtist is extremely simple to use and it aligns the pictures correctly; however, it creates a strong hallo around dark objects and the processing is incredibly slow. Furthermore, in respect to the main idea of the application, simplicity, the application should automatically crop the pictures. So the resulting HDR picture doesn't have dark and light borders caused by the aligning of the source pictures with different exposure.

Luminance HDR has a good automatic alignment tool and it creates nice realistic photos. It's my choice.

Picturenaut has a bad automatic alignment - it just shifts the pictures, but it doesn't rotate them. Hence for handheld shots it's unusable.

EasyHDR is maybe good, but in may hands it felt like rubbish.


HDRExpress has a bad alignment tool and creates strange white lines in the processed HDR photos.

úterý 17. července 2012

Chinese zodiac

I have found out that Chinese believe that people can be matched by the Chinese zodiac. Chinese zodiac differs from European zodiac that it doesn't categories people by the month but by the year. However, they have 12 signs as well and after the 12th sign the 1st sign goes. Let's look at the match table, where 1 means less compatible and 10 more compatible:


Rat Ox Tiger Rabbit Dragon Snake Horse Goat Monkey Rooster Dog Pig
Rat 9 6 4 7 10 7 3 4 10 6 8 8
Ox 6 8 4 8 7 9 5 2 4 9 7 7
Tiger 4 4 5 5 6 3 9 4 2 4 9 7
Rabbit 7 8 5 8 7 7 5 9 4 2 8 9
Dragon 10 7 6 7 9 8 8 7 10 9 2 8
Snake 7 9 3 7 8 8 4 7 4 9 8 4
Horse 3 5 9 5 8 4 8 8 5 6 9 6
Goat 4 2 4 9 7 7 8 9 5 5 4 9
Monkey 10 4 2 4 10 4 5 5 9 4 8 7
Rooster 6 9 4 2 9 9 6 5 4 4 5 5
Dog 8 7 9 8 2 8 9 4 8 5 7 7
Pig 8 7 7 9 8 4 6 9 7 5 7 8
Courtesy of http://www.findyourfate.com/chineseastro/grid.htm

I don't know about you but I don't see much. Let's do some visualization:
Conditional formatting in Excel. High levels are green, low levels are red.
That looks interesting - there are diagonal strips. Let's use Matlab to check that the strips aren't there by accident. To do that we will do random permutation test and measure uniformity. To measure the uniformity we can look at the average standard deviation in a row. And for the beginning we shift each column up by the column index multiplied by integer.

As depicted by the graph from Matlab, the maximal uniformity is reached when i=1
To visualize the result, we can use Excel again:
Excel plot when i=1
This looks meaningfully. But is it significant?

Minitab's t-test.
Minitab didn't identify the lowest value as an outlier. Hence, over finding is not significant. This is because our test is not strong enough. Nevertheless, if we generated more permutations (that are truly random), we would conclude that our finding is significant. 

And what did we find? The signs are sorted by the year. For example the difference between the rat and the dragon is four years. And they are good match. Based on our analysis of Chinese zodiac we can conclude that the hypothesized ideal age difference is in multiplies of 4 years and the worst age difference is in multiplies of 6 years. 

pondělí 16. července 2012

Chloupky

Neustále narážím na diskuze typu "rostou chloupky po oholení rychleji"? Nerostou, neb se jedná o mrtvou tkáň, která nemá, jak by mohla reagovat na oholení. Ale uvedu několik důvodů, proč se zdá, že je tomu přesně naopak.
  1. Chloupky vypadají jako kužel. A když seříznete špičku, průměrná šířka chloupku se zvětší. Tedy chloupky potom vypadají tlustší.
  2. S věkem chloupky tmavnou. A když uříznete světlý konec, chloupek průměrně ztmavne.
  3. Seříznutím jsou chloupky kratší, tedy méně ohebný. Takže působí, jako by ztvrdly.
  4. Relativní rozdíl mezi 1mm a 6mm je mnohem větší, než mezi 20mm a 25mm. Takže chloupky vypadají, jako by rostli rychleji.

středa 27. června 2012

Remote Control PC

After many hassle with VNC (unsecure/ or with proprietary and incompatible encryption), LogMeIn (trialware, after 30 days you have to buy it), build in support in Windows (it's hard to make it work on the client's computer at distance - there is always some unique problem) I have decided to try TeamViever. And so far I am satisfied.

The client side app is named: "For the instant customer"
The administrator's app is named: "All-In-One"