Wednesday, May 30, 2007

But How Can I be Sure my Widget is Actually Working?

But How Can I be Sure my Widget is Actually Working?

Welcome to the world of statistics, where we try to convince ourselves and our employers/clients/friends/wives that the projects we have spent hours and hours on are actually worthwhile! We will see by the end of this article just how you can too can demonstrate with reasonable certainty that your very own predictor/estimator/widget is having a positive (or negative effect) on the process it is being applied to.

Yes, we're talking about hypothesis testing!

What hypothesis?

The hypothesis that results from the question about whether our widget has a positive (or negative) effect on the process, of course ! If we want to know whether the widget has a positive or negative effect then we must hypothesize the opposite (that there is no effect, or that the widget and the normal process are the same) and try to prove it wrong! This may sound counter-intuitive but one limiting factor about statistics is that you can't prove a statement true, you can only use it to reject a statement (though your're not disproving it).

For example, for my stock market predicting widget, I want to know how I can be 95% confident in my belief that my estimated prediction accuracy of 57% is not just random chance (luck). If you've ever studied the stock market you've probably heard the cliche about how someone let monkeys pick stocks, or threw darts at a dartboard and the resulting random selection of stocks did better than "such and such" a famous money manager. Well, I don't want to end up being the money manager that gets beat by a monkey, that's for sure!

First, in statistics, we are always estimating parameters. In this case we are only estimating the ability of my stock predictor to make correct stock predictions. Because I can't, or wont, test the predictor on every stock ever I can't know it's true 100% ability to make predictions. But this is where the beauty of mathematical statistics comes in...we don't have to! I can estimate the stock's accuracy on a relatively small number of days within the stock's history and then use the principals of confidence intervals to establish a level of confidence or belief that my predictor is better or at least not eqaul to a random predictor.

Secondly, we want to know something about how we expect the process to function without the help of our widget. For my stock widget, I want to know if my predictor is significantly different than a random predictor, i.e. a monkey throwing a dart at a dart board filled with stock predictions (if monkeys could do that).

So how do we know what our process will do without our widget? Easy! We simply sample the output! Sometimes we can do this theoretically, as in the case of my stock market predictor.

My stock predictor only makes predictions on whether the stock should be bought or sold. I can say that the accuracy of my stock predictor, which comes in the form n correct predictions out of N attempts, looks a lot like a Binomial distribution! Actually, Binomial distributions look a lot like Normal/Gaussian distributions ...otherwise known as the Bell curve. A Binomial distribution can be produced with the following 4 steps:

1.) flip a coin 100 times and write down how many times you got heads - we'll call this a "coin flip trial" with a heads population of "p-heads".

2.) we do 1000 "coin flip trials" - yes it will take a while

3.) after the "coin flip trials" are finished we make a chart and plot each unique value of "p-heads", and the number of times we got each one of the "p-heads".

4.) We stand back and marvel at our new representation of the Binomial Distribution - it should look this.

This is what would happen if I randomly chose whether the stock would go up or down. It would achieve 50% accuracy on average.

If you get an evenly balanced coin you will notice that your most popular choice for "p-head" is 50. You will also notice that most of the values fall within the range 45 and 55.

Now, let's say that the evenly balanced coin is a random stock predictor. It will only predict half of all possible stock moves correctly... i.e. you lose as much as you make over time. But when I run my stock predictor on a random sample of the market it tells me that I got 57% of the predictions correct!. Since this estimated accuracy is only on a small random portion of the market, how do I know that I didn't just get lucky? How do I know I'm not a monkey (this may be an altogether different question :-)?

Going back to my hypothesis, I need to evaluate the claim that (Accuracy_random = Accuracy_mystockwidget). But this is the same as evaluating (0 = Accruacy_mystockwidget - Accuracy_random) Now, we know that the accuracy of the random predictor will be distributed according to the picture above. Incredibly, my stock predictor should actually follow the same pattern, only shifted over to the right slightly. But here's the even more incredible thing, if we subtract the two variables, and plot the results the associated relative frequencies, it will also look like the above!

