Saturday, June 6, 2015

What are the chances of finding a soulmate in Myanmar?

Myanmar census data is out. What that means for us - single people - is that now we are able to estimate our chances of finding a soul-mate in a very objective way.

But see, I am not that picky.
For me, as a single 27 year old girl, I am just hoping to find

Requirement 1) a single guy (...exemptions are for widows or divorcees with no kids)

Requirement 2) who is in the same age range as me (No offense to older folks. But it's just easier to talk to someone who is in the same generation as me. And I don't want to be a cougar either.)

Requirement 3) who lives in Yangon (I am a city girl, which is unfortunate for me. Except for Yangon, the rest of the country looks actually like a country-side.)

Requirement 4) who has at least a college degree (Education is important. Do you agree?)

Requirement 5) who is straight (But it's too bad that census data didn't ask people's sexual preferences. There is no way of knowing now.)

So do you agree that I am very reasonable with my requirements? I am sure you do.
Now let's look at my chances.
There are over 24 million guys in Myanmar. 24,228,714 guys to be exact.

Requirement 1) There are still 3.3 million single guys above the age of 20 left in Myanmar. Not even 14% chance. What a way to start looking at the chances.

Requirement 2) There are only 0.78 million single guys in the age range from 25-29 in Myanmar. Now my chance has gone down to 3%.

Requirement 3) There are 0.27 million single guys in the the age range from 25-29 in Yangon. If my prince charming will have to be from Yangon, my chance now has gone down even further to 1.1%.

Requirement 4) Census data doesn't have a tabulation with the age group, marital status and education status. So now I have to make some assumption. Among all the males in Yangon, 24% has at least a university degree. If that education status structure is similar across all marital status, now I am left only with 64,000 eligible guys. Probability wise, I am left with 0.26%.

Requirement 5) My chances are already slim as it is. I am not gonna go further down. Spare me a few mercy.

From the guy's side, I am sure he is looking for the same quality. There is still 0.15 million single women within my age group left in Yangon, a third of whom are assumed to have at least a university degree. (Hey...Myanmar women are smarter.) It means I may have a direct competition with about 50,000 women.

Overall, even though my chance is quite slim, the other 49,999 women are in the same boat as me. In fact, there are more gents than the ladies in this age group with comparable requirements, which is favorable to all of us. We ladies don't need to compete against each other that much. There is at least one guy for all of us. The gents are not as lucky as us though. Some 14,000 gents are definitely fated to be lu-pyo-gyis for life.

Myanmar Census 2014 Results

Myanmar census data 2014 was released recently. (You may download the publication from here.) This is an exciting time for us - data geeks, given how hard one can actually glimpse at a data set. We just don't have any. The last census was done in the 80's, before I was even born. A tale of having a reliable country-wide data in Myanmar used to be as old as time, but it is no longer.

In the light of this census, Phandeeyar - a local innovation hub - also organized a hackathon today to dig through the census data. This was also the first of many events lying ahead to restructure and to analyze the census data so that it will be accessible and easily understandable to everyone.

In short, I am excited. Everyone is excited. So stay tuned for a series of my interpretations of the census data.

Friday, May 8, 2015

Watch out

A good friend of mine from work always joked me how statisticians are crazy. Here is the story.  
 
 A statistician once wanted to know the time. So he took out his two pocket watches. One watch was broken and hence, stopped at noon. Another watch was found to be 5 minutes early. He decided to use the broken watch to look up the time.

Here is the reasoning behind his thoughts: 
Watch 1: Although it is broken, there will be 2 moments in a day when he has the chance to get the time right.
Watch 2: Since the watch is always 5 minutes early, he will never get the time right.

Sounds crazy, right? How did that happen? The logic is exactly right.

This just points out how important it is for statisticians to know not only the numbers but also the context.

In this case, the poor guy just got the model wrong. He could have plotted the correct time (Y) versus the times that the two watches are showing (X1 and X2). (Y~X1) and (Y~X2). He would have found out that the second watch was a much better fit. 

******************************************************************************************************************

အလုပ္က ခင္မင္ရတဲ့ အန္ကယ္ၾကီးတစ္ေယာက္က ကၽြန္မကို စာရင္းပညာရွင္ေတြ ေဂါက္ေၾကာင္ျဖစ္တတ္ပံုအေၾကာင္းကို ဒီလိုအျမဲေနာက္ေလ့ရွိပါတယ္။

 တစ္ခါက စာရင္းပညာရွင္တစ္ေယာက္က အခ်ိန္သိခ်င္တဲ့အတြက္ သူ႕ရဲ႕ အိတ္ေဆာင္နာရီ ၂ လံုးကို ထုတ္ၾကည့္လိုက္ပါတယ္။ ပထမနာရီက ကြဲျပီး ရပ္ေနပါတယ္။ ေနာက္နာရီကေတာ့ ၅ မိနစ္ျမန္ေနပါတယ္။ အဲဒါနဲ႕ပဲ ပညာရွင္ၾကီးက ပထမနာရီကို သံုးဖို႕ ဆံုးျဖတ္လိုက္ပါတယ္။

