Monthly Archives: January 2015

Behold the majestic Mangima Canyon in Bukidnon

Manolo Fortich, Bukidnon may be usually known for Dahilayan Adventure Park and Del Monte Golf and Country Club (home of really good steaks and bottomless Del Monte juice!) but this Bukidnon town is actually also home to something truly GRAND – the Mangima Canyon. Took the photos of below from …

Multiple Random Variables Problems

To probability lovers, I just want to share (and discuss) few simple problems I solved in Chapter 4 of Casella, G. and Berger, R.L. (2002). Statistical Inference.

  1. A random point $(X,Y)$ is distributed uniformly on the square with vertices $(1, 1),(1,-1),(-1,1),$ and $(-1,-1)$. That is, the joint pdf is $f(x,y)=frac{1}{4}$ on the square. Determine the probabilities of the following events.
    1. $X^2 + Y^2 < 1$
    2. $2X-Y>0$
    3. $|X+Y|


    1. $X^2 + Y^2 < 1$
      We need to consider the boundary of this inequality first in the unit square, so below is the plot of $X^2 + Y^2 = 1$,

      Hence, we are interested in the area of the ellipse above since $X^2 + Y^2$ is less than 1. To compute the area of the ellipse, notice that the regions in the 4 quadrants are identical except on the orientation, thus we can compute the area of the first quadrant then we simply multiply this by 4 to cover the overall area of the said geometric. begin{equation}nonumber begin{aligned} P(X^2 + Y^2 < 1) &= 4int_{0}^{1}int_{0}^{sqrt{1 – x^2}}frac{1}{4}operatorname{d}yoperatorname{d}x\ &= int_{0}^{1}yBigg|_{y=0}^{y=sqrt{1 – x^2}}operatorname{d}x = int_{0}^{1}sqrt{1 – x^2}operatorname{d}x\ &=left(frac{x}{2} sqrt{- x^{2} + 1} + frac{1}{2} operatorname{sin}^{-1}{left (x right )}right)Bigg|_{x=0}^{x=1}\ &=frac{pi}{4}-0=frac{pi}{4}. end{aligned} end{equation} Confirm this using python symbolic computation,

    2. Given $2X-Y>0$, we have
      begin{equation}nonumber P(2X-Y>0)=P(-Y>-2x) = P(Y

The shaded region is the event we are interested in, then begin{equation}nonumber begin{aligned} P(Y

  • Given $|X+Y|
  • On Mamasapano

    There have had many set backs and struggles in the negotiation process between the government of the Republic of the Philippines (GRP) and the Moro Islamic Liberation Front (MILF). Throughout decades or over a century in Mindanao (Southern Philipp…

    Category: Uncategorized

    Design tip: here’s a very easy way to spruce up a blank wall

    I just turned one of the bare and boring walls in our home into instant eye candy with the help of wall stickers! Yep, folks, wall stickers. I’ve been spotting a lot of Pinterest pins about wall decor stickers and I’ve been wondering where to get them locally when one …

    Back to Pediatrics, Autism Week, and a New Halal place!

    Assalamu Alaykum! (Peace be upon you all!)
    We are back in the colourful world of Pediatrics after a week of break with the second half of Pharmacology module. After the nerve-racking exam last Friday, it was indeed a welcoming relief to see the colourful walls in the OPD Pediatrics with all those Disney characters all around. And of course, the cheerful smiles of our angelic patients never fail to keep our days brighter as well.

    Pediatrics wall wallpaper disney Toys story
    The colorful walls in the OPD-Pediatrics
    There are more better photos of Disney Princess somewhere.
    Case Conferences and Higher learning!

    This week we had two case conferences, a lecture on complementary feeding (where our professor gave us chocolates! Yeay!) and lots and lots of Out-Patient exposure! Our rotation of 12-hour duties in the Pediatric Emergency Department (Pedia ER) are also being wrapped up for this last two weeks of our training in this department. This Friday my group will have our second and last 12-hour duty 🙂 Pretty looking forward to it and learn more things, in sha Allah (I might publish a post about “what to prepare for ER Duty”)

    Chocolates Complementary feeding Malnutrition
    Free chocolates during the lecture on Complementary Feeding!
    Hooray! (we have to stay awake in return though ahaha)
    We talked about Malnutrition while feeding ourselves with these.
    This week I also learned more about Autism Spectrum Disorder (ASD), Cerebral Palsy, and a bit about how to classify the severity of malnutrition of a child and on computing their Caloric Requirements as well. It was also great to see one of our very first “Mother-Doctor” in the college. Dr. Moral was the one who handled our “hand-group” during our first year in proper medicine wherein we talked about the wonderful art of Medicine and about our dreams and careers as well.

    The Forever-mates with Dr. Moral

    Photo grabbed from Karl 🙂

    Autism Awareness Week!

    Every last week of January, the Autism Awareness Week is being held nationally. Just recently I read about something like a “March of Angels” held somewhere in the metro in support of this awesome advocacy. You see, the cases of ASD (Autism) are increasing in number these days, and the wrong perception of most of us is that Autism is already a “dead end”. That it’s the end of life of the kid with Autism. This is ultimately wrong. There may be no cure to Autism yet, but it is not a lethal, “death-sentence” per say. The child with autism can still live long and happy, provided appropriate supports are given and his/her problems are addressed.

    In line with this as well, the Department of Pediatrics held a Bazaar and Autism Exhibit. There were booths wherein accessories, toys, bag-tags, bags, and even cookies that were PERSONALLY HAND-CRAFTED/CREATED by children with Autism were being sold. Some of their paintings were also put in display (and boy, some of them can paint way better than me! Haha)

    The Paintings by kids with autism are in the background.
    We were just looking at this map (not made by the children LOL) haha.
    Pose pose! (bought some awesome tasting cookies!)

    A new Halal Place!

    Alhamdulillah! We also discovered a new Halal restaurant near our school. It’s some 5-10 minute walk from PGH. I brought my friends there earlier today and they oh so loved the foods! Haha! They sell authentic Halal cuisines ranging from 55 to 120 Php. You can choose from a lot of foods inspired from Malaysian, Indonesian, Pakistani, and of course Tausug Cuisine!

    Halal Food cuisine Malaysian
    Gayyah’s Pagkaunan Halal restaurant 🙂
    It’s in Del Pilar Street near Pedro Gil side and
    just in front of the Musallah in Mabini.

    The name of the Restaurant is “GAYYAH’s PAGKAUNAN Halal Restaurant”. I haven’t tried all the foods and I am planning to interview the owner (or at least the one in-charge), and see if I can come up with another post (review?) about this place. It’s pretty clean and the servers (I refrain in calling them waitresses, coz they’re really not haha) are very kind 🙂

    Their SATTI and TIYULA’ ITUM are so delicious! @_@ Both costs around P65-75 each. They also have “Budget meals” (with 1 cup rice, 1 meat-viand, 1 vegetable viand and free glass of juice and tiyula’ itum soup) for only P55!

    delicious food Tausug satti tiyula itum
    Top: Satti
    Below left: Tiyula’ itum, Below right: Their Budget meal.
    (Photo from Buddy Denzy 🙂

    This might be the new place I will keep on visiting and bringing my friends to, especially those who really want to try our Halal foods 🙂

    Food trip with classmates
    Yeah, it’s them again. We are not “Forever-mates” for nothing huh?
    They really loved the foods by the way! ^_^
    (Though most of what we ordered were
    actually Non-Tausug foods! LOL)

    Photo grabbed from Karl 🙂

    Still need to work harder

    Another realization I had this week (again) is the fact that I STILL HAVE A LOT TO IMPROVE ON. I am still not as good as my group-mates in organizing my data and reporting my findings; And I still do not know a lot more of the cases we meet in the OPD -_-. I really have to push myself even harder to be better, in sha Allah. I chose this path knowing that it won’t be easy. So I should never be disillusioned by the number of free time I am having right now (well compared to last year in HelLu4).

    Speaking of working harder… there are really times that the struggle to stay awake in class is very, very hard to handle -_- specially when you are post-duty and the room is soooo cooold!

    Sleeping at school

    Hmm well, I think that’s all for the update on my Life in Medschool Series 🙂 Hope you all guys a re doing well! Salam kasilasa!

    PS. I am having some free time thanks to the pretty-benign schedule this week haha. I have to keep it productive though. Have to force myself to read and study some cases even though we don’t have an end-of-rotation exam. I wonder if I can really put these words into action though -_-

    Again, Salam Kasilasa!


    Review: Park Inn Radisson Davao hotel

    Perhaps two of the advantages of staying at Park Inn by Radisson Davao are the facts that this Davao hotel is right behind SM Lanang Premiere Mall (which houses the SMX Convention Center) and that it’s roughly 15 minutes away from Davao International Airport. Hence, if you want extra minutes …

    Full text: Pres. Aquino statement on Mamasapano Maguindanao clash

    The following is Philippine President Benigno Aquino III’s statement on the controversial Mamasapano, Maguindanao clash. What are your thoughts about this incident? Please share your comments below. Pahayag ng Kagalang-galang Benigno S. Aquino III Pangulo ng Pilipinas Ukol sa insidente sa Mamasapano, Maguindanao [Inihayag sa Palasyo ng Malacañan noong ika-28 …

    Applying for UP College of Medicine

    Assalamu Alaykum! (Peace be upon you all!)

    UP College of Medicine Applications PGH UPWe are already half-way through the school year and as expected, the new sets of applications for the next batch of martyr amazing medical students who will sacrifice their social lives really enjoy learning the wonderful world of medicine is here! Actually I am already way too late for this, but nah, what’s new? So to help those who are planning to apply in the most prestigious college of medicine in the country (UPCM of course!) here is a complete list of what you need to accomplish before the deadline!
    For those applying for academic year 2015-2016, COMPLETE YOUR APPLICATION REQUIREMENTS ALREADY! The deadline is already on FEBRUARY 4, 2015!

    Here are the requirements:

    For Lateral entrants/Regular applicants for LU3 (Medicine Proper), i.e. those who finished their Baccalaureate Degree or about to graduate this school year (2014-2015):


    1.       Fully accomplished UPCM Application Form

    a.       Available at the Admissions Office (Calderon Hall)

    b.      You have to pay a fee of P1,500 before getting the application form. The fee is NON-REFUNDABLE 🙁

    c.       For those coming from Zamboanga, Basilan, Sulu and Tawi-Tawi, you can PM in my FB page for some assistance, if needed.

    UP College of Medicine Application Form
    A sample of the UPCM Application form
    2.       A certified true copy of NSO Birth Certificate (Original and photocopy)

    3.       True Copy of Income Tax returns (ITR) of both parents if available

    4.       Original plus a photocopy of your NMAT result taken in last 2 years (April 2013-December 2014).

    a.       If you don’t have a copy of your results yet, request a copy from CEM, Inc and just inform the secretary in the admissions office that you will submit it later on (“to follow”).

    b.      An NMAT Score of not lower than 90 percentile is required to be eligible for application.

    5.       True copy of Transcript of Records (TOR) or Certified True copy of Grades for at least the 3 and a half years of your BS/AB program.

    6.       Four copies of 2×2 pictures. Formal, white background and signed by the applicant (on the front), do not staple/glue them in your application forms.

    7.       An updated certificate of Immunization(especially Hepa B) is also required. Having the first dose of HepB Vaccine is allowed provided that the student will ensure that he/she will complete the immunization later on.

    8.       A signed copy of the Return Service Agreement (RSA) for all regular applicants. This must be signed by both parents, with witnesses and also notarized, so I advise that you finish this first as soon as possible especially if your parents are in the provinces.

    9.       For Regionalization Program (RP) Applicants:

    a.       A photocopy of all the requirements submitted to the Community Liaison Officer (CLO) of their respective Region (you will be informed to whom you will send the additional documents)

    b.      A signed Acceptance to Serve and Assumption of Liability (ASAL) Agreement instead of the RSA. More on this later.

    c.       A fully accomplished Reply Slip (included in the RP Primer, downloadable copy provided below)
    For those applying in the REGIONALIZATION PROGRAM (RP), there will be a slight difference in the application process. Aside from all those mentioned above that you have to submit to the admissions office, you also have to submit these documents to your respective CLO:

    1.        A fully completed Regionalization Program (RP) Application form. It is basically the same and provided together with the regular application form; no additional fees to pay.

    2.       A certified Photocopy of NSO Birth Certificate

    3.       A proof of Residency in the community by submitting the following:

    a.       Barangay Certification

    b.      ITR of Parents

    c.       Certificate of Membership of Indigenous People

    4.       RP Form # 3 (to be provided by the Admissions Office)

    5.       True copies of ITR of both parents for the LAST THREE (3) YEARS.

    6.       Voter’s/Comelec ID of parent(s) and Applicants (Clear photocopy)

    7.       A Letter of Intention addressed to the RPC Chair (Dr. Abdel Jeffri Abdulla) to be considered under the RP. (download the pdf copy of the RP Primer for more info about this).


    Downloadable copies:

    For any other concerns regarding the application form, kindly visit the UPCM website or contact the Admissions Office:

    UP College of Medicine
    547 Pedro Gil St., Ermita, Manila
    Telefax: 536-1368 you may visit our website


     See you in there! ^_^

    Salam Kasilasa!


    PHOTOS: Giant Philippine Eagle along BuDa (Bukidnon-Davao border)

    Traversing the Bukidnon – Davao (BuDa) highway? If you’re entering or leaving Davao City via Bukidnon, you might want to watch out for really cool sculptures at Barangay Baganihan, Marilog District, Davao. This huge Philippine Eagle sculpture, crafted by Cotabato-born, fellow Mindanaoan Kublai Millan, is a sight to behold. Just …

    PHOTOS: Catching Up With Rivermaya band in Cebu

    I will let you in on a secret: Rivermaya band, despite the multi-platinum record selling success, thousands of successful concerts here and abroad and millions of fans, is actually composed of very friendly, down-to-earth, kulit guys. (so kulit you have to be on your toes whenever they have sheepish looks …

    Teenage Time Killer New Album to Feature Big Names

    The alternative rock group Corrosion of Conformity spent years on the underground circuit, gaining fans through the band’s unique musical skills and their sometimes shocking antics. Though the group broke up in more recent years, several former band members announced plans to form a new group called Teenage Time Killer. …

    Visayas Symphony Orchestra to join Liceo University Diamond Jubilee celebration

    To help celebrate Liceo University’s 60th (Diamond) Jubilee, the Visayas Symphony Orchestra will perform in a special gala concert at Rodelsa Hall on February 28, 2015. Under the baton of world-class Filipino artist Rudolf Pelaez Golez with pianist Jose Velez Malferrari as featured soloist, the much-awaited event aims to bring …

    New Toy: SAS® University Edition

    So I started using SAS® University Edition which is a FREE version of SAS® software. Again it’s FREE, and that’s the main reason why I want to relearn the language. The software was announced on March 24, 2014 and the download went available on May of that year. And for that, I salute Dr. Jim Goodnight. At least we can learn SAS® without paying for the expensive price tag, especially for single user like me.

    The software requires a virtual machine, where it runs on top of that; and a 64-bit processor. To install, just follow the instruction in this video. Although the installation in the video is done in Windows, it also works on Mac. Below is the screenshot of my SAS® Studio running on Safari.

    What’s in the box?

    The software includes the following libraries:

    1. Base SAS® – Make programming fast and easy with the SAS® programming language, ODS graphics and reporting procedure;
    2. SAS/STAT® – Trust SAS® proven reliability with a wide variety of statistical methods and techniques;
    3. SAS/IML® – Use this matrix programming language for more specialized analyses and data exploration;
    4. SAS Studio – Reduce your programming time with autocomplete for hundreds of SAS® statements and procedures, as well as built-in syntax help;
    5. SAS/ACCESS® – Seamlessly connect with your data, no matter where it resides.

    For more about SAS® University Edition please refer to the fact sheet.

    If you’ve been following this blog, I have been promoting free software (R, Python, and C/C++) for analysis, and the introduction of SAS® University Edition will only mean one thing, a new topic to discuss on succeeding posts. So let’s welcome this software by doing analysis on it.


    Our goal here is to address the basics in order to proceed with the analysis, and thus we have the following: 1. Importing and transforming the data; 2. Descriptive statistics; 3. Hypothesis testing: One-sample t test; 4. Creating function; and, 5. Visualization.


    We’ll use again the Volume of Palay Production (1994 to 2013 quarterly) from Cordillera Administrative Region (CAR) Philippines. To reproduce this article, please click here to download the data.

    1. Importing and transforming the data
      Working in SAS® Studio, requires you to upload your data into it. To do this, hover to the sidebar, click on Folders tab, and there you will find the “up arrow” for upload. See picture below

      You are now set to import the data using the following code. As for my case, the location of the uploaded data seen from the above photo is in “/folders/myfolders/palay.csv”,

      In SAS®, proc refers to procedure, where in this case we perform the import procedure. out is the path where the SAS® data is saved, here we saved it in “Work” folder with filename “palay”. getnames determines whether to generate SAS® variable names from the data values in the first record of the imported file. Finally, datarow starts reading data from the specified row number in the delimited text file.

      I want to emphasize that the description of the arguments of the statements and procedures above is available in the software itself, thanks to SAS® Studio, autocomplete for hundreds of SAS® statements and procedures is very handy. So that in the proceeding codes, we will give description on selected statements only. Below is the autocomplete feature of SAS® Studio seen in action,

      Now that we have the data in our workspace, let’s do some transformation on it. In R, we always start by viewing the head of the data or the first few observations of the data, and we code it as head(data). Having that habit, here’s how to do it in SAS®, in this case, first five observations,

      Obs Abra Apayao Benguet Ifugao Kalinga Mt_Province
      1 1243 2934 148 3300 10553 2675
      2 4158 9235 4287 8063 35257 1920
      3 1787 1922 1955 1074 4544 6955
      4 17152 14501 3536 19607 31687 2715
      5 1266 2385 2530 3315 8520 2601

      If you want to start and end on specific row, you can do the following. In this case, from 5th row to 10th row:

      Obs Abra Apayao Benguet Ifugao Kalinga Mt_Province
      5 1266 2385 2530 3315 8520 2601
      6 5576 7452 771 13134 28252 1242
      7 927 1099 2796 5134 3106 9145
      8 21540 17038 2463 14226 36238 2465
      9 1039 1382 2592 6842 4973 2624
      10 5424 10588 1064 13828 40140 1237

      Now, what about playing with the variables of the data? Say we want to view a specific column only, assuming observations from row 15 to 20 of the Benguet variable, how is that? Well, I humbly present to you the following code,

      Obs Benguet
      15 2847
      16 2942
      17 2119
      18 734
      19 2302
      20 2598

      For viewing multiple columns, simply enumerate the name of the variables using either keep — keeps the variables to be returned, or drop — drops the variables, excluded in the printing.

      Obs Abra Apayao Benguet Ifugao Kalinga
      15 1048 1427 2847 5526 4402
      16 25679 15661 2942 14452 33717
      17 1055 2191 2119 5882 7352
      18 5437 6461 734 10477 24494
      19 1029 1183 2302 6438 3316
      20 23710 12222 2598 8446 26659

      I think above are enough demonstrations for data transformation.
    2. Perform descriptive statistics
      And as always, next step is to look on the descriptive statistics of the data, and here’s how to do it,

      Variable N Mean Std Dev Minimum Maximum

      In case you want to view few or more statistics, you can try

      We’ll end this section with the following scatter plot matrix,

      A quick analysis, we see a strong positive relationship between Kalinga and Apayao; and relationship between Ifugao and Benguet base on the above scatter plot matrix.

    3. Hypothesis testing: One-sample t test
      Let’s perform simple hypothesis testing, the one-sample t test. Using 0.05 level of significance we’ll test whether the true mean of Abra is not equal to 15000.

      N Mean Std Dev Std Err Minimum Maximum
      79 12874.4 16746.5 1884.1 927.0 60303.0

      Mean 95% CL Mean Std Dev 95% CL Std Dev
      12874.4 9123.4 16625.4 16746.5 14480.9 19859.1

      DF t Value Pr > |t|
      78 -1.13 0.2627

      From the above numerical output, we see that the p-value = 0.2627 is greater than $alpha = 0.05$, hence there is no sufficient evidence to conclude that the average volume of palay production is not equal to 15000. Graphically, the observations of the Abra variable is not normally distributed based on its Q-Q plot, although that is subjective but evidently the points clearly deviates from the line.

    4. Creating a function
      Let’s create a function, we’ll use the fcmp procedure. For illustration purposes, consider the standard normal function, $$ phi(x) = frac{1}{sqrt{2pi}}expleft{-frac{x^2}{2}right} $$ In SAS® we code it as follows,

      To generate data from this function using do loop, consider the following:

      Obs x y
      1 -5.0 .000001487
      2 -4.9 .000002439
      3 -4.8 .000003961
      4 -4.7 .000006370
      5 -4.6 .000010141

      And that’s how you create and use a function in SAS®. For me, the function definition procedure fcmp is the best procedure to be included in SAS® version 9.2, and I’m just lucky relearning this language with this feature available, especially that it is FREE in SAS® Studio.
    5. Visualization
      Now it’s time for us to create some visual art. And SAS® being a propriety software, has a lot to offer. We’ve demonstrate few above already, this time let’s plot the data points of sn_data generated from the stdnorm function we define earlier. Here it is,

      For other types of plot, simply go to the Snippets tab in the side bar of the SAS® Studio, and there you will find template codes for different types of plots. See picture below,

      I will end this section with histogram and series plot.

      • Histogram
      • Historical


    In conclusion, it wasn’t difficult for me to relearn SAS®, not only because I have used it on few papers back in college, but also because I have programming background on R and Python, which I used as basis on understanding the grammar of the language. Overall, SAS® language is a high level language, as we see above, simple statement will give you complete results with graphics without having lengthy code. And although I used R and Python as my primary tools for research, I am happy to include SAS® on it. And despite the popularity of R in analysis, I am looking ahead to see more learners, students, and researchers even more bloggers using SAS®. That way, we can share and get ideas, techniques between communities of R, SAS®, and Python.

    What about you? How’s your experience with SAS® University Edition?

    Data Source


    1. SAS® Documentation
    2. Data Import. From (acccessed January 15, 2015)
    3. SAS Learning Module: Subsetting data in SAS. From (accessed January 15, 2015)

    How to renew your Philippine passport at DFA Centrio CDO

    A couple of things have changed since I last renewed my Philippine passport at the Department of Foreign Affairs (DFA) Cagayan de Oro. Apart from the fact that DFA CDO has now transferred from Limketkai Center to Ayala Centrio Mall, there isn’t any need to call their office for an …

    Smart Telecom offers FREE Twitter for Pope Francis Philippines visit

    SMART Telecom is offering FREE and unlimited access to social networking app Twitter from January 15 to 19, 2015. This, as a public service to all its 69 million prepaid and postpaid subscribers who want to share their Pope Francis / Papal Visit experience online. The free Twitter offer is …

    Hari pertama di pra sekolah

    Salam Kasih Sayang…

    Berapa hari tak update…. sebenarnya excited hendak cerita hari pertama Aisya di pra sekolah. Pertamanya MA hendak panjatkan kesyukuran kerana Aisya diberi peluang untuk masuk ke Pra sekolah ini. Syukur sangat-sangat. Ada juga t…