In 1918 Harlow Shapley measured the distances of the globular clusters, ball-shaped swarms of hundreds of thousands of old stars, and found that they are not spread evenly round the sky. Most of them lie in one half of it, towards Sagittarius, and he argued that they swarm round the centre of the Milky Way, far from the Sun. IOAA 2024 gave a catalogue of 25 globular clusters and asked for his argument to be repeated with modern distances. Turning 25 scattered positions into one distance and its uncertainty takes the statistics of a sample, which describe where its values lie and how widely they spread, how well its mean is known and what to do with a value that does not seem to belong. In this section we learn these, and then how to combine measurements of different quality.
D7.1The centre of a sample
Before you readMake a guess first
Five measurements of the same quantity are 2, 3, 3, 4 and 18. Which single number describes them best?
Their median, 3, describes them best. The single value of 18, perhaps a slip, pulls the mean up to 6, which is larger than four of the five values.
The mean of values, , uses every value, and when the values scatter at random about the truth it is the best single estimate of it. The is the middle value once they are put in order, or the mean of the two middle values when is even. It ignores how far away the outer values are, so a few wild values hardly move it. When the two differ a lot, the sample is lopsided or contains values that do not belong, and the median is the safer description.
The catalogue of IOAA 2024 gives each cluster's galactic longitude and latitude , the coordinates of Section 1.6, and its distance modulus . From these we find its distance pc and its distance in the direction of the Galactic centre, . For NGC 6522, with , and , this gives pc and pc. The other two coordinates, along the Sun's motion round the centre and out of the plane of the Milky Way, follow in the same way. For the 25 clusters the mean of is 6.16 kpc and its median is 6.81 kpc.
D7.2The spread of a sample
Before you readMake a guess first
A large sample whose values scatter at random has a standard deviation of 4 kpc. Roughly what share of its values lie within 4 kpc of the mean?
About two thirds of them do, 68% for the bell-shaped scatter that random errors usually give. About 95% lie within two standard deviations.
The measures the typical distance of the values from their mean. We square each difference , so that values below the mean count as much as values above it, add the squares, divide by and take the square root. Dividing by instead of allows for the mean having been worked out from the same values, which brings it closer to them than the true value is, just as the uncertainty of a least-squares line divides by in Section D6.
Random errors usually scatter values in the bell-shaped pattern called the normal distribution. In it 68% of the values lie within one standard deviation of the mean, 95% within two and 99.7% within three. For the 25 clusters kpc, and 21 of them, 84%, lie within one standard deviation of the mean. That is more than 68%, because the two clusters far from the rest make larger.
D7.3How well the mean is known
Before you readMake a guess first
A set of measurements gives a mean with some uncertainty. How many times as many measurements would halve that uncertainty?
It takes four times as many, because the uncertainty of a mean falls as one over the square root of the number of measurements.
The mean of many values is more certain than any one of them, because their random errors partly cancel. Its uncertainty, the standard error of the mean, is the standard deviation divided by .
ResultThe mean, the standard deviation and the standard error(D.8)
the number of values
their mean
their standard deviation, the typical scatter of a single value
the standard error, the uncertainty of the mean
The standard error holds when the values are independent and scatter at random. It does nothing about a systematic error shared by all of them, as Section D1 explains.
For the 25 clusters the standard error of the mean of is kpc. The means of and are −0.32 and 0.43 kpc, both close to zero, so the clusters are centred on a point almost straight towards the Galactic centre, kpc away. The distance from the Sun to the centre of the Milky Way comes out as about 6.2 ± 0.8 kpc. Today's value, found from the orbits of stars round the black hole at the centre, is about 8.2 kpc. Our estimate is low by more than twice its uncertainty, which suggests that the sample is not a fair one, and indeed clusters beyond the centre are the hardest to see through the dust of the Milky Way's disc. Shapley's own estimate was too large, because he did not know that dust dims distant stars.
Quick checkA standard error
Thirty-six measurements of a magnitude have a standard deviation of 1.2. How uncertain is their mean?
The standard error is magnitudes.
D7.4Quartiles, box plots and histograms
Before you readMake a guess first
A box plot draws a box over part of a sample. Which part?
The box covers the middle half of the sample, from the first quartile to the third. A line across it marks the median.
The median splits the sorted values into a lower and an upper half, and the medians of those halves are the first and third quartiles, and . A quarter of the values lie below and a quarter above . Conventions differ slightly in how they treat the middle value, and we follow the official solution of the 2024 problem, which leaves the median out of both halves when is odd. The distance between the quartiles, the interquartile range , measures the spread of the middle half, and like the median it is hardly moved by wild values.
A box plot draws the sample as a box from to with a line at the median, and whiskers that reach out to the farthest values lying within 1.5 interquartile ranges of the box. Values beyond that are drawn on their own as outliers. A histogram shows the shape of a sample as bars, each as high as the number of values that fall in its bin. Bins that are too narrow break the histogram into spikes, and bins that are too wide hide its shape. About bins, five for our 25 clusters, is a fair first choice.
Figure D.7The globular clusters of IOAA 2024 as a sampleinteractive
Coordinate
Bin width
Mean and standard deviation
Standard error of the mean
Quartiles
Outliers by the rule of 1.5 times the interquartile range
The figure shows the 25 globular clusters of the IOAA 2024 catalogue as a histogram, with a tick for each cluster just above the axis, a box plot and the mean with one standard deviation either side. The control rows choose the coordinate and the width of the bins, and the table gives the statistics. For , most clusters lie between 2 and 11 kpc towards the Galactic centre, and the box plot marks NGC 6426, far beyond the rest, as an outlier. Bins of break the histogram into spikes, and bins of leave little more than one hump. The other two coordinates, and , spread on both sides of zero, as they should if the clusters swarm round the centre.
For the quartiles are 3.29 and 8.22 kpc, so the interquartile range is 4.93 kpc. The whiskers may reach 1.5 times this beyond the box, to −4.11 kpc below and 15.62 kpc above. The nearest cluster in the direction away from the centre, NGC 2298 at −3.97 kpc, just stays inside, while NGC 6426, at 20.9 kpc from us and 17.70 kpc towards the centre, lies beyond the upper limit.
Quick checkWhere outliers begin
A sample has quartiles and . Above what value does a point count as an outlier by the rule of 1.5 interquartile ranges?
The interquartile range is , so the upper limit is .
D7.5Outliers and sigma clipping
Before you readMake a guess first
One value lies five standard deviations from the mean of a hundred others. What should we do with it?
We check it for a slip, such as a misread digit or a value in the wrong units, and then say whether we keep it and why. An outlier may be a mistake or a real and interesting object.
An outlier may be a mistake, or it may be real and interesting. NGC 6426 is a real cluster, one of the old clusters of the Milky Way's halo, 5.8 kpc above the plane of the disc, and the box plot simply tells us that it is unlike the rest. When a sample is known to contain a few values that do not belong, a common way to remove them is sigma clipping. We find the mean and standard deviation, remove every value more than a chosen number of standard deviations from the mean, often two or three, and repeat with what is left until no more values are removed. A problem may also set a one-sided limit, as IOAA 2021 did when it removed planets more massive than one standard deviation above the mean to find a sample of low-mass planets.
Clipping the values of at two standard deviations shows how it works. The first round has limits at kpc, from −1.95 to 14.28 kpc, and removes the two clusters beyond them. The second round, with a mean of 6.10 kpc and a standard deviation of 2.69 kpc, has its lower limit at 0.72 kpc and removes NGC 288 at −0.09 kpc. The third round removes nothing, and the 22 clusters that remain have a mean of 6.38 kpc and a standard deviation of 2.38 kpc. The standard deviation has fallen a lot while the mean has hardly moved. Clipping is a decision about the data, so an answer should always say which values were removed and by what rule.
D7.6The weighted mean
Before you readMake a guess first
Two measurements of the same quantity give 10 ± 1 and 13 ± 2. What is the best combined value?
The best value is about 10.6. The first measurement is twice as precise, so it counts four times as much as the second.
When the values come with different uncertainties, the plain mean gives a poor measurement as much say as a good one. The weighted mean gives each value a weight , so a measurement twice as precise counts four times as much. It counts as much as the mean of four measurements of the poorer kind would, since that mean has half their uncertainty. Before combining values in this way we should check that they agree within their uncertainties, since values that disagree by much more point to a systematic error in one of them.
ResultThe weighted mean(D.9)
a measured value and its uncertainty
the weight of that value
the weighted mean
its uncertainty
When every value has the same uncertainty , these become the plain mean and , the standard error of (D.8).
For the two measurements of the guess the weights are 1 and 1/4, so the weighted mean is , uncertain by .
Common errorsSection D7
A standard deviation found by dividing by instead of is too small, and noticeably so for a small sample.
The standard deviation is the scatter of single values, and the standard error is the uncertainty of their mean. Quoting the standard deviation as the uncertainty of a mean overstates it by a factor of .
The median of an even number of values is the mean of the two middle ones.
A weighted mean of values that disagree by much more than their uncertainties hides a problem, such as a systematic error in one of them. The values should be compared before they are combined.
A value removed as an outlier has to be named, with the rule that removed it, because clipping changes the result in a way that a reader cannot otherwise check.
ExercisesSection D76 questions
D7.1
What is the standard deviation of the three values 4, 6 and 8?
The mean is 6 and the squared differences are 4, 0 and 4, so .
D7.2
What is the median of 7, 1, 4, 9, 3 and 8?
In order the values are 1, 3, 4, 7, 8 and 9. With six of them the median is the mean of the third and fourth, .
D7.3
What is the interquartile range of 1, 3, 4, 7, 8, 9 and 12, with the convention of this section?
The median is 7. The lower half, 1, 3 and 4, has median , and the upper half, 8, 9 and 12, has median , so the interquartile range is .
D7.4
Three independent measurements of a parallax each have an uncertainty of 0.30 mas. How uncertain is their weighted mean?
Each weight is , so and the uncertainty is mas, which is .
D7.5
A sample of 40 values has a mean of 12.3 and a standard deviation of 2.0. How should its mean be quoted?
The answer is (c). The standard error is , which rounds to 0.3. The standard deviation of 2.0 is the scatter of single values.
D7.6
Which description of a sample is least affected by one wildly wrong value?
The answer is (a). The interquartile range depends only on the middle half of the values, while the standard deviation squares the wild value's large difference from the mean and the range uses it directly.
Olympiad problemsPast IOAA problems, restated1 problem
2008The distance to the Virgo cluster100 points
Adapted from IOAA 2008 (Bandung), data-analysis problem 1. We have restated it in our own words and kept the original data. The solution was last checked on 20 October 2026.
The Virgo cluster, the nearest large cluster of galaxies, spreads over about 10° of the sky. The table gives its distance as found by eight different methods, each with its uncertainty .
Method
Distance (Mpc)
Cepheids
14.9 ± 1.2
Novae
21.1 ± 3.9
Planetary nebulae
15.2 ± 1.1
Globular clusters
18.8 ± 3.8
Surface brightness fluctuations
15.9 ± 0.9
Tully–Fisher relation
15.8 ± 1.5
Faber–Jackson relation
16.8 ± 2.4
Type Ia supernovae
19.4 ± 5.0
(a) Find the weighted mean of the distances, with weights . This was worth 30 marks. (b) Find its uncertainty. This was worth 10 marks. (c) The galaxies of the cluster recede from us at 1136 km/s on average. Estimate the Hubble constant and its uncertainty. This was worth 35 marks. (d) Find the Hubble time and its uncertainty. This was worth 25 marks. Use 1 Mpc = km.
By Hubble's law the velocity of recession is times the distance. The Hubble constant and the Hubble time have the same fractional uncertainty as the distance, since the velocity is given without one.
The sum of is 55.94 Mpc⁻¹ and the sum of the weights is 3.549 Mpc⁻², so the weighted mean is Mpc.
Its uncertainty is Mpc. The plain mean of the eight distances, 17.24 Mpc, is pulled upwards by the least precise methods.
By Hubble's law km/s per Mpc. The fractional uncertainty of the distance is , so is uncertain by 2.4 km/s per Mpc.
The Hubble time is s, which at s per thousand million years is 13.6 Gyr, uncertain by the same 3.4%.
AnswerThe distance to the Virgo cluster is 15.8 ± 0.5 Mpc, the Hubble constant is 72 ± 2 km/s per Mpc and the Hubble time is 13.6 ± 0.5 Gyr. The official solution finds 15.81 Mpc, because its sum of comes out 0.17 too large, and the same Hubble constant and Hubble time.
Contents
Sections finished, Chapter D
0 of 8
Exercises right
None attempted yet
To redo
Nothing yet
Progress is saved in this browser on this device. Back it upClear every tick and answer?