## Trees, Graphs and the Leaving Certificate

Posted in Biographical, mathematics, Maynooth, The Universe and Stuff with tags , , , , , , on December 15, 2017 by telescoper

I’m starting to get the hang of some of the differences between things here in Ireland and the United Kingdom, both domestically and in the world of work.

One of the most important points of variation that concerns academic life is the school system students go through before going to University. In the system operating in England and Wales the standard qualification for entry is the GCE A-level. Most students take A-levels in three subjects, which gives them a relatively narrow focus although the range of subjects to choose from is rather large. In Ireland the standard qualification is the Leaving Certificate, which comprises a minimum of six subjects, giving students a broader range of knowledge at the sacrifice (perhaps) of a certain amount of depth; it has been decreed for entry into this system that an Irish Leaving Certificate counts as about 2/3 of an A-level for admissions purposes, so Irish students do the equivalent of at least four A-levels, and many do more than this.

There’s a lot to be said for the increased breadth of subjects undertaken for the leaving certificate, but I have no direct experience of teaching first-year university students here yet so I can’t comment on their level of preparedness.

Coincidentally, though, one of the first emails I received this week referred to a consultation about proposed changes to the Leaving Certificate in Applied Mathematics. Not knowing much about the old syllabus, I didn’t feel there was much I could add but I had a look at the new one and was surprised to see a whole Strand’, on Mathematical Modelling with netwworks and graphs.

In this strand students learn about networks or graphs as mathematical models which can be used to investigate a wide range of real-world problems. They learn about graphs and adjacency matrices and how useful these are in solving problems. They are given further opportunity to consolidate their understanding that mathematical ideas can be represented in multiple ways. They are introduced to dynamic programming as a quantitative analysis technique used to solve large, complex problems that involve the need to make a sequence of decisions. As they progress in their understanding they will explore and appreciate the use of algorithms in problem solving as well as considering some of the wider issues involved with the use of such techniques.

Among the specific topics listed you will find:

• Minimal Spanning trees applied to problems involving optimising networks and algorithms associated with finding these (Kruskal, Prim);
• Bellman’s Optimality Principal to find the shortest paths in a weighted directed network, and to be able to formulate the process algebraically;
•  Dijkstra’s algorithm to find shortest paths in a weighted directed network; etc.

For the record I should say that I’ve actually used Minimal Spanning Trees in a research context (see, e.g., this paper) and have read (and still have) a number of books on graph theory, which I find a truly fascinating subject. It seems to me that the topics all listed above  are all interesting and they’re all useful in a range of contexts, but they do seem rather advanced topics to me for a pre-university student and will be unfamiliar to a great many potential teachers of Applied Mathematics too. It may turn out, therefore, that the students will end up getting a very superficial knowledge of this very trendy subject, when they would actually be better off getting a more solid basis in more traditional mathematical methods  so I wonder what the reaction will be to this proposal!

## A Python Toolkit for Cosmology

Posted in The Universe and Stuff with tags , , , , on December 14, 2017 by telescoper

The programming language Python has established itself as the industry standard for researchers in physics and astronomy (as well as the many other fields, including most of those covered by the Data Innovation Research Institute which employs me part-time). It has also become the standard vehicle for teaching coding skills to undergraduates in many disciplines. In fact it looks like the first module I will be teaching in Maynooth next term is in Computational Physics, and that will be delivered using Python too. It’s been a while since I last did any significant hands-on programming, so this will provide me with a good refresher. The best way to learn something well is to have to teach it to others!

But I digress. This morning I noticed a paper by Benedikt Diemer on the arXiv with the title COLOSSUS: A python toolkit for cosmology, large-scale structure, and dark matter halos. Here is the abstract:

