Thursday, December 27, 2012

A statistical approach to predicting my getting sick

During my recent trip to Iceland, I thought to myself how grateful I am that I haven't been sick, and that it's surprising because "it's about time I got sick again."  Days later, I randomly got sick (sore throat, constant 102 temp, coughing); I should be fine in 3 more days, though.  In the meantime, just for fun during the winter break, I decided to see if I can define some formalism for this supposed intuition.

Disclaimer: I know this is some rough, make-shift calculations, but given the nature of having so little data, and that the real, useful data is all immeasurable and not at my disposal, this is what you get :-)

I get a sore throat about 5 times each year -- which always lends me voiceless for about a week -- despite the fact that I:
  • eat healthy
  • workout regularly
  • have good hygiene practices (shower at least once a day, brush teeth & floss twice a day, wash hands frequently, etc)
  • have no known allergies or health issues (have seen several docs at MIT regarding this)
I've been tempted to just go to NYC and lick every bus pole and escalator handrail I can, in attempt to go ahead and get it over with by subjecting my body to every known bacteria and virus out there.

Obviously, there's a myriad of variables that can cause one to get sick:
  • stress
  • germs being spread from air, physical contact, etc
  • weakened immune system (i.e., from over-training in the gym, stress, etc)
Clearly, these things are easily intertwined and impossible to accurately monitor and model.

However, in late 2007, I wanted to get to the bottom of it and was curious if there were any patterns in my getting sore throats.  So, for the past 5 years, I've quickly logged every time I get sick (a rating of the severity, how many days, and symptoms).

In the following picture, I plot every time I've gotten a sore throat, rounding to the closest week.



Looking at any patterns over time will only show possible correlations, not causes, I know.  Yet, the times I get sick are highly consistent from year to year:
  • I pretty much always get sick on Jan 1
  • I essentially never get sick from April 1 - July 31
  • my sore throat always lasts exactly 6 or 7 days.
  • I get sick roughly 5 times every year from August 1 - March 31.
  • 100% of the times that I fly overseas, I either get sick while there or soon as I come back -- but it's not always sore throats.  Here, I'm only concerned with sore throats.
I will refer to August 1 - March 31 as the sick period/months, which spans 32 weeks.  For all calculations, we are only concerned with getting sick during the current sick period, and that each one is independent of the previous years'.

Again, since it's impossible to model the aforementioned variables that are the actual causes of getting sick, I figured why not play around with the time-series data and treat it as indications as to when I'll get sick.  So, here we are making the large assumption that all of the underlying sick-causes variables are consistent and uniformly distributed during the sick months, and that I get sick on average 5 times per sick period.  I think this is reasonably fair as a high-level approximation.

If we model my sickness as a Poisson distribution, we see that the probability of getting sick N number of times during a sick period is:

N
probability of getting sick N times
1
0.033689734995427
2
0.084224337488568
3
0.140373895814281
4
0.175467369767851
5
0.175467369767851
6
0.146222808139876
7
0.104444862957054
8
0.065278039348159
9
0.036265577415644
10
0.018132788707822

I like that distribution; it seems to fit my sickness history pretty well... although places a little too much weight on getting sick more than 5 times.

For each one of these possible outcomes (and including all N up to however many weeks we have left... not just N >= 10), there's a chance of getting sick next week, which is simply N/(# of weeks remaining).... again, assuming uniform distribution of everything, including the times I get sick within the sick period.

Further, if we wish to calculate the overall probability of getting sick next week (i.e., summed over each possible N), we simply combine these two things, and weight and normalize by the Poisson probabilities listed in the above table.



