Newsletter #164 Home
Newsletter Contributors
Previous Issues
BARRA Home


Three-Part Alphas




BARRA Acquires Global
Advanced Technology


The New Cosmos-U.S.
Valuation Algorithms


Cosmos-Japan:
A Case Study


Portfolio Management
in Cosmos-U.S.


The Cosmos
Global Optimizer




The BARRA Brainteaser

Winter 1997
Solution to The BARRA
Brainteaser



Brainteaser and Solution from Winter 1997

by Ronald N. Kahn

Sydney and Steve are quantitative researchers at the international investment firm I.B. Quant. As a first step in researching a new emerging markets strategy, they have flown to the South Pacific to investigate opportunities in the tropical islands. Unfortunately, the trip goes awry and they end up shipwrecked with little but an American flag and each other’s company.

After some months of mind-numbing tedium, they realize they can remember just the first few digits of p. They argue whether 3.14 or 3.15 is a better approximation.

Given only their American flag and a stick of length L (equal to the width of a stripe on the flag), suggest a method to estimate p to sufficient accuracy to solve the argument. Make reasonable assumptions to estimate how long resolving the argument will require.

Solution

Sydney and Steve can estimate p by tossing the stick onto the flag many times and estimating the probability that the stick crosses a stripe boundary. The probability that the stick will cross the boundary depends on p, and the accuracy of the estimate depends on the number of tosses.

Here is the analysis. I will first set up the problem; then you can follow the math or skip down to the answer.

Figure 1 displays the stick configuration after a sample toss.

Figure 1

[ Figure 1 ]

The variable x measures the distance from the upper stripe boundary to the bottom of the stick. With equal probability, the bottom of the stick may fall anywhere between 0 and L. The angle q measures how far the stick is from the vertical line to the right. With equal probability, that angle may lie anywhere between 0 and p.

So the probability density—the probability that x is between x and x + dx and q is between q and q + dq—is uniform:

This is a constant: a uniform distribution. Since the stick must be somewhere:

For any given x, the stick will cross the boundary if q > q c and q <p - qc, as shown in Figures 2A and 2B.

Figure 2A

[ Figure 2A ]



Figure 2B

[ Figure 2B ]

Some trigonometry shows that:

So we can define a "counting function":

The counting function is 1, if the stick crosses a stripe boundary, and zero otherwise. The probability of crossing a stripe boundary is then just the expectation of this counting function:

Using Equations 4 and 5 in Integral 6 leads to:

Sydney and Steve can count the fraction of their tosses which cross a stripe boundary, to estimate p:

Now what about accuracy? We have estimated the expectation of the counting function. We can also estimate its variance:

But since c2 = c:

Sydney and Steve estimate after N tosses as:

Therefore, the standard error of the estimate is:

To distinguish 3.14 from 3.15 at the 95% confidence level, Sydney and Steve must distinguish crossing fraction 0.635 from 0.637 at the 95% confidence level. So the standard error of their estimate of should be less than 0.001:

With 6 tosses per minute and 8 hours of effort per day, they will achieve the desired accuracy in roughly 80 working days. That's a strong motivation for memorizing the first several digits of p !

Building a better mousetrap

I like this problem because I can state it so easily ("given a flag and a stick, estimate p to arbitrary precision"), and yet its solution is not at all obvious. So the broad range of suggested solutions didn't surprise me.

In fact, there is an old physics question asking for three ways to use a barometer to measure the height of a luxury high-rise in New York. The answers include using the relation between height and air pressure, dropping the barometer from the top and counting the time for it to hit the sidewalk, and bribing the doorman with the barometer to tell you the building's height.

Similarly, I received several types of responses. Richard Steck, Chris Lobello, and Paul Spence provided substantially the solution I have outlined, and Gary Sabot and Larry Pohlman provided related probabilistic approaches. Jim Angel, Marc Roston, Sanjay Jagatsingh, and Michael Caplan, ignoring my book review in the last issue, proposed geometric solutions—usually involving a large circle drawn in the sand using the flag as a compass, and measuring the circumference with the stick. This wasn’t the probabilistic answer I was seeking, but the stated Brainteaser didn’t rule this out, and it was more efficient than the probabilistic approach.





[client support]   [portfolio management]   [investment data]   [trading  services]
[model  &  market information]   [research resources]   [about BARRA]  

[online product center]

[search]   [site map]   [contact us]   [home]  

Any questions or bug reports regarding this service should go to contactus@barra.com.
© 1995-1999 BARRA, Inc. All rights reserved. Terms of Use.