Thursday, October 20, 2011

Probability of winning the World Series

I thought I'd calculate the probability of winning the world series since I'm taking a 4000 level statistics class, and I have that kind of time. Using the negative binomial distribution, X ~ NB(r,p), where r is the number of successes you need and p is the probability of success on each individual try, you can determine the probability of any team winning a odd-numbered finite series of games. The negative binomial distribution is used, because it guarantees a success (win) on the very last try.

The negative binomial distribution uses the formula: x-1Cr-1pr(1-p)x-r where x is the total number of games played.

We always hear from sports anchors about the chance of winning a game series after you win game 1, and most of them use past real-world data to say that a team has x percent chance of winning the series when they have a 1-0 lead. Let's remember that chance is not the same a probability, as chance uses some subjectivity and past real-world results to determine its numbers, whereas probability uses pure mathematics to obtain a solution.

Obviously the probability of either team winning when the series is at 0-0 (or tied at any point) is 50%. This is true even using the negative binomial distribution. But, now that the Cardinals have a 1-0 lead the probability of them winning the World Series is 65.625%. This is calculated using p = 0.5 (50% - equal probability of either team winning), and does not use any real-world subjectivity such as momentum, home-field advantage, player match-ups, etc.

UPDATE: Now that the Rangers have won game 2, tying the series at 1-1, the probability of either team winning the series goes back to 50%.

You can play with the probability of winning a series below. Have fun!

Probability of winning a series

This is a game series.

has/have won games.

has/have won games.

    

Monday, June 6, 2011

A Reflection of Weinergate

Today Congressman Anthony Weiner came forward and admitted that it was indeed him that sent the photo in question of himself. During a press conference he seemed contrite in apologizing, admitting that he did it and explained that he panicked after tweeting the photo and claimed that is was a hacker because it was easy, and stuck with the lie for a whole week.

One of the things I must do in the field I work in is that I have to consider all possible scenarios based on all the facts received before coming to a conclusion. Doing otherwise can lead to a disaster, since we work with attorneys who work civil cases all day long. In my previous post I stated that I believed that the work was that of one of his staffers. That belief was based on what I knew about the incident (which wasn’t everything). I actually tried to take a personal, political, and information security perspective on this story, and combine the three, which is why I came to the conclusion I did. Perhaps next time – keep it simple. The more you know, however, the easier the conclusion becomes, but since this story had new twists and turns later on, it became a lot less clear what was happening. Despite the fact that I missed the subject of the incident (Congressman Weiner) the timeline seems to be spot on.

Many women I know say they have personal experience with getting private messages or emails of someone’s private parts from men including older men and even married men. From their point of view, it was easy to come to the conclusion that Congressman Weiner pulled this prank. I, for one, do not do this and never will. I was raised far better than that, and therefore, I will never fully comprehend the thought process of sending a picture of your penis, especially unsolicited, to a random female. “Men” do not do this. Trashy men do this. Sleazy men do this, but there are men out there that do indeed have a high sense of discretion and realize that this isn’t a good idea before it’s too late. That is another reason why this boggles my mind.

I only feel marginally sorry for Congressman Weiner. As a teenager in middle school and high school, I’m sure he was picked on unmercifully solely because of his last name. I can certainly empathize with him because I too have a last name that is the butt of many sexual innuendos and other jokes, and I had to deal with that too. I would try to avoid people who did that and/or ignore those jokes; however, that is quite difficult to manage when you also play on the football and baseball team.

However, the Congressman, in this case, brought this on himself. That’s why I only feel “marginally” sorry for him. He’s a sitting Congressman and a recently married man, and he should’ve known better. However, some people think they either will not get caught or think they are above the rules. Congressman Weiner may be sorry he did this, but given the new details that keep emerging, he seems to have a pattern of this behavior. I tend to believe that he’s sorrier he was caught, especially since he refused to resign.