As a real life example, last week:
m = 13 (meaning 13 weeks left until March 31 aka end of 'sick period')
n = 2 (meaning I've been sick twice so far)
lambda = 5 (meaning on average I get sick 5 times each year)

Per the above equation, the probability of getting sick this week (which I did) was roughly 42.10%.

Further, if I did not get sick this week, the probability of getting sick the following week would be 45.43%

Further, not getting sick in the 2 upcoming weeks, but getting sick on the following would be 49.14%

Thus, the probability of NOT getting sick during the current week and upcoming 2 weeks was only 16%, which agrees with irking feeling I got: "sweet; I'm not sick... it's been a while though..." 

In the meantime, if anyone is down for my NYC-immunity-deplete-boost idea, let me know.  I'll let you go first as the guinea pig.




Friday, September 7, 2012

Brown is amazing



This week, I officially matriculated as a PhD student at Brown University.

For the past 6 years I've flirted with the idea of pursuing a PhD -- applied to a several schools back during my senior year of college in 2006.  Brown was actually one of those schools.  They rejected me.  As a shot in the dark, I casually sent them an informal email simply asking if I could be considered for their Master's program.  This was very unorthodoxed, as the Master's and PhD programs have separate applications and are examined differently by the admissions committee.  To my surprise, they replied 3 days later with the following opening line:
Dear Christopher,
Congratulations! On behalf of the Department of Computer Science, I'mdelighted to inform you that your application for admission to the Sc.M.program has been approved by this department.

However, I ended up enrolling at UCLA for my Master's.  The future communication I had with Brown would all prove to be equally impressive, genuine, and caring.

In short:

  • my undergrad, Florida Tech, was a great school for me, as it served as the perfect stepping stone and challenged me appropriately as I developed foundations in Math and Computer Science.
  • UCLA was great and very different from Florida Tech in every way: 40,000 students instead of 4,000.  More Olympic medals and NCAA championships than any other university.  Tons of crazy overachieving high schoolers who are all very diverse in their interests and talents.
  • Brown seems to be the best of all worlds, as I briefly explain below.
Brown has the incredibly smart student body, world-class researchers, and over-achieving everybody.  However, the university is small (6,000 ugrads and 2,000 grads) and is within the quaint town of Providence, Rhode Island, which is like the smaller, like-able little brother of Boston.  Moreover, I've never witnessed such genuinely caring professors, staff, and students.  It really is like a tight-knit community, and in short, they do education right here.

Brown is consistently ranked as the #1 college in terms of happy students, and I can now see why.

There's an open-curriculum, where undergrads get to draft their own program.  No other major university in America has this [1].  Classes can be pass/fail if they want.  And surprisingly, the professors -- at least the ones I've had thus far -- are all excellent teachers, which is naturally rare amongst research universities.  Moreover, it is appears common for strangers to first ask you, "How do you like it here so far?" to which both parties then say, "I love it."  It's eerie how often this seems to happen.

I could ramble for a while about little situations that have risen thus far, and how it's been really cool and impressive.  However, I'll just conclude with two very small events that I encountered during my 3 days.  These events were tiny, but yielded a surprising "oh wow" response:
  1. In my first Computational Biology class, the very energetic professor was giving motivation for studying the field and provided a very quick intro to biology.  In passing, and just an incidental part of one sentence, he stated, "by the way, just a few years ago, someone won the Nobel Prize in this area... oh yea, and he was a Brown undergrad here"
  2. While walking across campus, I stumbled upon a building that had tons of students who were packed in (and even hanging around outside), as everyone watched some intense dancing.  I caught the latter half of some dramatic African dancing which included Bongo drums!  What a diverse and cool student body.
So, in short, my first week has been great.  I love Brown.



Wednesday, July 18, 2012

Things I'll miss and not miss about Boston


When I was a senior in high school, I got rejected from some colleges and heard that the valedictorian got rejected from MIT but accepted to Harvard.  I hadn't heard of MIT but at this time I decided to take education really seriously and that this MIT school would be my goal.  It was a childish goal, but that's how I first come to learn about MIT and Boston.

For spring break in 2006, during my senior year of college, I visited Boston with a great friend.  We enjoyed Boston a lot, which further attracted me.

In 2009, I finished my Master's at UCLA and happily accepted an Associate Staff position at MIT Lincoln Lab.  I moved to the heart of Boston -- the Beacon Hill neighborhood.

Now that I've been here for 3 years, I'm leaving for the next stage.

Things I'll miss about Boston:

  • work: without going into specifics, the world-class researchers, resources (from computing to textbooks to journal libraries), and freedom have been phenomenal.  I still proclaim that MITLL is the #1 place in the world to work.
  • personal relationships: words cannot express


Little nuisances I WON'T miss about Boston:


  • tiny/expensive apartment (approx $1,000/sq ft for buying)
  • no cell phone reception (at home or at work)
  • parking: 
    • takes 10-20 minutes to find a parking spot by my apartment (sometimes upwards of 45 minutes or longer)
    • must move car often due to street cleaning and whatnot.  on those days, you must move car by 7 or 8am.  if you fail to do so, your car will be towed.  luckily, i've avoided this for 3 years, but it surely involves a lot of effort to stay on top of the situation.
    • cars get broken into.  mine did, and all i had visible was a cheap $100 after-market CD player installed.
  • commute: 30-minutes to drive to work; 1 hr or more via public transportation
  • rudeness: unspecific to Boston, large cities have enough people that there often exists at least a few really rude people in any large crowd, and that such rudeness has a platform for many to see.  unfortunately, i was a direct or indirect audience participant a few times.  oh, and driving in my car is like front-row seats for the show.  related, i'm convinced taxis have no brakes or turn signals.  oddly, they use the horn as a substitute.
I'm packin up and moving out in 1.5 weeks.  Bye bye, Boston!

Friday, June 29, 2012

The Great Safari - Day 1 (From Nairobi to Maasai Mara)

Last year, I went by myself on an African safari for 2 weeks with Good Earth Tours, Inc.  I'm finally going through the video.

Here is day 1 (please watch in 1080p):

Saturday, May 19, 2012

Panorama of Boston from the sky!

Okay, not quite "the sky," but I took a 24-shot panorama from Boston's Prudential Tower's Sky Walk, which is on the 50th floor.

Here is the picture at 3 different sizes:

1. Tiny (600 x 385 pixels wide):



2. Medium (6,000 x 3,853 pixels): click here for the picture (23 mbs)

3. Huge/Full-size (13,312 x 8549 pixels): click here for the picture (87 mbs)


The green area is the Boston Common (Park) and Public Garden.  My apartment is to the left of it, in the dark area (but before you see bright lights again).  You'll also notice:

  • The capital at the edge of the Boston Common (green area)
  • Hancock Tower (the big building in the center)
  • Highway 90
  • Highway 93
  • The Hatch Shell (at the very left side)
  • An airplane taking off

Monday, April 23, 2012

Bringing back the fruit smoothies!

For the past 3 years, every morning I make & eat two of the following:

  • 2 scrambled eggs with deli meat and sprinkled cheese
  • oatmeal with walnuts, cranberries, cinnamon, splenda, with applesauce mixed in
  • cereal (optionally with yogurt or banana as another side item)
  • 1.25 liter fruit smoothie (during Spring and Summer only)
Spring is now here!  So, once again, the produce at my local farmer's market is now better and more plentiful.

My typical smoothies fill my 1.25 liter blender (42 oz) and are comprised of ~6 of the following items, which I try to change up each time:
  • ~7 strawberries
  • banana
  • mango
  • kiwi
  • blueberries
  • apple
  • frozen raspberries
  • milk
  • vanilla or strawberry protein (casein or whey)
  • oats
  • chobani or oikos yogurt (usually strawberry, vanilla, or blueberry)
  • chopped ice
Here's a sample of one in the making:

From above:

Finished product makes 32oz - 42oz:

Each spring/summer, I try to improve over the previous year's by perfecting the combinations of fruit so that it tastes just right.  It's nothing amazing, but pretty tasty :-)