If the resulting distribution contains 0 in a centered 95% selection of it's values about its mean, then we will be forced to make the satement, "We fail to reject the hypothesis that Theo's stock widget is equal to a random monkey predictor." However, if 0 is not found about this center 95% of the distribution, then I can proudly say that I reject the claim that they are equal in favor of the claim that my predictor is different from a coin-flippining monkey (and I will later go on to say that of course it is much better!). So what do the numbers say? Let's take a look at another sweet chart!

And so we see that from a statistical standpoint, my stock predicting widget is significantly different from a coin-flipping-dart-throwing monkey predictor!

Isn't statistics cool?

note: I haven't yet acheived 57% accuracy yet, so hold your horses and your money until I do :-)

Tuesday, May 29, 2007

This weekend at the Barbecue

This weekend at the Barbecue

I love grilling meat. There's just something very satisfying about meat cooked over an open flame. Perhaps it is my Texan nature. Perhaps it just tastes good.

Whatever the reason, Malia and I ate grilled food twice this weekend...and it sure was good!

On Sunday we had some nice barbecued chicken and grilled asparagus. Grilled asparagus is one of those surprising foods. You never really think it's going to be that good, but it always sort of is. It's not really mind-blowingly good, but just good enough for you to say..."Hmm...that's pretty decent." Furthermore, I think eating asparagus makes you feel morally good, and like a responsible adult. I always think that I'm staving off cancer by eating things like asparagus, broccoli and artichokes.

On Monday, my lovely wife and I decided to have a Memorial day celebration with as many friends that I could think to invite. I couldn't think of everyone though, and unfortunately forgot a few folks. Oh well. If you are reading this and you didn't get to come and eat flame cooked meat with us then I invite you to come over whenever you would like for some good grillin' fun!

In addition to our fare of meat and the requisite potato chips I decided to make some sweet potato fries. They ended up as sweet potato soggy chips, but they were still quite tasty. I found some spices from Chef something-or-other on sale at Albertsons which made my yam-fries quite delicious! If you are interested in making these delicious and nutritious fries just slice up a sweet potato or two, put some salt, pepper and whichever spice you like on them, put them in a baking pan with olive oil and cook them at about 375 F for 20-30 minutes. So delicious!

Fact: Sweet potatoes have more beta Carotene than carrots. Fact: Olive oil is "good for you"...therefore you can use as much of it as you want when you cook. Fact: the previous statement is probably not true.

At Malia's prompting we all played a cool game called celebrity. I wont explain all the rules but it can be played by any number of people and involves the guessing of various famous people or cartoons through word hints and acting as if you are the person or character. I failed miserably at acting out Snoopy. Our friend Barry did a find job at acting out Ronald Reagen however. And I learned from Kevin that St. Thomas Aquinas is also referred to as "The Prince of the Scholastic Philosophers".

Alas, the weekend of glorious barbecuing and fellowship came to an end. Now it's Tuesday and grilling will have to wait until next weekend when we hike into the wilderness and have a real caveman-style barbecue somewhere in the mountains!

Friday, May 25, 2007

A Quasi Philosophical Blog

A Quasi Philosophical Blog

At the request of my brother Arthur this blog entry is going to be long and philosophical in it's essence. Incidentally this blog entry comes not only at the request of my brother Arthur, but also inspired by a 3 part documentary called The Trap by the BBC that he found floating around the Internet. Arthur is an expert at finding quality material on the Internet to stimulate and inspire the mind :-)

These incredible documentaries can be found at:

Google Video - The Trap Part 1

Google Video - The Trap Part 2

Google Video - The Trap Part 3 (note, Part 3 is broken into 3 parts...this link is to part 1 of 3. The other 2 parts are easily accessed from this link.)

More than anything, these documentaries have impressed upon me the notion that philosophy is not an idle academic subject, but a vibrant and nearly living thing. At the very least, the conclusions that we have drawn about the world, the way it works, and it's ultimate purpose have dramatically shaped our government and societal structures. This documentary covers the brief span of history from Post WWII to present regarding socio-political philosophies of the Western world, their consequences and possible future ramifications.

What the film makers saw as they studied the last fifty years of history was something that in philosophy we call Post Modernism. In the film the claim is that after WWII governments, politicians, and the average educated elite began to believe and follow the economic/mathematical theories of the human person as a rational agent in a very large and complicated game. Human beings, the economists and mathematicians theorized, are little more than rational agents acting on behalf of their self interest. Under this "efficient market" theory, human beings will rationally process all publicly available information and make decisions based on that information. The mathematical branch of Game Theory along with some questionable psychology was then used to further "prove" their theories. (See Note: 3)

The economists and government planners then postulated that under efficient market theory, government should step out of the way and let the markets be as efficient as possible. For in this worldview, maximal happiness, and societal equilibrium (i.e. a classless society) must occur when the rational agents are left to their own devices.

Government and a society then are the sum of the many free willed and self-centered agents. More or less we would all become cogs in the machine of humanity...equal cogs...free cogs!

Unfortunately for the brilliant mathematicians and economists (like John Nash who shaped Cold War era government policy, and who was also suffering from paranoid schizophrenia) our country, and certainly not our world, has failed to live up to the democratic-utopian ideal. Furthermore, feelings of alienation and purposelessness seem to have increased (my anecdotal opinion). And unfortunately rather than becoming cogs in the glorious humanity machine, the majority of modern Americans have become cogs in the corporate/consumerist machine (from this fact: we have record amounts of credit card debt mostly because we "need" so many products). The middle and lower classes have not had any real increase in the share of wealth, and thus classes remain as defined as ever (Wikipedia , see note 1). Good health care is still for us relatively wealthy in the world. And the vast amount of technology we have developed has failed to relieve us of a 40 hour work week. We in fact work more than 40 hours a week (Wikipedia)!

And thus we have arrived at our Post Modern, cynical and disillusioned, Prozac-society. We no longer trust government. We no longer really trust each other. We are less educated (graduation from high school rates may be high, but I don't see that as more educated). It seems that we have regressed!

So what went wrong?

To quote my good friend Edward, the major policy shapers of the 20th century started with a false Anthropology.

What are the consequences of holding such a false Anthropology?

In short, the consequences of such a belief can be seen (as the documentary hints at) in the Stalins, Lenins, Mao Tse Tungs and Pol Pots of the world. The massive amount of death and destruction in the 20th century is a result of the philosophical attitude that man is nothing more than machine, and thus just as expendable. The utlimate conclusion of such belief can only be the Nietszchean "Will to Power" in which the Uber Mensche (Super or Powerful Man) wins. Another consequence of the man-as-machine philosophy is purposelessness. As Nietzsche even pointed out, the Uber Mensche is one who realizes the purposelessness of it all, even power and fame, and still has the will to carry on, to pursue power and rulership! Unfortunately, he also saw that the great masses of "weak" (i.e. normal) people would sort of flounder sans meaning. (See Note 2)

There is a progression in the philosophy of the west that I see.

1.) Aristotle, Aquinas - truth can be known by asking enough questions. God is real because of cause and effect (Prime mover). If God is real then we are real, and important, for he created us. Knowing God is real and important. Aquinas' era is the apex of Christian influence in Western Culture

2.) Machiavelli, Hume and Kant - Morality is relevant to your position in life. Cause and effect is not provable. A priori truths (e.g. universal truths) cannot be proven outside of a formal system (Mathematics, formal languages). God is a hypothesis which may not be provable (though they still maintained that He was real).

3.) Nietzsche, Kierkegaard, Darwin- The implications of Kant and Hume are that absolute truths, moralities and God cannot be absolutely known (unless somehow experienced). "God is dead" - Nietzsche. This is also the beginning of the end for Christianity as the major cultural ideology. Evolutionary biology adds that man is in no way unique, just a bi-product of the randomness of our universe. There can be no core essence of man, just a very complex machine composed of neurons and chemicals. (Hitler with his campaign of blood and soil is the perfect embodiment of this philosophy)

4.) Jean Paul Sartre - wrote a book called The Nauseum. He said that life is no better or worse than vomit. Pol Pot loved Sartre. Pol Pot killed millions of his countrymen.

5.) Modern Philosophers/Scientists - since nothing is provable/knowable but Mathematics, then Mathematical Science is the best way to describe our world, even ourselves! Thus the rise of economics in place of socio-political theory.

Because of our massive shift in philosophical understanding of the human person, namely that we are better described by numbers than by adjectives, our society has become what it has become: kind of depressed. The human being in our world has come to believe that he/she doesn't even really exist, except in a possibly material sense. And if we don't really exist, then what the heck is all this for anyhow?

Many many more pages could be filled with the ideas and thoughts of many many more philosophers. But as I stated in the beginning the main thing that I really walked away with from these documentaries is just how effective and powerful ideas and philosophies can be. Our country, and its people, is shaped to a great extent by its understanding of the world, the universe and human nature. A good life and a good country then starts with none other than a correct Anthropology/Philosophy, and that makes it one of the most important subjects to study!

note 1: Furthermore consider that the average household now has 2 income earners, and only makes about 30% more...what a rip off!

note 2: This is my favorite passage of Nietzsche's, this is a summary of it. I love it because it really captures the spirit of the age and the astounding consequences of a society without an immediate and active God.

note 3: a small (or rather large) hitch in that theory is that most markets are demonstrably inefficient...

Monday, May 21, 2007

Credit Card Mathematics

Credit Card Mathematics

As the last couple of mathematically related articles I've written have been kind of useless here is something eminently practical: periodic interest...i.e. the highway robbery of Credit Card companies.

First a brief history about credit cards. Prior to 1978, credit card/revolving loan providers were limited to about 12% interest rates. Most states capped interest rates under "Usury" laws. Usury is the term used by Christianity and Islam to describe the lending of money at an interest rate. It has now come to mean loaning money at rates that are excessive, or loan-sharkish. Only Islam remains steadfast in their commitment to ban the loaning of money at any interest rate. Admirably, at least to me, Muslim bankers prefer to make business loans in which they become a stake holder in the business. This has the advantage of ensuring that the bankers are business partners who are intimately tied into the success of the business and community, not just profiteers. That's pretty cool (and fits into my off-grid idealist perspective).

However in 1978 in Marquette vs. First Omaha National bank the Supreme Court ruled that it was permissible for a nationally chartered bank to "export" their interest rates. Basically, a loan originating in New York no longer had to adhere to a 12% loan. The banks could now charge the maximum interest allowed in the state of origination of the credit card. Delaware and South Dakota had the least amount of usury protection (for the consumer) and thus the major credit cards and lenders relocated their loans to these states. Thus credit card users can now be charged any amount of interest up to about 30%. Furthermore, almost any type of fee can be charged, and have almost no limits to their maximum amount.

Last, laws protecting the consumer from rate variance have significantly changed. For nearly any reason whatsoever, the credit card companies can change the terms of the loan, whenever they want. Imagine if mortgages worked that way...that would be frightening indeed! I wonder who thought that loosening controls on banks was a good idea anyway?

Anyhow, onto the math.

Interest is an easy calculation.

Let P = principal.

Let d = number of days that interest accrues before a payment is made.

Let r = daily periodic rate (an APR of 4% has a corresponding Daily Periodic rate of 4%/365)

Then your balance at the end of the month for a credit card is:

Balance = P*(1+r)^d

So for a credit card with 10,000 dollars on it, and an APR of 18% after one month we will accrue a balance of

10,000*(1+.18/365)^30 = 10149.01 dollars.

Or we end up paying 150 dollars in interest! After a year, if we pay 200$/month on the card we will still have a balance of...9335.371! Man that stinks!

At the rate of paying off 200$ a month it will take us more about 8 years to pay it off, and will have paid more than 7000$ in interest! Man that stinks!

In summary, if you have to use credit cards, then do so...but if not...then stay away! It's a bad deal. But the real question is, how can paying such high rates to banks be at all good for the economy? If we're all paying loads of interest to the banks we can't spend money on real goods. If we can't buy real goods, how can the economy provide jobs? If there aren't any jobs how can we pay back the interest?

For now it seems that wages are keeping up with loan repayments. What happens when that changes? How many people have to default on loans before the house of cards collapses? I suppose we'll see in the near future!

It seems that the banks may be pulling the rug out from under their feet in the long run... and definitely hurting the average working American in the short run.

Friday, May 18, 2007

An estimate of the Probability of getting a 4 Letter Acronym Formed by Blog Subtitles

Kent at The Digression blog asks: What is the probability of a blog's subtitle's first letter of each word producing a meaningful acronym?

Apparently the subtitle for my blog makes the acronym MPEG. MPEG is the acronym for a file format that contains movies or motion pictures.

Well be careful what you ask for, cause here's my answer! :-)

First, let's simplify this by asking, what is the probability of producing a meaningful 4 letter acronym given that the blog has a 4 word subtitle.

The probability of getting a meaningful 4 letter acronym given that the blog has a 4 word subtitle is: P(4 letter meaningful Acronym blog has 4 word subtitle).

Using Bayes rule of conditional probability, we can say that P(4A blog4subtitle) = P(blog4subtitle 4A) x P(4A) / P(blog4subtitle).

The P(4A) = #meaningful 4 letter Acronyms / #of Possible 4 letter Acronyms

The P(blog4subtitle) = #of blogs with 4 word subtitles / #of blogs, the probability that out of all blogs, the chosen blog has a 4 word subtitle.

The conditional probability P(blog4subtitle 4A) = Probability of getting a blog with 4 words in the subtitle given that it has a 4 letter meaningful acronym) = 1

So then P(4A blog4subtitle) = 1xP(4A) / P(blog4subtitle).

Let's proceed shall we?

A rough estimation of the #of meaningful 4 letter acronyms is... well that's kind of hard. Ok so here's where we can get all statistical.

On Wikipedia we can find a list of all acronyms known to wikipedia . Sampling the population of A acronyms I can count that for each section of the A page (26 sections, the acronyms are broken down into the AA, AB, AC...AZ sections) there are about 10 4-letter acronyms. Let's assume that the actual number per section is distributed according to a normal distribution ~ N(10, 2)...i.e. The number of 4 letter acronyms per section is 10+-about 2 per section. We can do this because for large n, the binomial distribution is approximated by a normal distribution. There are 26 sections per page...and 26 pages...thus 676 sections. Taking this into account, we can say that the number of 4 letter acronyms in existence has a sampled distribution of ~N(676*10, 676*2) which means that there will be on average an estimated 6760 4 letter acronyms based on our small sample distribution of 1 section of the A acronyms on wikipedia.

On the other hand computing the number of possible 4 letter acronyms is easy.... 26X26X26X26 = 456976.

Estimating the number of blogs with 4 letter subtitles is also difficult. But again, let's say that the number words in the subtitle of a blog is distributed according to a binomial distribution with mean 6. Assuming that the max number of words in the subtitle is 20, the probability of getting a 4 word subtitle can be approximated by 20!/[4! x 16!] x .3^4 x (.7)^16 = .13 This means that obtaining a blog with 4 letters would be the probability of obtaining a 4 letter blog times the number of blogs available.

The available #of blogs is 66 million...according to BlogHerald .

So(P(blog4subtitle) = .13 x 66million/66million = .13

Thus our final estimation of the probability of getting a meaningful acronym given a four word subtitle is distributed according to a N(6760/456976/.113, 1352/456976/.113) distribution. (It is a distribution because I had to estimate the number of 4 letter acronyms in order not to have to count them.) Thus I can't be 100% sure what the real probability is. However the mean probability from my estimation is about 11.3% with a variation of 2%. And I can say with 99% confidence that the true probability of obtaining a 4 letter meaningful acronym given my 4 word subtitle lies between 6% and 16%.

That was fun wasn't it? With statistics anything is possible to estimate!

Why I Want to Live Off the Grid - Part III Producing Your Own Food

Why I Want to Live Off the Grid - Part III Producing Your Own Food

It seems that lately organic food and natural lifestyles have emerged on the National scene as never before (see note 1). More and more Americans are taking hold of the belief that food grown without chemicals, preservatives and antibiotics is better for your overall health. I think that this trend is really cool.

However, the problems with organic produce remains: it is substantially more expensive, and it is shipped across long distances. This puts a great strain on our environment in many ways. It also puts a great strain our budgets :-)

A benefit to getting off the grid then is the ability to obtain locally (in your backyard locally!) produced, cheap, organic vegetables and fruit. And if you have a little bit of land, you could even get some fresh meat out of it.

Let me first say that there are few things that will taste and satisfy hunger like fresh meat and vegetables. There is nothing like chomping down into an all-natural-grass-fed-beef hamburger when you're hungry!

Some quick math: Seeds to grow your food 1 $/packet, mini sprouting greenhouses 3 $/house, various gardening tools 30 $, fertilizer 10 $/year, water roughly 0 $. Thus to grow 10 different vegetables in your backyard would cost approximately 10+3x3+30+10 = 60$ the first year and 20$ the second year. I don't know your budget, but with my budget this would save us about 50 dollars a month = 300-600 $ savings over a year's time! Now what to do with all my money!

Starting a garden in your backyard, balcony, or even just a sunny window will bring hours of fun, "fruitful" labor, and much delicious produce free of chemicals and unwanted possible side effects. And if you take the extra step of learning how to naturally preserve food, it can feed you and your family throughout the year with the added benefit of naturally occurring pro-biotics which have been proven to aid digestion and keep your gut and thus body in great condition!

A small portion of my backyard. When filled, it should provide vegetables to feed my wife and I nearly year round (I'll still need red meat of course).

First, you'll want to select a nice sunny area of your backyard that you can water easily. A sunny window will also do, just attach a nice little window box and plant whatever you would like in that.

Second, you must pluck the weeds and till the soil prior to planting. Tilling mixes up the soil, helps it to breathe, and to be soft enough for the new roots to grab in!

Third, you'll want to sprout your seeds at least 6 weeks prior to planting. Stores like Lowe's and Home Depot make these great miniature green houses which are well suited to sprouting. The mini green houses have these great circular disks of peat which hold the fledgling plants until they are ready for the great outdoors.

Poor quality picture demonstrating the mini-greenhouses I've been using to sprout my garden. Here in Colorado the potential for snow and freezing lasts until about May 15, so sprouting indoors prior to planting is nearly imperative.

Fourth, once the seeds have sprouted and have obtained a decent strength it's time to plant them in the soil. Plant them in the soil and cover the remaining soil with weed cloth. The weed cloth will let the soil breath, get water and keep the weeds from choking your plants!

Fifth, water ever day when the plants are young. Make sure the roots don't dry out.

Sixth, when the fruits/vegetables get big enough, pluck 'em and eat 'em!

Seventh, if you can't eat them all, preserve them! Cucumbers can be made into pickles, and tomatoes can be made into ketchup. Cabbage can become Sauerkraut, and raspberries can become jam.

Eighth, let your soil rest and get ready for next year!

Well I hope that after reading this you too will grow a garden full of healthy and delicious vegetables. And remember, gardens can be grown both in the fall and late Spring. Enjoy!

note 1: It could be said that prior to the 60's and 70's food was predominately Organic. Thus the trend towards organic is really a reversal of the highly processed and unnatural agriculture of the late 20th century.

Tuesday, May 15, 2007

A Cool Fact about Uniform Distributions

A Cool Fact about Uniform Distributions

On Monday I received the problem of the week from Doubleclick Technical Group guru, Andrew. The problem was as follows:

If I have a hat with all the numbers from 0 to 1 in it, and I start randomly choosing numbers from it...how many times will the number I draw be the maximum value for the numbers I've already drawn when I draw a total of n numbers from the hat? It should be noted that the question is asking: on average how many times will the maximum value change.

I know the answer is obvious to most people, but I had to do a little bit of work to get it. In the end I discovered a cool fact...that Uniform distributions and Beta distributions are related!

First what we really have here is a process that selects a random variable (r.v) from a Uniform(0,1) distribution. A uniform(0,1) distribution has mean .5 and variance .25. Uniform distributions can be used in many cool ways, the least of which is simulating a coin flip.

A depiction of the probability density of a Uniform distribution

Secondly, when we talk about the maximum of a set of r.v, max{X1, X2,....,Xn}, we can also refer to the last element in the sorted, or ordered, set {X(1), X(2), .... , X(n)<----this would be the maximum}. In this case the sort goes in ascending order.

Here is where it gets interesting! (ok interesting if your into this sort of thing, and I am...so....) When we sort the random variables produced from a Uniform distribution, the ordered set takes on the appearance of a Beta distribution! Furthermore, each element in the set has it's own specific Beta distribution....i.e. the k-th element in the set {X(1), ... , X(k), ... , X(n)} has the distribution Beta(k, k+1-n)! Wow!

These are various depictions of Beta probability density functions...neat-o!

Now, we know that the Beta(k, k+1-n) distribution has a mean value of k/(k+k+1-n). This is quite useful, because in our problem above we are asking the question: how many times does the maximum change, or rather, what is the sum of the probabilities for each draw to be a maximum. We can conclude, with some thinking, that on average after n draws the maximum of a set of uniformly drawn r.v.'s is 1 - the mean value of the n-th Uniform r.v. from the ordered set. Thus the Probability that our nth draw is the new maximum is Pr(Xn = max) = 1 - mean(Beta(n, n+1-n)) = 1 - n/(n+1)! It should be noted that I am interchanging the actual value of the n-th draw with it's probability because for the r.v. to be a max it only has to fall within the previous max's value and 1....making the probability of the draw being the max and the mean value of the Beta(n, n+n+1-n) the same thing.

So... if X0, X1, ... , Xn-1 are our draws...we have the following:

Pr(X0 = max) = 1 -0 (first draw must be the maximum)

Pr(X1 = max) = 1- 1/2 (1/(1+1))

Pr(X2 = max) = 1- 2/3 = 1/3

Pr(X3 = max) = 1- 3/4 = 1/4

.

.

.

Pr(Xn-1 = max) = 1-n-1/(n)

And by summing up these probabilities, we get the expected or average amount of times that the number drawn is the maximum...

sum(1-j/(j+1)) [for j=0 to n-1] !

So for n=10,000,000 we expect to obtain about 14 new maximums along the way!

And you thought Math was useless :-) Next week if you're lucky I will discuss how most natural processes can be described by a Normal distribution...including the stock market!

Thursday, May 10, 2007

My First Trip to NewYork

My First Trip to NewYork

These past few days here in New York have been my first exposure to the Big Apple. While I was a bit nervous about spending time in a large fruit it turns out that the big city is very interesting and an experience that all who count themselves cultured should have.

Sunday afternoon I caught a flight out of Denver International Airport. If you've ever been to DIA, then you know that it is a gigantic and very nice airport. You even have to take a train from the entrance to 1 of 3 terminals in order to fly out! Thus it came as a great surprise to me when the plane finally touched down at LaGuardia Airport in New York. I had thoughts of being greeted by fanciness and class. Alas Laguardia was, well, like a well worn shoe :-)

Nevertheless I obtained my bags and walked out to stand in a 20 minute long line for a cab where I struck up a conversation with a very nice man from 'Queens'. He broke my stereotype of New Yorkers as gruff and uncaring people (and as I would later discuss with my new Manager Garrett....New York is all about diversity and breaking stereotypes!).

After checking in to my hotel I decided to take a walk and get something to eat. I was a little afraid of getting robbed (stereotype #2) so I was walking with an alert eye and ready to defend myself at any moment. I kept remembering all the horror stories from my old Jiu-Jitsu instructors from New York. I was ready to perform an Asha Garuma (leg wheel throw) followed by an arm or wrist lock to any potential villains along the way. Eventually my mind was settled that New York City was acceptably safe after all.

I eventually found a pizza shop on Times Square. But the pizza wasn't great. I was disappointed that stereotype #3 about New York wasn't as true :-/ (Later I gave another pizza shop a shot and their pizza was great...stereotype #3 = true!)

The next two days of my trip involved meeting with Warner Bros and making sure that the creative shops knew how to use Motif AdKit to its fullest capacity. Though I wont go over all the details of the meetings, WB and the creative shops we met with are now further on board with Motif.

Aside from the meetings, however, Monday night we took Warner Bros out to dinner at a restaurant called Japonais (http://www.japonaischicago.com/ this is the Chicago version...the NY one is similar).

IT WAS SOOOOOOOOOOOOOOOOOO GOOD!!!!!!!!! First we had about 10 rounds of Sushi and Sashimi. Nothing beats a master sushi chef with fresh out-of-the-water-fish.

But the highlight of Japonais was the Kobe Wagyu style Sirloin steak. I nearly died of happiness when I took the first bite. Being from Texas and all, I really thought that I knew what good steak was. Well, those red meat eating Texans could learn a thing or two from the Japanese that's for sure!

Oh and I also saw a small fraction of Central Park that afternoon. We also made a whirlwind tour through MoMA (the museum of modern art).

Waking up a bit tired on Tuesday I proceeded to some more meetings with WB and their creative shops. Again we presented our material, the creative shops listened and the meetings adjourned without any wrestling matches.

After the meetings I had the pleasure of meeting Fan Zhang and Garrett Cronin in person for the first time! Fan was kind enough to take me around the office and introduce me to all the Adapt folks there. I even learned that in fact there are two Theo's that work at DoubleClick! Luckily I work in Colorado and the other Theo is New York.

Another dinner with WB and another 15 block walk back to the hotel. I decided that I would take as few cab rides as possible in order to prevent all those appetizers and desserts from going straight to my 'Buddha' (my own slang for my ever more rounding belly).

As I headed for the DoubleClick office Wednesday morning I stopped for a bagel and put a check mark next to another New York stereotype: awesome Bagels!

Lunch found Garrett, Fan and I eating fish products and banana pudding at a little restaurant in Greenwich Village called Mary's Fish House. It was very delicious! Our conversation turned to marking out the differences between Colorado and New York. And the difference is....diversity (well that and mountains, way less people, clean air, real estate that you can afford and not be the size of a shoebox...etc)! New York's vast range of ethnicities, cultures and languages is really cool. I think I heard at least 5 different languages as I walked along the streets.

Finally it was time to go. I got my bags, walked out to the street put up my hand and was soon picked up by a Taxi who then drove me at 1000 mph to LaGuardia Airport. It was like being in an F-16 fighter jet! So now here I am back in the Rocky Mountains, with fresh air, clean streets and not a honking horn or siren to be heard. Home sweet home!

Tuesday, May 1, 2007

Entrepreneurship Or What do I Know About Anything Anyways

Entrepreneurship

To become a successful entrepreneur it is imperative that one adhere to the following rules....

Okay, I'm just joking about that. If there were a set of rules to follow to become a successful entrepreneur than every body would be one. Who wouldn't want to be the guy in charge?

So what does it take to run a successful business? In the end, I really couldn't say. I've never run a "successful" business. However, in my own defense, I have run some nearly successful businesses which I believe were limited only by my own lack of stick-to-it-iveness. In the end I think that this may be the real key to any successful business: sticking to it, and always remaining optimistic.

A Short History of My Entrepreneurial Career

My very first business ever was a lawn mowing business named, "The Lawn Boys". My friend down the street had a riding lawn mower. My father had the desire to get me out of the house for the summer (and for me to become financially independent at 13). And last I had the desire make a little money to buy a sweet new guitar! At our peek we pulled in 50 dollars a week! Alas in the end, neither my buddy nor I could get psyched about lawn mowing....and we eventually threw in the towel.

My second business was a band aptly named Theology. Being a rock and roll musician required much dedication to practicing, getting gigs, and songwriting. My good friend Will and I were dedicated to all three. But unfortunately it became increasingly hard to find a solid and reliable bass player and 2nd guitarist. Soon rock and roll lost out to college study. We did however produce a very solid and nice sounding album on an old computer and a super cheap sound card.

Near the end of college I started another business with my good friend Will. This time we used our brains instead of our ears to make money. We started a small IT business to build websites and construct networks for small businesses. Things were going well, but unfortunately I moved to Colorado to learn about very advanced topics in Mathematics.

My last business was about to get off the ground and rolling, when my good friend and business partner Ray moved back to China. It's still possible for us to do some business, especially as the developed countries turn to the underdeveloped countries for outsourcing. We still exchange emails and ideas every now and then. It may take a while, but I think Ray and I will eventually be able to pull off a transcontinental business.

Currently, like a crouched tiger, I am waiting for the next opportunity to present itself. There are many possibilities, but few real opportunities. And so I'm waiting, thinking, and of course....blogging!

Though there is much to be said about starting a successful business, I have more questions than answers. But that is one of the main reasons I have decided to blog. Perhaps writing my ideas and questions out will bring constructive criticism and also clarify and sharpen my vision. Who knows? Perhaps the next business I start will be less of a warm-up/practice run and more of a multinational conglomerate! :-)