သူစဥ္းစားတာက ဒီလိုေလ။ ပထမနာရီက ရပ္ေနေပမယ့္ တစ္ေန႕ကို ၂ ခါေတာ့ မွန္ႏိုင္ေသးတယ္။ ဒုတိယနာရီက အျမဲတမ္း ၅ မိနစ္စာ လြဲေနဦးမယ္။

ဘာေတြလဲ။ ဘယ္လိုျဖစ္သြားတာလဲ။ သူေျပာေတာ့လည္း ဟုတ္ေနတာပဲမလား။

ဒီပံုျပင္ေလးက စာရင္းပညာရွင္ေတြအဖို႕ နံပါတ္ေတြပဲ ၾကည့္မယ့္အစား အေျခအေနကိုလည္း နားလည္ဖို႕လိုေၾကာင္း မီးေမာင္းထိုးျပေနပါတယ္။ 

တကယ္လို႕ ပညာရွင္ၾကီးက အခ်ိန္အမွန္နဲ႕ နာရီ ၂ ခုက ျပေနတဲ့ အခ်ိန္ေတြကိုသာ ဂရပ္ဆြဲၾကည့္လိုက္ရင္ ဒုတိယနာရီက ပိုမွန္ေၾကာင္း သိႏိုင္ပါတယ္။

Tuesday, September 9, 2014

Almost Thadingyut

It's been a while that I have written anything on this blog. There were two parts to the reason: At first, I got too busy at work during weekdays so I started writing on weekends. And then, I got chosen by one of my best friends to be her bridesmaid, which meant bridal shopping on weekends. Don't get me wrong: it's always my pleasure to accompany her. Friends or blogs? For me, it's always friends.

So it's now almost Thadingyut, which also marks the opening of nuptial season. My friend is also almost done with her wedding preparations and she is getting married in a month. Although I keep referring this wedding from the bridal side, I know both groom and bride. They have been my friends since kindergarten. They were sorta high school sweethearts although they started dating only after high school. For my friend, he was also her first love.

Then I wonder what are the chances that he is actually the best one for her given that she has never dated anyone else. (No offense, my dear friends if you happen to read this. I love you both.) You know, to be honest, I can't see how you can decide upon one person without having dated anyone else. 

There is already a well defined probability problem for my friend's case. It's known in statistics classically as a secretary problem or optimal stopping. The secretary problem is that I want to fill a single secretarial position and there are n known applicants whom will be interviewed sequentially. As soon as I am done with the interviews (or dating), the applicant is either accepted or rejected (for marriage ???) right away. When will be the best place to stop or what will I have the highest probability of selecting the best applicant?

Going back to analogy with dating and marriage: calculations are very straightforward actually. If I am happy with the first date, I will just marry him and I don't have to date the second one. Or else I have to move on with second date.

Probability of choosing the correct one at r marriage time 
 = Sum (from i = 1 to n) of P (i-th date is chosen and i-th date is the best)
 = Sum (from i = 1 to n) of P (i-th date is chosen given i-th date is the best) x P (i-th date is the best)

I will have you read the details at this wikipedia page on secretary problem. To make the long story short, you have the answer of 1/e or about 36.8%, which means that you should look for your best eligible man among the first 36.8%.

Of course, this is just a mathematical reminder to know when one should stop dating. Some people like to date forever, and I respect their choice. Also the probability of your selected one being the best partner is a whole new problem with a lot of variables in it. I am sure OkCupid has found out an answer already. 

So my friend, you are very lucky, you didn't have to look far to get the right one. He is there with you since the start. I sincerely wish you all the best.











Wednesday, April 2, 2014

Sample Ample




tckwavm jrefrmEdkifiHrSm t&rf;acwfpm;wmu qmaA; (Survey) aumufwmyg/ awGUwdkif;olwdkif;ar;vdkuf&if qmaA; (Survey) aumufwJholawGcsnf;yJ/ tvkyfwpfckckvkyfjyDqdk&if 'Dtvkyf b,favmufatmifjrifaMumif;? vlb,fESpfa,mufrSmjzifh tusdK;&SdaMumif; ponfjzifhaygh/ tJ...'DrSm awmfawmfrsm;rsm; qmaA;aumufwJholawGawmfawmfrsm;rsm;rSm txifrSm;aewmav;wpfckudk oGm;awGUrdygw,f/ b,frSmvJqdkawmh udk,fqmaA;aumufr,fh vlOD;a& (Sample Size) ,lwJhae&mrSmyg/