Thursday, April 19, 2012

Boston Marathon 2012

A friend of a mine from UCLA (we were grad school classmates), flew to Boston this past weekend to run the Boston Marathon.

I made a video, documenting his pre- and post-race:





Even though my viewing spot at the 26 mile mark (.2 miles from the finish line), it's essentially impossible to get decent footage of the actual race unless you have a press pass -- you can only see runners pass by you.

Monday, February 20, 2012

Producing Ultra-Sharp Images

A few months ago, I bought a Zeiss 50mm f/2.0 Makro-Planar T* ZE Lens. This lens is hailed as one of the sharpest lenses in the world, and it's strictly a manual focus lens (no automatic focus).

Over the past year or so, I've taken 1,000+ pics of the jewelry that Sheley makes and sells. It's a learning experience, but clearly it's desirable to take pics that are incredibly clear and sharp.

So, with my new lens, and my side-hobby task of taking pics for Sheley, I was lead to the quest to produce what I'll call "ultra-sharp" images. I use this technique whenever I can; not just for jewelry photos.

My approach is to:
  • use a really sturdy tripod (my Benro A-1690)
  • use my manual focus Zeiss 50mm lens
  • I replaced my camera's internal focusing screen with the Eg-s screen, which assists my vision through the viewfinder by making the in-focus area appear very crisp and everything else really blurry
  • use the LCD screen at 10x magnification to view the subject, to help focus
  • use a remote shutter release (or put it on a 2-second timer) so that my pressing the shutter button doesn't shake the camera at all