This paper introduces Colossus, a public, open-source python package for calculations related to cosmology, the large-scale structure of matter in the universe, and the properties of dark matter halos. The code is designed to be fast and easy to use, with a coherent, well-documented user interface. The cosmology module implements FLRW cosmologies including curvature, relativistic species, and different dark energy equations of state, and provides fast computations of the linear matter power spectrum, variance, and correlation function. The large-scale structure module is concerned with the properties of peaks in Gaussian random fields and halos in a statistical sense, including their peak height, peak curvature, halo bias, and mass function. The halo module deals with spherical overdensity radii and masses, density profiles, concentration, and the splashback radius. To facilitate the rapid exploration of these quantities, Colossus implements about 40 different fitting functions from the literature. I discuss the core routines in detail, with a particular emphasis on their accuracy. Colossus is available at bitbucket.org/bdiemer/colossus.

The software can be downloaded here. It looks a very useful package that includes code to calculate many of the bits and pieces used by cosmologists working on the theory of large-scale structure and galaxy evolution. It is also, I hope, an example of a trend towards greater use of open-source software, for which I congratulate the author! I think this is an important part of the campaign to create truly open science, as I blogged about here.

An important aspect of the way science works is that when a given individual or group publishes a result, it should be possible for others to reproduce it (or not, as the case may be). At present, this can’t always be done. In my own field of astrophysics/cosmology, for example, results in traditional scientific papers are often based on very complicated analyses of large data sets. This is increasingly the case in other fields too. A basic problem obviously arises when data are not made public. Fortunately in astrophysics these days researchers are pretty good at sharing their data, although this hasn’t always been the case.

However, even allowing open access to data doesn’t always solve the reproducibility problem. Often extensive numerical codes are needed to process the measurements and extract meaningful output. Without access to these pipeline codes it is impossible for a third party to check the path from input to output without writing their own version assuming that there is sufficient information to do that in the first place. That researchers should publish their software as well as their results is quite a controversial suggestion, but I think it’s the best practice for science. There isn’t a uniform policy in astrophysics and cosmology, but I sense that quite a few people out there agree with me. Cosmological numerical simulations, for example, can be performed by anyone with a sufficiently big computer using GADGET the source codes of which are freely available. Likewise, for CMB analysis, there is the excellent CAMB code, which can be downloaded at will; this is in a long tradition of openly available numerical codes, including CMBFAST and HealPix.

I suspect some researchers might be reluctant to share the codes they have written because they feel they won’t get sufficient credit for work done using them. I don’t think this is true, as researchers are generally very appreciative of such openness and publications describing the corresponding codes are generously cited. In any case I don’t think it’s appropriate to withhold such programs from the wider community, which prevents them being either scrutinized or extended as well as being used to further scientific research. In other words excessively proprietorial attitudes to data analysis software are detrimental to the spirit of open science.

Anyway, my views aren’t guaranteed to be representative of the community, so I’d like to ask for a quick show of hands via a poll…

…and you are of course welcome to comment via the usual box.

## Have you got a proper posterior?

Posted in Bad Statistics, The Universe and Stuff with tags , , , , on December 12, 2017 by telescoper

There’s an interesting paper on the arXiv today by Tak et al. with the title How proper are Bayesian models in the astronomical literature?’ The title isn’t all that appropriate, because the problem is not really with models’, but with the choice of prior (which should be implied by the model and other information known or assumed to be true). Moreover, I’m not sure whether the word Bayesian’ applies to the model in any meaningful way.

Anyway, The abstract is as follows:

The well-known Bayes theorem assumes that a posterior distribution is a probability distribution. However, the posterior distribution may no longer be a probability distribution if an improper prior distribution (non-probability measure) such as an unbounded uniform prior is used. Improper priors are often used in the astronomical literature to reflect on a lack of prior knowledge, but checking whether the resulting posterior is a probability distribution is sometimes neglected. It turns out that 24 articles out of 75 articles (32\%) published online in two renowned astronomy journals (ApJ and MNRAS) between Jan 1, 2017 and Oct 15, 2017 make use of Bayesian analyses without rigorously establishing posterior propriety. A disturbing aspect is that a Gibbs-type Markov chain Monte Carlo (MCMC) method can produce a seemingly reasonable posterior sample even when the posterior is not a probability distribution (Hobert and Casella, 1996). In such cases, researchers may erroneously make probabilistic inferences without noticing that the MCMC sample is from a non-existent probability distribution. We review why checking posterior propriety is fundamental in Bayesian analyses when improper priors are used and discuss how we can set up scientifically motivated proper priors to avoid the pitfalls of using improper priors.