trsm;u b,fvdkxifaevJqdkawmh udk,foGm;ar;r,fh vlOD;a&rsm;av? aumif;av vdkUxifMuw,f/ 'ghtjyif oGm;ar;r,fh vlOD;a&u rlvpkpkaygif;vlOD;a& (Total Population) &JU tenf;qHk; 5% wdkU 10% wdkU &Sd&r,f qdkwmu ygao;w,f/ 'grS Statistics t& wdusr,fayghav/

tJ'gu awmfawmfav;udk rSm;aewJh t,ljzpfygw,f/ vlOD;a&rsm;av? aumif;avqdkwmudkawmh tMurf;zsif; vufcHygw,f/ 'gayr,fh udk,fhavhvmr,fh taMumif;t&mtay:rlwnfjyD; vlOD;a&ta&twGufwpfckcka&mufoGm;jyD;&if aemufxyfvlOD;a&xyfwdk;vnf; udk,fhtwGuf bmrSxyfjyD; tusdK;r&Sdawmhygbl;/ oGm;ar;r,fh vlOD;a&ydkrsm;wJhtwGufom ydkufqHydkukefomwm &Sdygvdrfhr,f/


'Dawmh udk,fhtwGuf taumif;qHk;oGm;ar;oifhwJh vlOD;a& ta&twGufu b,favmufvJ/ 
aocsmwmuawmh trsm;u ajymaewJh 5% wdkU 10% wdkU r[kwfwmawmh trSefyJ/ tvG,fulqHk; Oyrmay;vdkufr,f/ tck 2015 a&G;aumufyGJtwGuf MudKyGdKifhwGufcsif&if jrefrmEdkifiHvlOD;a&oef; 60 &JU 10% jzpfwJh vlOD;a& 6 oef;udkom oGm;ar;&&if wu,fhudk rvG,faMumyJ/

tckvkyfaewJh qmaA;awmfawmfrsm;rsm;u rlvu vlOD;a& (Total Population) &JU b,ftcsdK; (Proportion) u b,fvdkrsdK;vJudk odcsifMuwmrsm;ygw,f/ Oyrm jrefrmEdkifiH&JU udk,f0efaqmiftrsdK;orD;OD;a&b,favmuf&mcdkifEIef;u om;zGm;q&mrawGeJU eD;uyfqufqHrI&SdovJ/ 2015 rSm a':pkudk b,favmuf&mcdkifEIef;u rJay;rvJaygh/ uav;b,favmuf&mcdkifEIef;u tpm00vifvifpm;&ovJ/ vlOD;a&b,favmufu pmwwfvJ/

'Dvdk Proportion udk odcsifwJhtcgrSm &SdwwfwJh 'D Proportion awG&JU jzefUusufrI (Distribution) u Binomial Distribution jzpfygw,f/ ESpfckxJu wpfckudk a&G;&wJhjzefUusufrIwdkif;u Binomial Distribution jzpfygw,f/ apmapmu OyrmrSm jrefrmEdkifiH&JU udk,f0efaqmiftrsdK;orD;wpfa,mufu om;zGm;q&mrawGeJU eD;uyfqufqHrI&Sd&if&Sdw,f? r&Sd&if r&Sdbl;/ a':pkudk rJay;&ifay;? ray;&if ray;bl;/ ESpfrsdK;xJu wpfrsdK;yJ vkyfydkifcGifh&Sdw,f/ ESpfrsdK;pvHk;rjzpfEdkifbl;/

'D Binomial Distribution &SdwJh vlOD;a&rsdK;twGuf Sample Size a&G;vdkU&Sd&if pOf;pm;&r,fh tcsuf 3 csufyJ&Sdygw,f/
1/ rdrdcefUrSef;xm;onfh &mcdkifEIef; (Estimated Proportion)
2/ vGJacsmfcGifh (Margin of Error)
3/ ,HkMunfrItwdkif;twm (Confidence Level)
wpfckrS apmapmuajymwJh rlvvlOD;a&&JU b,f&mcdkifEIef;qdkwm r[kwfbl;/

1/ rdrdcefUrSef;xm;onfh &mcdkifEIef; (Estimated Proportion)
udk,fu bmudkyJ avhvm avhvm? udk,favhvmaewJh taMumif;t&meJU ywfoufjyD; aemufcHokawoe (Background Research) rvkyfvdkUr&ygbl;/ t&ifu wpfjcm;olawG avhvmxm;wmawG&Sdw,f/ 'gawGoHk;jyD; tckudk,fvkyf&ifawmh tajzu bmav;jzpfEdkifw,fqdkjyD; MudKwifcefUrSef;&ygw,f/ Educated Guess aygh/ olrsm;vkyfxm;jyD;om;r&Sd&ifawmif wu,hfokawoeMuD;rvkyfcif tMudKokawoeav; (Pilot Study) t&ifvkyf&ygw,f/ udk,fhrSm bmMudKwifxifjrifcsuf (Hypothesis) rS r&SdbJ okawoeoGm;vkyf&if 'g[mppfrSefwJh okawoer[kwfygbl;/

Oyrm uRefru jrefrmEdkifiH&JU vlOD;a&b,favmufu pmwwfvJ avhvmcsifw,fqdkygawmh/ UN u t&ifu  jrefrmEdkifiH&JU vlOD;a& 93% u pmwwfw,fvdkU ajymxm;w,f/ tck bkef;awmfMuD;oifausmif;awG ydkrsm;vmjyD;qdkawmh 95% avmufawmh pmwwfvdrfhr,fvdkU uRefru xifw,f/

2/ vGJacsmfcGifh (Margin of Error)
'guawmh apmapmu uRefrxifxm;wmuae b,favmufvGJcGifh&SdvJqdkwmyg/ uRefru t&rf;wduscsif&if 1% vdkUajymvdkU&w,f/ 'grSr[kwf 3% ajymvdkUvJ&w,f/ 10% vdkUvJajymvdkU&w,f/ aq;ynmrSm 'Duifqmaq;wpfckckaomufvdkuf&if vlemaysmufoGm;rvm;? aooGm;rvm; odcsif&ifawmh 0.001% avmuftxd t&rf;wduszdkUvdkygw,f/ udk,favhvmwJh taMumif;t&mrSmyJ rlwnfygw,f/

'Dawmh tck 3% vdkUyJ ,lvdkuf&atmif/ 'Dawmh uRefrxifwJh&mcdkifEIef;u 92% uae 98% txd jzpfEdkifw,f/ uRefrtwGufuawmh pmwwfwJh &mcdkifEIef;u 95% uGufwdjzpfaezdkUrS rvdkwm/

3/ ,HkMunfrItwdkif;twm (Confidence Level)
'guawmh uRefr&JU okawoejyD;oGm;&if uRefr&vmr,fh tajzay:rSm b,favmuf,HkMunfrI&SdovJqdkwm jzpfygw,f/ 'gudk Significance vdkUvJ vlodrsm;Muygw,f/ awmfawmfrsm;rsm;uawmh Confidence Level udk 95% ,lMuygw,f/ tJ'gbmudkqdkvdkwmvJqdkawmh uRefrvkyfcJhwJh okawoetwdkif; \onfra&G; aemufxyf tacguf 100 xyfvkyfMunfh/ 95 acgufrSm &vmwJh tajzu apmapmu uRefr&wJh tajz eJU vGJacsmfcGifh 3% twGif; jyef&vdrfhr,fudk qdkvdkygw,f/ 'DrSm apmapmuvdkyJ udk,favhvmwmeJUyJ qdkifygw,f/ tjrJwrf; 'DtajzyJ xGufapcsifae&ifawmh Confidence Level udkh 99% wdkUavmuftxd,l&rSmaygh/ odyfrvdk&ifawmh 90% avmufvJ jzpfygw,f/

tckawmh trsm;,lwJhtwdkif; 95% vdkYyJ ,l&atmif/ 'D 95% Confidence Level udk z-score tjzpfajymif;vdkuf&if 1.96 &ygw,f/

'D 3 ck&&if usefwmu azmfjrLvmxJ xnfhvdkuf&HkygyJ/ Binomial Distribution &SdwJh vlOD;a&rsdK;twGuf Sample Size a&G;zdkU azmfjrLvmu


'DazmfjrLvmoHk;jyD; wGufvdkuf&if uRefravhvmcsifwJh jrefrmEdkifiHvlOD;a& b,favmufpmwwfvJ okawoetwGuf vl 203 a,mufom vdkygw,f/ 'Dta,muf 203 a,muf u jrefrmEdkifiHvlOD;a&eJU ,SOfvdkuf&if awmfawmfhudk enf;aewmyg/ apmapmuvdkqdk&if jrefrmEdkifiH vlOD;a&&JU 10% jzpfwJh ta,muf 6 oef;udk vdkufar;zdkU rvdkygbl;/

wpfck&Sdwmu uRefru 'DrSm t"duokawoe ar;cGef;wpfckxJtwGufudkyJ tajccHjyD;wGufxm;wmyg/ wpfjcm;ar;cGef;awGyg tqpfygr,fqdk&ifawmh azmfjrLvmu enf;enf;ajymif;oGm;ygr,f/ ar;cGef;rsm;vmavav? ar;oifhwJh vlOD;a&vJydkrsm;vmEdkifavaygh/ aocsmwmuawmh 6 oef;txdra&mufbl;/