Basically, it's an exciting process and requires much deliberation, patience, and carefulness for each shot. It's the closest I'll ever come to performing surgery.

Sample 1 -- The Penny


The viewfinder is so sensitive that moving the camera's focusing ring the slightest amount I possibly can is the difference between "In God We Trust" being in focus versus "2010" being in focus.

Sample 2 -- Boston Skyline 1/2 mile away


Notice how you can see each window with at least some detail. Pretty crazy considering the windows are half a mile away.

Sample 3 -- huge panorama of Boston from .8 miles away


Sample 4 -- Sheley's Jewelry

Unfortunately, images displayed on the web are rarely greater than 900 pixels in length, and are compressed greatly; thus, the increase in sharpness may often not even be discernible for images posted to the web. Oh well, it's been really fun for me to discover how to push my camera and lens to their limits.

In the meantime, I've become a huge fan of Zeiss, and I can easily understand why they're considered a world leader and pioneer for producing world-class optical equipment, from medical lenses, microscopes, camera lenses, etc.

Tuesday, January 17, 2012

Oatmeal Butterscotch Chocolate Chip Cookies!

Sheley's made some great recipes lately, including an amazing Mexican chicken dish. Plus, she's been eating super healthy vegetable dishes. Okay, with that disclaimer aside, I can now present the less-healthy, but incredibly delicious dessert that she made, of which I have happily been the primary consumer:

Oatmeal Butterscotch Chocolate Chip Cookies!

Here are some pics I took of them:






Saturday, January 14, 2012

The Longest Grocery Store Lines Ever

Instead of my normal grocery shopping at Costco, I sometimes still go to Market Basket (aka Home of Chaos) for their super good deals. Market Basket's parking lot is insane, as it can take 10 minutes to get a parking spot. Yet, it's just a warm-up/sample of the hectic crowd inside.

Today I witnessed the craziness checkout lines I've ever witnessed. All ~10 check-out lines were so long that they bent in all directions and fed all the way into the aisles!

Every single person in this pile up is actually in a check-out line:

As mentioned, some lines extended far into the nearby, incredibly healthy aisles, as shown:

Tuesday, January 10, 2012

Yummy Oatmeal Cranberry Walnut Mini-Muffins

Sheley and I cook daily, but usually we don't venture too far from our norm. I always cook breakfast, and usually she or I cook dinner ~5-6 nights a week. But, we're attempting to cook more special, tasty recipes and just ad-hoc, fun items.

This weekend, Sheley spontaneously cooked some very tasty oatmeal cranberry walnut mini-muffins, topped w/ pineapple!


Not unrelated, I just bought a 10-lb bag of oats from Costco. So, I'll be making oatmeal/cranberry/walnut/splenda/cinnamon as half of my breakfast fairly often.

Monday, January 2, 2012

Re-Designing New Year Resolutions: No Deadlines, Only Startlines*

At the beginning of 2011, I made a huge spreadsheet of all of the goals I wanted to accomplish throughout the year, which spanned multiple categories: work/research, playing guitar, painting, photography, weight lifting, jogging, recreational reading, cooking, etc. I detailed concrete, quarterly 3-month goals for every single category. Yet, I still failed miserably.

As we all know, it's very easy to put things off. However, I thought that defining objective deadlines for all of my tasks would help keep me regimented. Sure, I was pretty disciplined in some of the categories, but in some categories I essentially did nothing at all. Why is this, and how did it happen?

The main reason is that other, more pressing matters took higher precedence throughout the year, allowing me to completely neglect some categories.

For example, if something at work starts to consume all of my attention, I often put off doing everything else. I feel this is true for most people. We are good at accomplishing deadlines within our career. Why is that? We need to mimic that for all of our deadlines. I believe most people are good at meeting career deadlines because:
  1. we all work towards the deadline very often (~daily)
  2. we take it seriously (we don't want to be jobless or homeless)
  3. we are ideally passionate about the career work
All of these items help, but I believe the biggest one that separates goals of mine that were accomplished from those that were not is #1; when I look at my failed resolutions, the failed categories are ones that I never got momentum in -- the start was flaky at best.

There will always be some unforeseen task that comes up which I bump up to priority #1. And, if I have ~8 main categories that I'm trying to all work towards through the year, it will likely be the case that at least 3 of them will never be touched because of these unforeseen, pressing deadlines related to work/family/other goals. This leads me to think that setting deadlines is not necessarily ideal.

Sure, it's good to have objective marks signifying where you'd like to be, but even setting more regimented, smaller time-scaled deadlines isn't sufficient.

Personally, I always have some to-do list that I'm often working on. I got into this habit since I was just a little kid, my mom tells me. In recent years, my to-do list often spans a few days or a week. Even with this, I find myself often not getting around to at least 1-3 of say 10-15 items each time. Those items are typically not essential, so they sadly get pushed off and never done.

My point is, even a 5-day list of deadlines proves to be difficult enough to follow, so of course there's no way I/we can 100% fulfill a more grand, all-encompassing schedule of deadlines that span an entire year. List of deadlines, even if they are only span a week, will leave me short, as some items never get started.

So, let's not plot everything with respect to the end and the deadlines, even if they have intermediate deadlines. Rather, let's make startlines. Let's list the days on which we'll start things, and this takes highest priority over everything. In fact, when unforeseen pressing matters come up, let's then force these annoying deadlines to work around our pre-detailed startlines.

For example, say some art show is coming up, and I desperately want to edit, print, and mat a bunch of new photos that I had just taken a few days ago. In this very real example, I often put all other recreational activities behind in order to urgently get this done. Instead, I should keep in mind the big picture, relax my requirements for the photography art show (realizing that it's okay to not have the latest photos), and force myself to revolve my schedule around any previously schedule startlines. If I had previously listed that I will devote 2 hours to trying to learn to play guitar on Wednesday, and the pressing art show happened to be on Friday, well, I should still pick up the guitar on Wednesday.

I'm starting this approach for 2012. We'll see if it serves me well.

In short, let's try to list the actual days on which we'll start and do things, not far-away deadlines by which everything will magically be done.

Along the same lines, maybe I shouldn't think of any my goals in terms of long-term end results; maybe I should define my goals in terms of sheer investment.

To illustrate, well, I'll pick one of my goals which is highly quantifying, tempting to view in terms of long-term end results, and one that is amongst my least embarrassing (one which I haven't been too slack and delinquent): weight-lifting.

One of my weight-lifting goals concerns my body weight and my max 1-rep bench press. I currently weigh 147 lbs and my max bench press is 225 lb. My 2011 goal was to get back to my prime: weigh 156 lbs and bench press 240 lb. I would like to reach this in 2012, too. I know what it takes to get back to this condition (going hardcore on particular exercises, working out 5 times a week, proper nutrition, etc). So, instead of defining my success in terms of some boolean 1-point check of reaching the goal or not, I should make my goal to be the appropriate, necessary investment that's required to meet that goal.

Specifically, my goal should not be:
  • By March 30: weigh 150 and bench 228.
  • By June 30: weigh 152 and bench 235.
  • By September 30: weigh 155 and bench 238.
  • By December 30: weigh 156 and bench 240.
Instead, maybe it should be:
  • In January, continue to go to the gym at least 3 times a week
  • In February, increase to a consistent 4 times a week (17 times total).
  • In March, increase to 20 times total.
Similarly, I could define specific workout goals in terms of the necessary investment. For example, "do chest & back workouts 2 times a week." As long as I do this, who cares if I EXACTLY meet some particular bench press weight goal such as benching 240 lbs or not? If I follow this investment schedule, I know I'll be close to my desired results. If I'm a few pounds under or over, so be it. I should be happy with my amount of effort and how much time I dedicate to this hobby that I love and enjoy. That's the most important thing.

Along the same lines, I shouldn't make it a goal to "learn how to play a guitar song by February 1," but "spend 2 hours per week learning to play guitar." You get the idea.

I like this approach. Any thoughts?

* Yea, Startlines sounds cheesy, but I had to call it something.