This paper makes a point that I have wondered about on a number of occasions. One of the problems, in my opinion, is that astrophysicists don’t think enough about their choice of prior. An improper prior is basically a statement of ignorance about the result one expects in advance of incoming data. However, very often we know more than we think we do. I’ve lost track of the number of papers I’ve seen in which the authors blithely assume a flat prior when that makes no sense whatsoever on the basis of what information is available and, indeed, on the structure of the model within which the data are to be interpreted. I discuss a simple example here.

In my opinion the prior is not (as some frequentists contend) some kind of aberration. It plays a clear logical role in Bayesian inference. It can build into the analysis constraints that are implied by the choice of model framework. Even if it is used as a subjective statement of prejudice, the Bayesian approach at least requires one to put that prejudice on the table where it can be seen.

There are undoubtedly situations where we don’t know enough to assign a proper prior. That’s not necessarily a problem. Improper priors can – and do – lead to proper posterior distributions if (and it’s an important if) they include, or the  likelihood subsequently imposes, a cutoff on the prior space. The onus should be on the authors of a paper to show that their likelihood is such that it does this and produces a posterior which is well-defined probability measure (specifically that it is normalisable, ie can be made to integrate to unity). It seems that astronomers don’t always do this!

## A Blast from a Past Texas Symposium

Posted in Biographical, Brighton, The Universe and Stuff with tags , , , on December 7, 2017 by telescoper

I got into my office in Maynooth a little late this morning as I was moving some things into my new flat, the keys to which I duly received yesterday. I didn’t move in last night as I had already paid for last night’s accommodation in St Patrick’s College, as well as breakfast, so thought it was silly to waste my last night there.

It turned out to be a good decision. Breakfast is served in Putin Pugin Hall and on Thursdays the seminarians get a cooked breakfast. Normally guests are only entitled to a continental breakfast but since this was my last morning the friendly lady in charge said I could help myself to the full Irish. I have to say that the staff at St Patrick’s have been absolutely lovely – very friendly and helpful – so I was a little sad leaving, but it will be nice to settle into my own place.

Anyway, duly checked out, I came into the Department of Theoretical Physics and made myself a cup of tea. While I was waiting for the kettle I looked in the pile of books in the staff room and found this:

This is the proceedings of the 15th Texas Symposium on Relativistic Astrophysics, which was held in Brighton in December 1990 (just after I had left Sussex University for Queen Mary, London).  I did go back to Brighton from London for this, but actually don’t remember that much about it!  Twenty seven years is a long time!

Anyway, these meetings  are held every other year, sometimes in association with other meetings, e.g. the CERN-ESO Symposium in the case above, and there’s one going on right now, the 29th Texas Symposium in Cape Town, South Africa.

## WMAP wins the 2018 Breakthrough Prize for Fundamental Physics

Posted in The Universe and Stuff with tags , , , , on December 4, 2017 by telescoper

It’s very nice on a gloomy Monday morning to be able to share some exciting news and to congratulate so many friends and colleagues, for last night the 2018 Breakthrough Prize for Fundamental Physics was awarded to the team who worked on the Wilkinson Microwave Anisotropy Probe (WMAP). The citation reads:

For detailed maps of the early universe that greatly improved our knowledge of the evolution of the cosmos and the fluctuations that seeded the formation of galaxies.

The award, which is for the sizeable sum of \$3 Million, will be shared among the 27 members of the WMAP team whose names I list here in full (team leaders are in italics):

Chris Barnes; Rachel Bean; Charles Bennett; Olivier Doré; Joanna Dunkley,;Benjamin M. Gold; Michael Greason; Mark Halpern; Robert Hill, Gary F. Hinshaw, Norman Jarosik, Alan Kogut, Eiichiro Komatsu, David Larson, Michele Limon, Stephan S. Meyer, Michael R. Nolta, Nils Odegard, Lyman Page, Hiranya V. Peiris, Kendrick Smith, David N. Spergel, Greg S. Tucker, Licia Verde, Janet L. Weiland, Edward Wollack, and Edward L. (Ned) Wright.

