statistics

A “Minority Report” Monte Carlo simulation in Scala

This article shares the source code for a Monte Carlo simulation that I wrote in Scala. It was inspired by the movie Minority Report, as well as my own experience.

Background

For the purposes of this simulation, imagine that you have three people that are each “right” roughly 80% of the time. For instance, if they take a test with 100 questions, each of the three individuals will get 80 of the questions right, although they may not get the same questions right or wrong. Given these three people, my question to several statisticians was, “If two of the people have the same answer to a given question, what are the odds that they are correct? Furthermore, if all three of them give the same answer to a question, what are the odds that they are right?”

Baseball’s ERA+ stat

I like baseball’s ERA+ stat. It gives you a way to compare completely different eras in a logical way. In technology it’s like saying which feat is better, creating a huge website like Facebook, or creating the first versions of Unix or Mac OS? All of them are great feats of engineering, but the tools available in each generation are so different that there’s no way to compare them, but in baseball the ERA+ stats lets you do exactly that.

Revenue per employee in the computer industry

As I get ready to release my new website on How I Sold My Business, I did some research on revenue per employee, specifically revenue per employee in the computer services industry.

As it turns out, there are all sorts of good information sites on the internet. Probably the most consistent source of information is the Fortune Magazine site, specifically these two links:

A Perl program to determine RSS readers from an Apache access log file

Perl/RSS FAQ: How many RSS subscribers do I have on my website?

Like many other people with a blog or website, I was curious yesterday about how many RSS readers/subscribers the devdaily website has. You can try to get this information in a variety of ways, but the real information is on your server, in your Apache log files.

To figure out how many RSS subscribers your website has, just go through your Apache log file, find all the records that look like this: