My Photo
Note: Jeff does not accept guest blog posts on A Dash of Insight.

For inquiries regarding advertising and republication, contact

Follow Jeff on Twitter!

Enter your email address:

Delivered by FeedBurner


  • Seeking Alpha
    Seeking Alpha Certified
  • AllTopSites
    Alltop, all the top stories
  • iStockAnalyst
Talk Markets
Forexpros Contributor
Copyright 2005-2014
All Rights Reserved

« ETF Update: Finding a System that Works for You | Main | Who Knows about Home Prices? »

August 17, 2009



Also, note that 2 times 5C2 is the same as 6C3. Therefore, for odd number of flips, the number of paths for the n'th flip is the (n+1)th central binomial coefficient.


You'd have to multiply by two since, for instance, a 1-flip has two possible outcomes with no lead changes.


"Central binomial coefficients: C(2n,n) = (2n)!/(n!)^2."
That's the same result as I had above.


I found the sequence - the central binomial coefficient:

It's the number of no-lead-change pathways for the odd-numbered trials. Link above has a lot of other examples of where that sequence is useful.


Last post on subject: the number of paths that don't have any lead changes for an odd number of flips is two times the combination (2n+1)C(n) i.e., 2*(2n+1)!/(n+1)!n!. For an even number of flips, the number of paths with no lead changes is two times the combination (2n)C(n), i.e., 2*(2n)!/(n!)(n!). Apologies for the bazillion posts.


er, sorry for the triple-post. 13110 with no lead changes?


er... i mean the number of paths with lead changes (p.s. after 15, is it 13110 out of 32768?)


Can you please post the number of lead changes after 11, 13 and 15 flips? Thanks..


And by the time you get to 15 flips, you're at 60% of endpoints having at least one lead change somewhere on the path. As you go forward, the probability of developing a big lead increases while the chances of having a lead change occur over the next n trials goes down. But even at 15 flips, almost 40% of the paths leave you in an ahead-by-one situation, ready for a lead change.

I just wish I could get my head to do the closed-form solution of this (after n flips, y probability of a lead change). Alas, no.


I don't trust my closed-end solution capabilities, which is why I run simulations to help my intuition. Simulation gave me a lot of small numbers of lead changes, not so many zero lead changes.

VennData - while only 25% of the _endpoints_ may have a lead change, far more than 25% of the _paths_ will have a lead change somewhere on your tree. All the lead changes happen on odd flips. Flip the 5th time and you end up with 12/32 of the endpoints having a lead change somewhere. So we're already to 37.5% having at least one lead change. By the time you get to nine flips, you're at 260 lead changes out of the 512 pathways (just over 50%).

Do this enough times (20,000 for instance) and you will get lead changes on the vast majority of paths. I think the point was that you wouldn't get thousands of lead changes in the course of this many flips, just tens.


RB -- Sorry to be MIA for a couple of days. One of my quarterly trips to Seattle for a board meeting.

I also have some email on this topic, from good sources. I'll follow up ASAP.

The main idea is that no one knows what normal looks like, so our comparisons are bad.

Meanwhile, Patrick is on the money.

I may have to expand the range of "correct" answers on this question

Thanks to all.



"How many lead changes would you expect?"

That sounds to me like the "expected value" not the mode. Perhaps the good prof can clarify. Cheers!


But that's not the question. It's not "What is the expected value?" (in the binary tree case, the mean average of all the endpoints.)

The prof's question is about the mode: "What is most likely number to expect?" Which is zero.


I mean "the number of lead changes may be close to zero, but is still positive"


Even with your illustration, the number of mean changes may be close to zero, but is still positive. The mean E(x) is zero but the mean translation distance E(|x|) is on the order of sqrt(20,000). This number is much closer to zero than 20,000 and therefore would imply a non-zero expected number of lead changes. It would be a fairly good guess that number of lead changes also grow as sqrt(N).


Draw an inverted "tree" diagram representing coin flips. The upside-down tree structure shows after one flip you have zero lead changes. Keep drawing.

After two flips you've got four outcomes (either 2-0 or even: HH, HT, TH, TT) So after two flips you haven't had a "lead change." ...and you've got a two-flip "lead" in half of your expected outcome branches.

Keep going... after the third flip you've got eight outcomes with six of them with zero lead changes. Six out of eight! HHH, HHT, HTH, HTT, THH, THT, TTH, TTT.

Now you can make it simple by realizing that "half" of your tree is the mirror of the other. So after four flips you've got sixteen flips and only four endpoints with "change" outcomes. That's 75% with zero lead changes.

You can draw out all 20,000 if you want, or see that you will be close to that 75% number of zero lead changes for all end points (aka recursion.) Go ahead, keep going if you need to, but you should "see" the solution.

Commenters, your intuition is wrong or you're not using the correct mathematical tool to make your evaluation of the problem.

Zero lead changes is what you should expect. No other number comes close.


I find it fascinating how much technical analysis has come to dominate CNBC and Bloomberg. I don't know if it has taken over industry wide, but certainly, if you are viewing these channels you are exposed to analyst after analyst (or astrologer if you don't believe you can predict the future by drawing graphs lol) talking about TA.

But what is even more fascinating is how the TA guru will dismiss his own chart pattern. He/she will say, well, this bullish move is only because of this specific thing (i.e. cost cutting). That it is, "different this time." Never do they go back on the charts and cross off areas because this was a one time event. You could pull out a chart of the S&P 500 to 1926, and pick out some news of the day for each bump. But they never invalidate charts for that reason. This actually happens more with economic data than stock data (i.e. copper is only rising because of Chinese stimulus...well ok, but are we doing TA or FA and why did copper rise in 1992? I'm sure there was a "reason")

They have a pre-conceived notion and even dismiss their own charts when it doesn't fit. On national TV no less.


My guess is that the probability that you will have 'k' lead changes has a sqrt(1/k) relationship to the probability that you will have '0' lead changes. The expected value is of course the summation of p(k)*k (from k=1 to k=9999). Still thinking of an approach.


Zero might be the most common outcome, but not represent the "most" compared to the cases with changes. So the expected (mean) number of lead changes would be greater than the modal number (zero).

And after the first toss establishes the lead, it's true that the next two tosses give only a 1/4 probability of a lead change. But they also give a 1/2 shot of putting you back in the same ahead-by-one condition, so you have another 1/4 shot of a lead change, 1/4 of a big lead, and 1/2 of another ahead-by-one, recursively, etc. Keep multiplying .75 * .5 and eventually the probability of having zero lead changes after 20,000 flips gets pretty darn small (1% in my simulation).


It's zero. After the first flip, one item is ahead. You need two flips in a row to go the opposite way a row... to get a lead change. That's a one in four shot. Applying that recursively (to build a huge inverted tree) means the most likely number of lead changes is zero.

Think of the end points of the recursively created inverted tree (with the nodes totally the lead changes to that point.) Most would be 'zero' changes.

The comments to this entry are closed.