One last thing I want to say regarding the politics of this manner. Former Congressman Chris Lee resigned almost immediately when it was revealed that he had a shirtless picture of himself on Craigslist. In the wake of Weinergate, it’s clear that Democrats will refuse to resign, regardless of their actions. All you have to do is look at Charlie Rangel and Anthony Weiner for visual aids. Therefore, if you’re a Republican and you get a tip that a scandal is brewing about you, don’t resign. Instead, just change your party affiliation to Democrat until the scandal blows over, and then change back to a Republican.

Just once, I’d like to see how that plays out.

Thursday, June 2, 2011

Weinergate: So What Really Happened?

OK, I have finally decided to start a blog. I have been thinking about doing this for some time, but had put it off, because I was in school, or just busy, or… something. In other words, I’m a procrastinator with poor excuses.

In the wake of a Congressional scandal that is now being referred to as Weinergate, I finally decided to get down and start this blog because I have been watching this scandal for days and there are far too many people out there on both the left and the right whose take on this story is purely based on partisan politics. I know this because my tweeting over Weinergate has led to me being called a shill for both Andrew Breitbart and the Daily Kos. Recently, I started a new job working e-Discovery projects for a digital forensics firm in Tulsa, Oklahoma, and I wanted to take this opportunity to use my better than average though not expert knowledge to give an analysis on what I believe really happened. First, let’s review some facts in case you missed this story:

On Friday evening, May 27, 2011, a tweet containing a link to a photo was sent to a woman in her early 20’s via Congressman Anthony Weiner’s verified Twitter account. The photo, which was on the Congressman’s yFrog account, contains the underwear region of a man with his penis, which is clearly visible inside the underwear. I happened to be on Twitter when this whole mess started. In fact when the tweets about it started in my timeline, I assumed that this was a few hours old and had that “building steam” status once it got to me. It turned out that I was wrong that this was something that was breaking news.

Breitbart’s BigJournalism.com was the first to break this story that evening, immediately inciting accusations that Breitbart was deliberately trying to make news instead of merely reporting a story. On Saturday the Congressman swore that his account had been hacked. A day later he then told reporters that this was a “prank.” A defiant Weiner has since been asked for several days if he wishes to launch an investigation, and has given press conferences to continue to give the media answers to questions that aren’t really answers at all. These answers have included comparing an alleged breach of a Twitter account to throwing a pie, and calling one Capitol Hill reporter a jackass. Finally, after figuring out what to say to the media, he said that he was going to hire people to conduct a private investigation and then have the FBI pursue criminal charges later if need be. Make no mistake if you know me, either in real life or on social media, you know that I’d like to see Congressman Weiner out of Congress. This guy loves to go on news outlets and show everyone who he answers to, which is neither the media, the constituents he represents, nor the rest of the American people. Congressman Weiner is a d… well… I think you get the picture.

There are three scenarios that are possible. The first possible scenario is that Congressman Weiner is telling the truth. But if his account was truly hacked, why has he not called for a criminal investigation? While refusing to report a crime is not a crime in and of itself, Weiner, as a member of Congress, does have an obligation to the American public to set an example when it comes to cyber-security. Let’s also not forget that impersonating a Congressman is a felony, only adding to the alleged hacker’s woes. Most people whose information is compromised do things to make sure that it does not happen again. This includes changing passwords and removing access to extra accounts that may be linked to the main account. The only way that a hacker can do what is alleged by Congressman Weiner, is by either guessing a password or using some kind of password cracking software to get into his account. Multiple attempts to log in to any account would tip off Twitter that there is potentially a hacker involved and they would likely temporarily revoke access to the account.  And the vast majority of hackers, once they have hacked a system or account, immediately change the password(s) to those systems. If that happens then Weiner has no access to his account. However, Weiner was able to tweet almost immediately while this little saga was unfolding. And where is Twitter in this? Nobody is aware of the Congressman notifying Twitter of his account being hacked, and Twitter has said nothing about the security of their system in general. And if the account was actually hacked on a Verified account, then the “Verified” status, if it exists, is removed until it is proven that the actual account holder has regained control of the account, which never happened. Quite frankly, a hack just doesn’t pass the smell test.