I know quite a few of these people personally, including Hiranya, Licia, Eiichiro, Joanna, Olivier and Ned, so it’s a special pleasure to congratulate them – and the other members of the team – on this well-deserved award.

Don’t spend all the money in the same shop!

Posted in History, The Universe and Stuff with tags , , , on November 29, 2017 by telescoper

I stumbled across a little video on Youtube (via Twitter, which is where I get most of my leads these days) with the title Why is it Dark at Night? Here it is:

As a popular science exposition I think this is not bad at all, apart from one or two baffling statements, e.g. “..the Universe had a beginning, so there aren’t stars in every direction”.  A while  ago I posted a short piece about the history of cosmology which got some interesting comments, so I thought I’d try again with a little article I wrote a while ago on the subject of Olbers’ Paradox. This is discussed in almost every astronomy or cosmology textbook, but the resolution isn’t always made as clear as it might be.  Here is my discussion.

One of the most basic astronomical observations one can make, without even requiring a telescope, is that the night sky is dark. This fact is so familiar to us that we don’t imagine that it is difficult to explain, or that anything important can be deduced from it. But quite the reverse is true. The observed darkness of the sky at night was regarded for centuries by many outstanding intellects as a paradox that defied explanation: the so-called Olbers’ Paradox.

The starting point from which this paradox is developed is the assumption that the Universe is static, infinite, homogeneous, and Euclidean. Prior to twentieth century developments in observation (e.g. Hubble’s Law) and theory  (Cosmological Models based on General Relativity), all these assumptions would have appeared quite reasonable to most scientists. In such a Universe, the intensity of light received by an observer from a source falls off as the inverse square of the distance between the two. Consequently, more distant stars or galaxies appear fainter than nearby ones. A star infinitely far away would appear infinitely faint, which suggests that Olbers’ Paradox is avoided by the fact that distant stars (or galaxies) are simply too faint to be seen. But one has to be more careful than this.

Imagine, for simplicity, that all stars shine with the same brightness. Now divide the Universe into a series of narrow concentric spherical shells, in the manner of an onion. The light from each source within a shell of radius $r$  falls off as $r^{-2}$, but the number of sources increases as $r^{+2}$. Multiplying these together we find that every shell produces the same amount of light at the observer, regardless of the value of $r$.  Adding up the total light received from all the shells, therefore, produces an infinite answer.

In mathematical form, this is

$I = \int_{0}^{\infty} I(r) n dV = \int_{0}^{\infty} \frac{L}{4\pi r^2} 4\pi r^{2} n dr \rightarrow \infty$

where $L$ is the luminosity of a source, $n$ is the number density of sources and $I(r)$ is the intensity of radiation received from a source at distance $r$.

In fact the answer is not going to be infinite in practice because nearby stars will block out some of the light from stars behind them. But in any case the sky should be as bright as the surface of a star like the Sun, as each line of sight will eventually end on a star. This is emphatically not what is observed.

It might help to think of this in another way, by imagining yourself in a very large forest. You may be able to see some way through the gaps in the nearby trees, but if the forest is infinite every possible line of sight will end with a tree.

As is the case with many other famous names, this puzzle was not actually first discussed by Olbers. His discussion was published relatively recently, in 1826. In fact, Thomas Digges struggled with this problem as early as 1576. At that time, however, the mathematical technique of adding up the light from an infinite set of narrow shells, which relies on the differential calculus, was not known. Digges therefore simply concluded that distant sources must just be too faint to be seen and did not worry about the problem of the number of sources. Johannes Kepler was also interested in this problem, and in 1610 he suggested that the Universe must be finite in spatial extent. Edmund Halley (of cometary fame) also addressed the  issue about a century later, in 1720, but did not make significant progress. The first discussion which would nowadays be regarded as a  correct formulation of the problem was published in 1744, by Loys de Chéseaux. Unfortunately, his resolution was not correct either: he imagined that intervening space somehow absorbed the energy carried by light on its path from source to observer. Olbers himself came to a similar conclusion in the piece that forever associated his name with this cosmological conundrum.

