The cocked hat
Abstract.
We revisit the cocked hat – an old problem from navigation – and examine under what conditions its old solution is valid.
Key words and phrases:
Random rays, geometric probability, navigation2000 Mathematics Subject Classification:
Primary 52A22, secondary 60D051. Introduction
Navigators used to plot on a map lines of position or lines of bearing, which are rays emanating from a landmark (e.g., a lighthouse or radio beacon) at a particular bearing (angle relative to north) that was estimated to be the direction from the landmark (which we also refer to as observation point) to the ship or plane. Two such rays usually intersect at a point, which the navigator would take as an estimate of the true position of the craft. Navigators were encouraged to plot three rays, to make position estimation more robust. The three rays normally created a triangle, called a cocked hat [6], as shown in Figure 1. The properties of the cocked hat were investigated thoroughly [1, 3, 4, 5, 8, 9, 10, 12], to help navigators interpret it and make good navigation decisions. The aim of this paper is to analyze the conditions under which an elegant property of the cocked hat holds. That property had been stated without a proof more than 80 years ago [8], proved informally (and essentially incorrectly) 70 years ago [9], and has been widely disseminated ever since [3, 5, 7, 11, 12], including in course material [11] and in a popular science book [7].
The property that we are interested in is the probability of the cocked hat containing the true position being . Under what conditions is this statement true?

This claim first appeared in a 1938 navigation manual [8, page 166], without a proof and with only informal conditions on the error angles at the three landmarks, which we denote , , and (see Figure 1). The error angles , , and are between the plotted rays, which we denote , , and and the rays from to the true position of the craft, which we denote by (see Figure 1). The informal conditions are that the errors are independent (the manual does not use this term, but this is what it means) and fairly small, around 1 degree. A 1947 article by Stansfield [9]111Stansfield developed the results published in the paper while serving in Operational Research Sections attached to the Royal Air Force Fighter Command and Coastal Command during World War II. cites the claim, gives more formal conditions for it, and sketches a proof. The conditions that Stansfield specified are remarkably weak: he claims that the result would hold if only two of the three errors have zero median. Stansfield writes that this assumption is equivalent to the following: “for two of the stations the observed bearings are equally likely to pass to the right or the left of the true position”. A 1951 article by Daniels [5] states Stansfield’s result in a more modern statistical language, saying that the cocked hat is a distribution-free confidence region; the term distribution free means that the result is not dependent on a particular error distribution, say Gaussian, but only on a parameter of the distribution, here the zero median222Daniels was a statistician and served as the president of the Royal Statistical Society from 1974 to 1975. His paper incorrectly states that the Admiralty Navigation Manual proves the -probability result; it does not; the first proof sketch appears in Stansfield’s paper. . Daniels then considers the case of landmarks and rays starting from there. The lines of these rays split the plane into finitely connected components, some of them bounded, some of them not. Daniels claims without proof a particular formula, , for the probability that belongs to the union of the unbounded components. The -probability result was incorrectly extended again by Williams333Williams was a professional air navigator and served as president of the Royal Institute of Navigation from 1984-1987 [2]. in 1991. He claimed specific probabilities that the open regions around the cocked hat contain , again with only an informal specification of the assumptions and with only a sketch of the proof. Williams’s claims were shown to be false by Cook [3], using specific error distributions to which Williams answered with a witty (but scientifically wrong) rebuttal. Cook also repeated the claim that the probability of the cocked hat contains is .
Our aim in this paper is to show that the -probability result is valid only for error distributions that guarantee that the three rays intersect at three distinct points and form a triangle.
We note that the use of the cocked hat in navigation is today obsolete, having been replaced by estimation of confidence regions, usually circles or ellipses, by computer algorithms.
2. Generalizations to rays that do not intersect
Two rays in the plane can intersect, but they can also fail to intersect. Lines of position plotted by navigators almost always intersected, because the error angles were small. Also, navigators were taught to choose landmarks so that no angle at the intersection is smaller than about 50 degrees – a small angle at the intersection implies ill conditioning (high sensitivity of the intersection point to bearing errors).
Stansfield’s formulation of the problem uses much more general assumptions on the errors, and no assumption about angles at the intersections. Stansfield, Daniels, and the authors that followed only require that the three errors are random, independent, and that the median of their distributions is zero. We replace the zero-median assumption by a consistent but slightly more general condition, namely
(2.1) |
for every , where is a shorthand for the set . This means in particular that the target is never on which is a necessity because if were allowed, then could be close to one (e.g., if is close to one), implying that the result does not hold in this case. We also consider the restriction of the errors to .
Under these weak assumptions on the error distribution, the three rays might fail to form a triangle (the cocked hat). How can we formally express the -probability result when rays may fail to intersect? We propose four ways to express the result; the first three are fairly natural but are not sufficient for the result, even under the restriction ; the fourth is not particularly natural but is the only correct statement of the result.
Conjunction formulation. The probability that the three rays intersect at three points and that the triangle that they form contains is . In this formulation, we allow error distributions that could generate non-intersecting rays and we hope to prove that the probability that the rays intersect at fewer than three points or that the triangle does not contain is exactly . This is false.
Conditional probability formulation. The conditional probability that the triangle that the rays form contains , conditioned on the rays forming a triangle, is . In this formulation we again allow error distributions that generate non-intersecting rays, and we hope to prove that if the rays intersect at three points, then the probability that the triangle contains is . We do not care with what probability the rays fail to form a triangle. This again is false.
Lines formulation. We extend the rays to infinite lines , which always form a triangle, and we hope to show that the triangle that they form contains with probability . Here we must restrict , otherwise the same line could appear both on the left and on the right of . Again, this claim is false.
Constrained distribution formulation. We assume that the distribution of errors is such that every pair of rays always intersects and we hope to show that the probability that the triangle contains is . We do not permit distributions under which two of the rays might fail to intersect. We show below that in this case .
We note that from the navigator’s perspective, the conditional probability is the most natural. You plot three rays. If they do not intersect at three points, you discard the measurements and try again, because you either picked bad observation points (e.g., two of them and your ship are almost collinear) or at least one of the bearings is way off. If they do intersect at three points, you want to know the (conditional) probability that the cocked hat contains . From the statistician’s perspective, any of the first three formulations makes sense. The fourth makes less statistical sense, because it is unusual to assume that independent error distributions satisfy some global structural constraint. In particular, it appears that Daniels may have believed that the lines formulation is correct, because he writes about geometrical lines in the plane, not about rays. He writes “a particular set of lines, no two of which are parallel, divides the plane in to polygons”.
3. Counterexamples
We now show that the Conjunction, Conditional probability, and Lines formulation are all false by giving counterexamples. Every example is a two-ray distribution that is concentrated on two rays and : . This is no coincidence as we will see at the end of this section.

In the first example is in the centroid of an equilateral triangle whose vertices are , , and . Figure 2 (left) shows the two-ray error distributions. It is easy to see that intersects neither nor (subscripts are meant modulo ). Therefore, if is selected, then a cocked hat does not form. On the other hand, if , , and are selected, then they form a cocked hat that contains . Therefore,
This shows that both the Conjunction formulation is false and that the Conditional probability formulation is false. Note that all the error angles have magnitude less than , so these formulations are false even with this restriction.
Figure 2 (right) shows another two-ray distribution. The error magnitudes are less than , actually as small as you wish. The true position lies outside all the triangles that the lines form, so the probability that the cocked hat (in the Lines formulation) contains is zero. We can move to the right by any amount and will still hold. This example also shows that the conditional probability that a cocked hat formed by rays contains can also be zero.

The last example, given in Figure 3, shows that the probability that the triangle formed by the extension of the rays to lines contains can be . We again note that the error angles are bounded in magnitude by . In this example the three rays do not have three intersection points, so the cocked hat appears with probability zero. So this is another counterexample to the Conjunction formulation.
We close this section with a remark on two-ray distributions. The set of (Borel) probability distributions satisfying condition (2.1) is convex, and its extreme points are exactly the two-ray distributions, as one can easily check. Moreover is a linear function on the product of the distributions where is the probability distribution of the ray . Indeed, denoting by the indicator function of an event , we have
(3.1) |
a linear function of each , so if it takes the value on the two-ray distributions, then it takes the same value on all distributions satisfying (2.1). We will come back to such distributions in Section 5 again.
4. Intersecting rays
We now start the analysis when rays must intersect in pairs. We assume throughout that the points are in general position, so that no three are collinear and so that no other degeneracies arise.
We introduce some notation. We let denote the ray emanating from in the direction of when are distinct points in the plane; here we assume that . Thus is the ray starting at in the direction of the target , and is the line containing . From each out goes a random ray making a (signed) angle with . Our basic assumption, besides (2.1), is that two random rays always intersect that is for distinct
(4.1) |
So ray and intersect almost surely but their intersection point is not or because of our convention that .
Further notations: resp. are the halfplanes bounded by with consisting of points such that the ray comes from a clockwise rotation from with angle less than , and is its complementary halfplane. When are two rays we denote by the cone whose apex is and whose bounding rays are translated copies of and . Such a cone always has angle less than , because and will never have opposite directions.
Define for distinct .
Lemma 4.1.
The cone contains and .
Proof. Assume first that . We define first the cones and , see Figure 4. Note that the angle of (resp. ) is equal to the angle at (and at ) of the triangle with vertices . Then because the angle of this cone is the sum of the angles of and so smaller than . Then indeed as shown in Figure 4, left.

Suppose now that which is the same as . If does not lie in , then . The last set is a convex cone, disjoint from , as they are separated by the line . So no with can intersect contradicting (4.1). So .
Let denote the halfplane containing and bounded by the line through and . Observe that by the previous argument because the complementary halfplane to is disjoint from , so can intersect only if it lies in .
Suppose next that . We show that . If not, then . The last set is a convex cone again, disjoint from , so for all with contradicting (4.1).
The argument for the case is symmetric (see Figure 4 right) but otherwise identical and is therefore omitted.∎
We remark here that Lemma 4.1 implies that the cone is convex (that is, its angle is smaller than ), it contains , and , of course only if . (For condition (4.1) is void.) Define as the smallest (with respect to inclusion) convex cone satisfying . Note that . For later reference we state the following corollary.
Proof. Set , the convex hull of , and . We will have to consider three cases separately: when is a triangle with inside (Case 1), when is a triangle with a vertex of (Case 2), and when is a quadrilateral (Case 3).
Case 1. Define for where the subscripts are taken mod , see Figure 5 left.
We claim that for all . By symmetry it suffices to show this for . By Lemma 4.1 . So it is enough to check that , and this is evident: the rays bounding are (which bounds ) and (which bounds ).


We can now finish the proof of the theorem in Case 1. There are sub-cases with equal probabilities that correspond to the signs of , , and , as shown in Figure 6. Only in two of them, namely when all s have the same sign, we have , so the probability of this event is .
Case 2. We assume (by symmetry) that is inside the triangle . We define the cones , , and and we claim that for all . From Lemma 4.1 we have that . The bounding rays of are a translate of (bounding ) and a translate of (bounding ), so (see Figure 5 right).
The cases and are symmetric and very simple. We only consider . Again, by Lemma 4.1 and then implying .
Again there are 8 subcases, corresponding to the 8 possible sign patterns of . It is easy to see that in exactly two of them.
Case 3. We assume again by symmetry that the segment is a diagonal of the quadrilateral . Define cones , , and . We claim again that for all . The proof is similar to the previous ones using Lemma 4.1 and is omitted here. Again, in exactly two out of the 8 cases.∎
5. Daniels’ statement
We assume now that there are observation points plus the target point and that these points are in general position. A random ray starts at each satisfying conditions (2.1) and (4.1). The lines of the rays split the plane into connected components, let denote the union of the unbounded components. Here comes Daniels’ statement.
The case is trivial and not interesting. The case is just Theorem 4.1. We note that condition (4.1) is a necessity, even for as the counterexamples in Section 3 show.
We are going to prove this theorem under the assumption that each is a two-ray distribution, that is, and explain, after the proof, how this special case implies the theorem. We also assume that the rays , together with the points are in general position. This is not a serious restriction because the general case of two-ray distributions follows from this by a routine limiting argument.
Proof. To simplify the writing, we set , which is equivalent to . Lemma 4.1 implies that for every . Let be a circle centered at such that for every . Observe that for distinct , the intersection is a convex quadrilateral containing and of course , see Figure 7 left. This follows from condition (4.1): both and intersect both and and the four intersection points are the vertices of which is then a convex quadrilateral.

Let (resp. ) denote the line of the ray (and ). For a selection of signs the lines split the plane into finitely many connected components. We are going to show that out of the possible selections there are exactly for which lies in an unbounded component.
We reduce this statement to another one about arcs on the unit circle. First comes a simpler reduction. Translate each cone into a new (and actually unique) position so that its rays touch the circle (see Figure 7 right). Let (resp. ) be the translated copies of (and ). Note that is again a convex quadrilateral.
We claim next that for a fixed selection of signs, lies in an unbounded component for the lines if and only if it lies in the corresponding unbounded component for the lines . This is simple. The point lies in an unbounded component for the lines if and only if there is a halfline starting at and disjoint from each which happens if and only if is disjoint from the lines as well.
Assume now that is the unit circle. Let (resp. ) be the points where (and ) touch , and let be the shorter arc on between and , see Figure 7 right. It is clear that and are not opposite points on so is welldefined. These arcs completely determine . They satisfy the conditions
-
(i)
each is shorter than , and
-
(ii)
is an arc in longer than for all .
The latter condition follows from the fact that is a convex quadrilateral.
We call a selection special if it gives an unbounded component containing . We claim that a selection is special if and only if the points lie on an arc of shorter than . This is also simple. If there is such an arc, call it and let be the centre point of the complementary arc . The ray avoids every line . If there is no such arc, then the connected component containing (and ) is bounded as one can check easily. Therefore it suffices to prove the following lemma.
Lemma 5.1.
Under the above conditions there are exactly special selections.
Proof. For a special selection let denote the shortest arc on containing every , . Thus is the shorter arc between points and for some distinct , and they are the endpoints of .
Claim 5.1.
Each (and ) is the endpoint of for exactly two special selections .
Proof of the claim. It is enough to work with . Using the notation on Figure 8 we assume that is from the halfcircle so .

Define and . Observe first that can’t contain any , as otherwise contradicting (ii). Moreover, can’t contain two arcs with distinct because of (ii) again. It follows then that or .
Case 1 when . Then as well and contains exactly one element from each pair , , and then so does . This gives exactly two special selection and with and , with an endpoint of both.
Case 2 when . Then contains no with special, and so for a unique . This gives again two special selections and where is the endpoint of and . In fact and coincide except at position : for all but and .∎
We explain now how the case of two-ray distributions implies Theorem 5.1, or rather give a sketch of this and leave the technical details to the interested reader. Assume each ray follows a generic distribution for all still satisfying conditions (2.1) and (4.1). Note that by Corollary 4.1, . Using this one can check that every can be approximated with high precision by a convex combination of two-ray distributions, each having . One has to show as well that this approximation can be chosen so that for distinct and for every choice of signs . As in (3.1), is a linear function of the underlying distributions , and this linear function equals on the product of two-ray distributions. Therefore this linear function equals on any convex combination of products of two-ray distributions and consequently must be equal to on the product of the s.
Acknowledgements. The first author was partially supported by Hungarian National Research grants 131529, 131696, and KKP-133819. The last author was partially supported by grants 965/15, 863/15, and 1919/19 from the Israel Science Foundation and by a grant from the Israeli Ministry of Science and Technology.
References
- [1] E. W. Anderson. The treatment of navigational errors. Journal of Navigation, 5(2):103–124, 1952.
- [2] J. Charnley. J. E. D. Williams. Journal of Navigation, 46(2):290–292, 1993. An obituary.
- [3] I. Cook. Random cocked hats. Journal of Navigation, 46(1):132–135, 1993. A response by J. E. D. Williams appears on pages 135–137.
- [4] C. H. Cotter. The cocked hat. Journal of Navigation, 14(2):223–230, 1961.
- [5] H. E. Daniels. The theory of position finding. Journal of the Royal Statistical Society, Series B (Methodological), 13(2):186–207, 1951.
- [6] I.C.B. Dear and P. Kemp, editors. The Oxford Companion to Ships and the Sea. Oxford University Press, 2nd edition, 2006.
- [7] M. Denny. The Science of Navigation: From Dead Reckoning to GPS. The Johns Hopkins University Press, 2012.
- [8] His Majesty’s Navigation School. Admiralty Navigation Manual, volume 3. His Magesty’s Stationary Office, 1938.
- [9] R. G. Stansfield. Statistical theory of D.F. fixing. Journal of the Institution of Electrical Engineers Part IIIA: Radiocommunication, 94(15):762–770, 1947.
- [10] R. G. Stuart. Probabilities in a Gaussian cocked hat. Journal of Navigation, 72(6):1496–1512, 2019.
- [11] The Open University. M245 Probability and statistic: Item 15, Findings One’s Bearings. UK, 1984. A video that is part of course materials, available at https:// www.open.ac.uk/library/digital-archive/video:FOUM190W.
- [12] J. E. D. Williams. The cocked hat. Journal of Navigation, 44(2):269–271, 1991.
Imre Bárány
Rényi Institute of Mathematics,
13-15 Reáltanoda Street, Budapest, 1053 Hungary
barany.imre@renyi.hu
and
Department of Mathematics
University College London
Gower Street, London, WC1E 6BT, UK
William Steiger
Department of Computer Science, Rutgers University
110 Frelinghuysen Road,Piscataway, NJ 08854-8019, USA
steiger@cs.rutgers.edu
Sivan Toledo
Blavatnik School of Computer Science, Tel Aviv University,
Tel Aviv 6997801, Israel
stoledo@mail.tau.ac.il