The second possible scenario is that the Weiner did it. (Yes, I went there.) This does make some sense at first, since he has not filed an FBI investigation. If the investigation reveals that he really did do it, then he’s hit with a whole bigger scandal than the one he’s got now. Filing a false police report is also a crime that can lead to jail time, and surely his ouster from the House of Representatives. But as arrogant and brazen as Congressman Weiner is, this guy is not stupid. He wants to spend as much time as he can working in the government in some position of power and prestige, and delving into the Internet to gather information about someone is becoming much easier every day. Why would he use Twitter to follow a woman he’s never met (as he claims), who is half his age and lives in Seattle, a city all the way across the country? Unless she worked for the Congressman or is having a romantic affair with him, I just don’t see it. If he actually knows this woman, then the exchange of a picture like this would have likely been sent over email. And if she is having a romantic affair with Weiner, then he wouldn’t need to take a picture of himself and send it to her anyway. I’m not saying this scenario is impossible; I’m saying it’s improbable. Unfortunately, too many people on the right believe that the Congressman did this because they want to believe it. It’s juicy; it’s a Democrat; it could lead to his office being vacated; case closed. However, Weiner is smart enough to know he cannot afford to do something that might cause him enough embarrassment to force him to resign or be removed from office and never be elected anywhere else again.

The third scenario is that someone with authorized access to the Congressman’s account (perhaps one of his staffers) tweeted the photo. As this story has evolved, this actually makes the most sense, both politically and from an IT/Security perspective. We all know by now that most congressmen do not actually tweet all the time from their accounts, but rather have a staffer do it part-time for them. And I have met a congressional staffer or two in my life and most of the male staffers are pretty immature and think something like this is funny. We also remember from a couple of weeks ago that someone at the US Department of Justice sent a tweet about Fox News from the DoJ Twitter account by accident, when he meant to send it from his personal account. That person’s access to the account was removed. It is certainly plausible that this happened again, this time with a staffer. With all of the different applications out there that let you log in to multiple accounts, this is quite easy anymore. It makes for great convenience, but because of that, it also makes for a security nightmare. This could also explain why the Congressman is following such a young woman he doesn’t know. Someone else could be clicking that follow button for him without his knowledge or consent.

So what really happened? People do really stupid things with their own accounts on the Internet. Why would they suddenly wise up when it comes to the accounts of others? It is my belief that a congressional staffer to Congressman Weiner, using his social media accounts at his authorization, had used his own smartphone and logged into Congressman Weiner’s account earlier in the day to tweet on behalf of Weiner, and forgot later to log out of his account. He then unintentionally posts the picture in question on the Congressman’s yFrog account and then tweets the photo to this woman in Seattle from Weiner’s Twitter. He then realizes he has screwed up and tries to cover it up by deleting the tweet and the picture before anyone could see it, but the damage had already been done. Others had already retweeted the link to the deleted photo. So, to try to fade the heat, the staffer decided to write that the Congressman’s Facebook account had been hacked in order to set up the narrative later for the hack of Weiner’s Twitter account. He then deletes all of the pictures in Congressman Weiner’s yFrog account to make it look like a hacker did it, and refuses to fess up to the mistake he made. The next day the Congressman, after being notified of what happened, understandably, took a knee-jerk reaction to the news, and said that his Twitter account had been hacked. He goes on a media blitz to continue to create a mystery around this story. He also announces he has called for a private investigation, instead of an FBI investigation. I believe that Congressman Weiner has a pretty good idea of what happened, but he does not want to admit to the media what happened because he would then admit he was wrong in his original statement that a hacker caused this. And besides he cannot prove anything at this point. I believe that if a private investigation is really held, it ought to include a digital forensic analysis of all computers and smartphones that belong to Congressman Weiner and his employees. However, the announcement that he is hiring people to investigate this privately has now bought him quite a bit of time. If my analysis is accurate, when the investigation concludes it will get buried underneath the headlines for that day, and Congressman Weiner will go about his business as if nothing ever happened.


This should serve as a lesson to everyone on the Internet and especially all those in Congress. DO NOT give someone else access to ANY account for ANY reason. You’re asking for more trouble than you are prepared to handle.