Monday, January 26, 2015

The basic logic of Non-linear Modeling: Binary Outcomes

Non-linear regression is very similar in spirit to linear regression and the general linear model. In this situation we are dealing with binary linear outcome, and we are going to have to end up modeling it on a transformative, non-linear scale. So what that means is we will start with something that is measured as a yes or no, one or zero, and then transform it to a probability. And the thing we're going to estimate is a linear function of our predictors, transformed into a non-linear outcome. Might sound a bit confusing, but just hang in there.

Regression with continuous dependent variables

Lets say you're all of a sudden interested in the attendance to baseball games. You want to understand what affects the level of attendance to baseball games, lets call it ATTEND (in thousands of people), and you believe that a current wins in the season have a say in how the level of attendance to the baseball games look. In other words, you believe there is a linear relationship between attendance to a baseball team's games and the wins they have in a season. This is called a linear model, and in that case, we can notate the model like this:


or simply...

Based off this linear relationship, estimating this model is fairly easy. You can observe the relationship between the two using methods of summary statistics, like scatter plots, and based on the apparent upward trend in the plot points, you may infer that there is a positive relationship between the X and Y variables, probably leaving you with the question of how strong and significant the magnitude of this relationship is.

With this particular example, you're bound to receive regression estimates that confirm the positive relationship between the two variables.
 Dependent variable: ATTEND

              coefficient    std. error   t-ratio   p-value
  -----------------------------------------------------------
  const        −1340.92      387.127      −3.464    0.0009    ***
  CURNTWIN      38.6325      4.74786       8.137    6.02e-012 ***
And when you interpret the magnitude of the coefficients, you can conclude that for every unit increase in CURNTWIN, ATTEND sees an increase by 38.6325. In laymen's terms, for every additional win a baseball team has, their stadiums are expected to experience an increase in attendance by about approximately 38 to 39 people.
OLS models are very popular approaches to regression analysis, and in these models we're dealing with dependent variables that have continuous values.

Regression with Dichotomous Dependent variables

Lets change that up and assume that instead of baseball wins and attendances, you want to find out the probability that a person attends college given the percentage level of their parental wage. We can just write that as...


 or simply...

We're going to move away from the linear combination of the independent variables (LCIV) because they actually give off nonsensical results. For instance, a regression equation with a continuous variable like income can provide useful information when you generate graphs, like a scatter plot, but with dichotomous variable as Y, we get something where all the plot points are scattered to either one value or the another, like this:

The points are bounded to either 0 or 1, which makes a lot of sense (if you're familiar with dummy variables) because 0 and 1 represent outcomes (0 ="didn't attend college" ; 1 = "attended college").

So the rectification is to take a non-linear transformation of the linear combination of independent variables, looking like this:


The properties we expect function F to have reflect the discrete outcomes of interest (as related to qualitative variables). In that role, function F is expected to output 0 as the linear combination of independent variables tend towards negative infinity, and F is expected to output 1 as the LCIVs tend towards positive infinity. That's just a mathematical way of stating this hypothetical point, that as we see a continual increase (or decrease) in the value(s) we get from the LCIVs, we should also gradually expect the outcome of interest (Y) to be a likely occurrence (or likely nonoccurrence). 

The corresponding math notations usually looks like this:

F(-∞) = 0
F(+∞) = 1

and thus, this transformation of the independent variables means that our probability belongs in the range of 0 and 1, or...

In context, lets assume that we see the value for X as very high, indicating high parental income; in that case, then we can assume that the probability of a person going to college is virtually 1, or very likely to happen.

Conclusions

The basic logic of logit and probit modeling is grounded on this reasoning, and will often give similar results in their estimations. Instead of trying to see the effects of the X var(s) on the continuous Y variable, like the effects of income on overall consumption, you're trying to see the how the X var(s) influences the probability that dichotomous Y variable will occur; in other words, the likelihood of outcomes.

It should be understood and reminded that yes, we can expect a higher or lower probability of an event occurring but that does not mean it will indeed happen or not. The ultimate outcome can most definitely go the other way. 

Note: Regression equations always include error terms, which were purposely excluded in this post. Just know that you are to always include the error term when conducting analyses for academic or professional work.


Sources:

Heavily borrowed and influenced from:

Read More »

Friday, January 9, 2015

Visualizing the Middle East

A neat interactive graphic by Information is Beautiful depicts the network relationships among the key players in the Middle East (click on the picture to see it).

Notes:
  • The amount of Sunni to Shia groups is astounding. The world simply thinks about the Muslim community as just one community, but the sectarian divides are serious among the Middle Eastern Sunni and Shia groups. Although I was aware of the sectarian divide, I dont think it was until ISIS's rise in 2014 that I began to see just how serious it can get between differing Muslim groups.
  • ISIS hates...everyone? I didn't really see that coming. I knew ISIS was infamous, but I didn't think they practically had enemies all around them. Maybe this doesnt mean too much, being that al Qaeda, the group it spawned from, has way more negative connections. However, AQ has way more years of existence and picked up more negative relationships over time. 
  • 'STATE OF PALESTINE": I know there are many of those out there who have sympathies for what happened to the Palestinian people as Israel grew and probably want to use the term Palestinian state as a way to recognize its existence, but its just not correct. Palestine is NOT a recognized state, and never was. If it was, then the modern day Israel probably wouldn't have existed.
Read More »

Sunday, January 4, 2015

8 ways a college gap year can benefit you


When I graduated college, I decided to take a gap year from school. It’s not because I was tired of school: in fact, I usually looked forward to attending college. I thought a year off would just help me get time to take the GREs, and maybe I could get a job in the meanwhile.

But what took me a while to realize is that taking a gap year actually helped me grow in other ways I never thought I would, or could. So here’s a few things to think about: 8 ways a college gap year can benefit you.

1. A chance to see things on the other side.

If you're taking a gap year after 18 or so years of formal education you will begin to realize that life is different on the other side. The fall and spring semesters, after going through so much routine, will be filled with a lot of void, and its weird. All of your other friends will continue with their studies and you're not. Sometimes you may get distanced from other friends, as your interests end up differing.

This may not seem beneficial but best believe it is. When we are in school, we tend to misunderstand what many call the "real world" because many of us haven't experienced it just as yet. The reality is, unless you're working at school institution right after you graduate, you're not going to be in school for very long, and the school norms you are so used to are not the same as business norms you will have to learn about. It just puts you in perspective.

2. Opportunity to enjoy leisure

While you're on that gap year you might as well have fun with the free time you have. Its most likely a top 3 reason why you're taking the gap year, so why not catch up on your favorite books and TV shows, discover new music, or go on vacation? Chances are you will need it, but we know you will enjoy it, and you probably won't get a chance like that for a long time once you return to formal education.

3. Saving money

I don't know about you, but I'm pretty happy that I don't have to worry about taking out $20,000 in loans just to pay for another years' worth of education. This is especially so if I don't like the direction I'm going with my current major. So while I'm off, I might as well take the time assess whether it will be worth the extra money to continue down this path.

4. Time to learn and grow / Self-assessment

This is quite important because it gives you the chance to learn more about yourself. You learn more about your passions, learn more about what you like, and what you dislike. You think about things you've done in the past and whether you would like to continue doing it in the future. You also get to think about what you could have learned to do better and what you can do to improve yourself in what ever area you want to improve in. Depending on that area, you might be motivated to return to college.

5. Skills-assessment

I know this is closely tied to the previous point, but I find this one huge enough to stand on its own.

Before you apply for a job, it is important to distinguish between the skills you have and the skills you need to attain. When you’re going through a gap-year, sometimes you may apply for jobs you want and realize you’re not qualified. So you see that, and it can be discouraging for you because you don’t have the skills, or it can be encouraging for you to learn what you need to know before you apply for jobs like that in the future. Some skills can be attained during your gap year through outlets not labeled formal education, but there are skills that you will realize can be best attained and practiced if you were in college. It just adds to your motivation and gives you a focus to seek out those sources where you can properly learn the desired skill(s).

6. Self-fulfillment

A gap year is a chance for you to take a breath and do something that you want to do.

Take on a volunteer project or a personal project. Give yourself a chance to go through some growing pains that you really find worth the trouble; its more rewarding that way. Maybe you can spend time building and writing a blog. Maybe you want to learn new things through some massive online open courses (MOOCs), like code or maybe a new language. Maybe you want to do some research on topics that interest you, or maybe you want to join and volunteer for a cause. What ever it is you want to do that can give you a real sense of personal achievement, a gap year is a special time to get those done.


7. A chance to develop professionally

A gap year also gives you a chance to explore careers and increase your work experience, through paid employment or voluntary work. It helps you develop your professional networks, improves your skillset, and it gives you some experience to put on the resume.

It will look very good on a resume and it shows that you've been busy during your time off. Things like this are very notable to future employers and colleges.

8. A better focus when you return

During your gap year, once you find that crossover between your interests and you think you can pursue you begin to understand more specifically what you want out of college (other than that diploma). Whether its of the undergraduate, graduate or post-graduate kind, you never want to leave feeling that you graduated with a useless degree. That very feeling can be a reason for pursuing a gap year in the first place. Maybe there was some kind of skill that you would find very useful that you failed to pick up as an undergrad or your previous years of schooling. The gap year will give you the time to think about topics such as your pursuit intentions and the channels that can help you with that pursuit, which may help you realize which college you should really attend.

Conclusion

If or when you decide to take a gap year, remember that it can indeed be a welcome break, but it can also be frustrating. It may be a way to regroup and recharge your battery or a way to explore your life in ways that you never had time to before. However, you can also end up zoned out in front of the TV watching reruns or steamed up behind a computer wasting your life away, if you have lofty plans for the gap year. I can't stress enough just how easy it is to end up in the latter.
Read More »

Tuesday, December 30, 2014

Kings Theatre in Brooklyn Set to Reopen

An estimated $95 million is being invested to bring back a long time Brooklyn gem. The Kings Theater, a hot attraction in the 1920s, is being being re-opened sometime in February 2015. The former Loews movie theater is now finding a new use as a performing arts center in hopes to stimulate development in its neighborhood. 

Located at 1027 Flatbush avenue Brooklyn, NY the theater would bring a much needed boost to the community as it provides opportunities for kids to stray away from bad alternative life decisions and it provides potential for tourist attractions, which may stimulate the small businesses in the area, or re-locate them assuming bigger companies get involved. 

Former Brooklyn borough President, Marty Markowitz, expects people will love how they renovated the inside. He believes that this theater will be "Brooklyn's Beacon and Apollo theater in one". Speaking of Apollo theater, Diana Ross would be performing in February, too (Feb 3 to be precise).

Buy or Sell?

Being a child of Brooklyn, I have walked past the theater a few times in my life and I can say I most definitely didn't think much of it, but I know I wasn't a fan of abandoned areas. It was dead, like a lot of other attractions in NY. It was almost too commonplace in Brooklyn, and I'm certain I'm not alone on this, especially many years ago (just look at Williamsburg at the turn of the century). Its good to see a resurgence in investments with the theater and within the community; I buy it. I just hope it doesn't lead to more people being crowded out of their neighborhoods as it may attract wealthier people to the area.
Read More »

Thursday, December 25, 2014

29 breathtaking photographs of the human race

There was a post I came across featuring almost 30 photos of people around the world (or at least, people in the Middle East and Asia region). The photos were stunning, depicting humanity's struggles, pride and pain. I liked them so much, I decided to take all of these photos and made a mosaic out of them (using the EasyMoza web app). 

I realize now maybe I shouldn't have used so much, but I think it's still pretty neat. 


Read More »

Monday, December 22, 2014

My frustrations with law enforcement and society encapsulated in one Jon Stewart quote


Read More »

How Sony can capitalize after pulling 'The Interview'



I don't fully understand a lot of what's going on behind the scenes at Sony Pictures, but I know things got serious (and I mean really serious) over the past few weeks. Just recently, news dropped that they decided to pull the plug on showing their upcoming movie The Interview, starring James Franco (@JamesFrancoTV) and Seth Rogen (@Sethrogen). The reason is tied to what the movie is about and threats of terrorist activity. From those threats, the movie theaters backed out, and from there Sony ultimately backed out too.

But instead of getting into what the movie is about, you can just read the synopsis here while I get to the delicious economic opportunity that Sony Pictures has in front of them!

What we know




Just a few weeks back, news broke that Sony Pictures had been hacked by a group of hackers instructed by the North Korean government (or at least that's what we think), leaking important documents, e-mails, salaries, etc. What was leaked ended up circulating the web and was a cause for a wide variety of serious discussion, but whether you believe the media had a right to circulate it or not, the damage was already done.

The company is left dealing with a PR nightmare along with capital-related setbacks, adjusting their fixed and variable costs by replacing hardware and hiring personnel to help them fix their net security issue. On top of that, their workers are filing lawsuits, charging the company with failing to protect their privacy. And all of this happened prior to canceling the release of The Interview. Talk about adding salt to the wound.

Why Sony is able to capitalize: scarcity and national identity

But if you were to ask me if I thought they can bounce back from all this, I would give you an enthusiastic yes, and the reason boils down to narrative, value and scarcity. Usually, economic value is measured by the most someone is willing to give up in other goods and services in order to obtain a good, service, or state of the world. In the movie business, with a fixed price set for movie goers, their value is more or less measured in the amount of visits to the theater.

Despite this financial hit for pulling the movie, Sony can still earn a sizable profit on the interview because the movie has picked up a lot more buzz than was initially created before the scandal. For one, you can think of it hypothetically. After Sony decided not to show it, the movie did all of a sudden became a scarce commodity, which naturally generates more demand for any product. And it helps Sony that the movie is not really circulating online, but this is just ha
lf the point I'm trying to make. Furthermore, you can think about it symbolically, where the hackers (whether under North Korea or not) ended up turning a silly comedy (that I wasn't going to bother watching before all of this) into a must-see movie, at least for Americans.
Following the terrorist threats and the Sony decision, other studios followed suit. According to engaget, Paramount Pictures decided to pull screenings of Team America: World Police (a 10-year film which featured a North Korean dictator as the villain) and film studio New Regency (co-owned by Fox and Warner Bros.) canceled its plans to produce a film adaptation of the graphic novel Pyongyang.

In a country that takes pride in freedom of expression, you can imagine why these series of decisions were frustrating for the average American to see. Even though Sony's move is inherently a smart one when you consider a terrorist threat in the mix, the conventional wisdom sees it as more about a shot to the national narrative and the outcry is, in part, about repairing that identity.

In growing numbers, Americans are expressing their support to have The Interview distributed to the public (however that happens) because watching it became a concern of national identity, and what better better response would their be than to show it as a way to fix uphold that nation identity and stick it to the enemy? This is the audience The Interview has going for it, and Sony would be smart to take ownership of distributing it while its still hard to find online.

Suggestion for Sony: Pull a Beyoncé

There are many different ways Sony can distribute The Interview. While they are weighing their options, I hope one of the considerations is to release it theaters unnounced. Remember back in 2013 when Beyoncé surprised the world when she released her visual album, "Beyoncé", unannounced? That album spent its first three weeks at No. 1 with sold 1.43 million copies sold in just 4 weeks alone. The Interview might not make Guardians of the Galaxy type of money, but the popularity should catapult its revenue intake beyond its expected box office numbers. It would be a shock, and a good one that might find itself within the top 5 or 6 box office movies for a large number of weeks (especially if the movie is a good film). One downside to showing it in theaters is the possibility that a lot of people wont show up because they don't want to take any risks.

On the other hand, the possibility of showing it online is always there too, but there is also the risk of exposing it online leakage, and those who probably wouldn't mind seeing it in theaters have no incentive to bother since they can see it for free.

But in the end, with whatever they want to do, I think they need to do it as soon as possible while the movie is still relevant and there is little competition.

Related links/articles:

Read More »