Later students of this puzzle included Lord Kelvin, who speculated that the extra light may be absorbed by dust. This is no solution to the problem either because, while dust may initially simply absorb optical light, it would soon heat up and re-radiate the energy at infra-red wavelengths. There would still be a problem with the total amount of electromagnetic radiation reaching an observer. To be fair to Kelvin, however, at the time of his writing it was not known that heat and light were both forms of the same kind of energy and it was not obvious that they could be transformed into each other in this way.

To show how widely Olbers’ paradox was known in the nineteenth Century, it is worth also mentioning that Friedrich Engels, owner of a factory owner in Manchester (in the Midlands) and co-author with Karl Marx of the Communist Manifesto also considered it in his book The Dialectics of Nature, though the discussion is not particularly illuminating from a scientific point of view.

In fact, probably the first inklings of a correct resolution of the Olbers’ Paradox were contained not in a dry scientific paper, but in a prose poem entitled Eureka published in 1848 by Edgar Allan Poe. Poe’s astonishingly prescient argument is based on the realization that light travels with a finite speed. This in itself was not a new idea, as it was certainly known to Newton almost two centuries earlier. But Poe did understand its relevance to Olbers’ Paradox.  Light just arriving from distant sources must have set out a very long time ago; in order to receive light from them now, therefore, they had to be burning in the distant past. If the Universe has only lasted for a finite time then one can’t add shells out to infinite distances, but only as far as the distance given by the speed of light multiplied by the age of the Universe. In the days before scientific cosmology, many believed that the Universe had to be very young: the biblical account of the creation made it only a few thousand years old, so the problem was definitely avoided.

Of course, we are now familiar with the ideas that the Universe is expanding (and that light is consequently redshifted), that it may not be infinite, and that space may not be Euclidean. All these factors have to be taken into account when one calculates the brightness of the sky in different cosmological models. But the fundamental reason why the paradox is not a paradox does boil down to the finite lifetime, not necessarily of the Universe, but of the individual structures that can produce light. According to the theory Special Relativity, mass and energy are equivalent. If the density of matter is finite, so therefore is the amount of energy it can produce by nuclear reactions. Any object that burns matter to produce light can therefore only burn for a finite time before it fizzles out.

Imagine that the Universe really is infinite. For all the light from all the sources to arrive at an observer at the same time (i.e now) they would have to have been switched on at different times – those furthest away sending their light towards us long before those nearby had switched on. To make this work we would have to be in the centre of a carefully orchestrated series of luminous shells switching on an off in sequence in such a way that their light all reached us at the same time. This would not only put us  in a very special place in the Universe but also require the whole complicated scheme to be contrived to make our past light cone behave in this peculiar way.

With the advent of the Big Bang theory, cosmologists got used to the idea that all of matter was created at a finite time in the past anyway, so  Olber’s Paradox receives a decisive knockout blow, but it was already on the ropes long before the Big Bang came on the scene.

As a final remark, it is worth mentioning that although Olbers’ Paradox no longer stands as a paradox, the ideas behind it still form the basis of important cosmological tests. The brightness of the night sky may no longer be feared infinite, but there is still expected to be a measurable glow of background light produced by distant sources too faint to be seen individually. In principle,  in a given cosmological model and for given assumptions about how structure formation proceeded, one can calculate the integrated flux of light from all the sources that can be observed at the present time, taking into account the effects of redshift, spatial geometry and the formation history of sources. Once this is done, one can compare predicted light levels with observational limits on the background glow in certain wavebands which are now quite strict .

## Simplified Presentation

Posted in History, The Universe and Stuff, Uncategorized on November 24, 2017 by telescoper

This morning I was looking through my collection of old books about general relativity and related things, and found this page as part of a simplified presentation’:

I wonder if you can guess the name of author of the little book in which I found this page, and what it is a simplified presentation’ of?

The answer is on the front cover: