## Yellow Stars, Red Stars and Bayesian Inference

Posted in The Universe and Stuff, Bad Statistics with tags , , , , , , on May 25, 2017 by telescoper

I came across a paper on the arXiv yesterday with the title Why do we find ourselves around a yellow star instead of a red star?’.  Here’s the abstract:

M-dwarf stars are more abundant than G-dwarf stars, so our position as observers on a planet orbiting a G-dwarf raises questions about the suitability of other stellar types for supporting life. If we consider ourselves as typical, in the anthropic sense that our environment is probably a typical one for conscious observers, then we are led to the conclusion that planets orbiting in the habitable zone of G-dwarf stars should be the best place for conscious life to develop. But such a conclusion neglects the possibility that K-dwarfs or M-dwarfs could provide more numerous sites for life to develop, both now and in the future. In this paper we analyze this problem through Bayesian inference to demonstrate that our occurrence around a G-dwarf might be a slight statistical anomaly, but only the sort of chance event that we expect to occur regularly. Even if M-dwarfs provide more numerous habitable planets today and in the future, we still expect mid G- to early K-dwarfs stars to be the most likely place for observers like ourselves. This suggests that observers with similar cognitive capabilities as us are most likely to be found at the present time and place, rather than in the future or around much smaller stars.

Athough astrobiology is not really my province,  I was intrigued enough to read on, until I came to the following paragraph in which the authors attempt to explain how Bayesian Inference works:

We approach this problem through the framework of Bayesian inference. As an example, consider a fair coin that is tossed three times in a row. Suppose that all three tosses turn up Heads. Can we conclude from this experiment that the coin must be weighted? In fact, we can still maintain our hypothesis that the coin is fair because the chances of getting three Heads in a row is 1/8. Many events with a probability of 1/8 occur every day, and so we should not be concerned about an event like this indicating that our initial assumptions are flawed. However, if we were to flip the same coin 70 times in a row with all 70 turning up Heads, we would readily conclude that the experiment is fixed. This is because the probability of flipping 70 Heads in a row is about 10-22, which is an exceedingly unlikely event that has probably never happened in the history of the universe. This
informal description of Bayesian inference provides a way to assess the probability of a hypothesis in light of new evidence.

Obviously I agree with the statement right at the end that Bayesian inference provides a way to assess the probability of a hypothesis in light of new evidence’. That’s certainly what Bayesian inference does, but this `informal description’ is really a frequentist rather than a Bayesian argument, in that it only mentions the probability of given outcomes not the probability of different hypotheses…

Anyway, I was so unconvinced by this description’ that I stopped reading at that point and went and did something else. Since I didn’t finish the paper I won’t comment on the conclusions, although I am more than usually sceptical. You might disagree of course, so read the paper yourself and form your own opinion! For me, it goes in the file marked Bad Statistics!

## Still Thinking of Applying for a PhD Place in Physics or Astronomy?

Posted in Education with tags , , , , , , on January 9, 2017 by telescoper

Last term I gave a short talk to interested students within the School of Physics & Astronomy here at Cardiff University about postgraduate research in which I aimed to pass on some, hopefully useful,  information about how to go about applying for PhDs  in Physics  and Astronomy. Since the time is rapidly approaching when applications need to be sent in, I thought I’d repeat here a few general remarks that might be useful to people elsewhere who are thinking of taking the plunge when they graduate. I’m aiming this primarily at UK students applying for places in the UK; special considerations apply for students wanting to do graduate research abroad.

What is a PhD? The answer to that is relatively easy; it’s a postgraduate research degree. In order to obtain a PhD you have to present a thesis like that shown on the left (which happens to be mine, vintage 1988), typically in the range 100-250  pages long. A thesis has to satisfy two conditions for the award of the degree: it should contain original research, which is publishable in an academic journal; and it should present a coherent discussion of that original work within the context of ongoing work in the area of study. In Physics & Astronomy, the PhD is pretty much a prerequisite for any career in academic research, and it usually takes between 3 and 4 years to complete. After submission of the thesis you will have to undergo a viva voce examination conducted by two examiners, one internal and one external. This is quite a tough test, which  can last anywhere between about 2 and about 6 hours, during which you can be asked  detailed questions about your research and wide-ranging questions about the general area.

The Money Side. In the UK most PhDs are supported financially by the research councils, either EPSRC (most physics) or STFC (nuclear & particle physics, astronomy). These generally award quotas of studentships to departments who distribute them to students they admit. A studentship will cover your fees and pay a stipend, currently £14296 pa. That doesn’t sound like a lot, but you should at least remember that it is a stipend rather than a wage; it is therefore not taxed and there is no national insurance payable. There is a fee (currently £4121) payable for a PhD course, but that only comes into play if you are planning to fund yourself. If you receive a studentship it will normally cover the fee as an additional component. What I mean by that is you don’t need to pay it out of the stipend, it is separate. In top of that, research council funding also supplies a Research Training Grant which covers, e.g., travel and small items of equipment so you don’t need to pay for those out of your stipend either.

How do I choose a PhD? During the course of a postgraduate degree you are expected to become an expert in the area in which you specialize. In particular you should reach the point where you know more about that specific topic than your supervisor does. You will therefore have to work quite a lot on your own, which means you need determination, stamina and enthusiasm. In my view the most important criterion in your choice of PhD is not the institution where you might study but the project. You need to be genuinely excited by the topic in order to drive yourself to keep through the frustrations (of which there will be many). So, find an area that interests you and find the departments that do active research in that area by looking on the web. Check out the recent publications by staff in each department, to ensure that they are active and to have something to talk about at interview!

Qualifications. Most universities have a formal requirement that candidates for admission to the PhD should have a “good honours degree”, which basically means at least an Upper Second Class Honours degree. Some areas are more competitive than others, however, and in many disciplines you will find you are competing with a great many applicants with First Class degrees.

How to apply successfully. The application procedure at most universities is quite simple and can be done online. You will need to say something about the area in which you wish to do research (e.g. experiment/theory, and particular field, e.g. cosmology or star formation). You’ll also need a CV and a couple of references. Given the competition, it’s essential that you prepare. Give your curriculum vitae some attention, and get other people (e.g. your personal tutor) to help you improve it. It’s worth emphasizing particular skills (e.g. computing). If you get the chance, make use of your summer vacations by taking on an internship or other opportunity to get a taste of research; things like that will undoubtedly give your CV an edge.

The Interview. Good applicants will be invited for an interview, which is primarily to assess whether you have the necessary skills and determination, but also to match applicants to projects and supervisors. Prepare for your interview! You will almost certainly be asked to talk about your final-year project, so it will come across very badly if you’re not ready when they ask you. Most importantly, mug up about your chosen field. You will look really silly if you haven’t the vaguest idea of what’s going on in the area you claimed to be interested in when you wrote your  application!

How many places should I apply for? Some research areas are more fashionable than others so the level of competition varies with field. As a general rule I would advise applying for about half-a-dozen places, chosen because they offer research in the right area. Apply to fewer than that and you might lose out to the competition. Apply to many more and you might not have time to attend the interviews.

What’s the timetable?  Most applications come in early in the new year for entry to the PhD in the following September/October. The Christmas break is therefore a pretty good time to get your applications sorted out. Interviews are normally held in February or March, and decisions made by late March. STFC runs a deadline system whereby departments can not force students to accept or decline offers before the end of March, so there should be ample time to visit all your prospective departments before having to make any decisions.

That’s all I can think of for now. I hope at least some of these comments are useful to undergraduates anywhere in the UK thinking of applying for a PhD. If there are any further questions, please feel free to ask through the comments box. Likewise if I’ve missed anything important, please feel free to suggest additions in the same manner…

## Bullying and Sexual Harassment at CSIRO

Posted in Uncategorized with tags , , , on November 22, 2016 by telescoper

No sooner has the deluge of emails I’ve been receiving about the Case of Bode versus Mundell started to dry up when I hear about another alarming story revolving around sexual harassment in Astronomy.

This time the revelations concern the Commonwealth Scientific and Industrial Research Organization (CSIRO), the federal government agency for scientific research in Australia, and specifically relate the organization’s handling of  numerous instances of  sexual harassment and bullying that have driven several female astronomers out of the organization’s Division of Astronomy and Space Science (CASS). You can listen here listen to a radio programme about this that was broadcast last Sunday on the Australian station ABC. It’s not an easy thing to listen to, but I urge you to make the effort.

Once again one of the key issues raised by this is that of confidentiality. As outlined by the official response from CASS, there are indeed very good reasons for respecting confidentiality:

To make details of our individual investigations public, we could prevent people from coming forward in the future or we could lead to situations of trial by the public or media without full information or a proper process.

Fair enough, but confidentiality cuts both ways. Once again I quote the official response:

Around 200 people on average work in the astronomy and space science business unit. In the past 8 years we have had 16 formal allegations of inappropriate behaviour within this business unit. The cases varied in their degree of seriousness and all of the allegations were investigated. Three of the allegations were of a sexual nature, with two of these three allegations upheld.

Two cases of alleged inappropriate behaviour per year for eight years seems rather a lot for a unit of this size. Granted that isn’t known how many of those are genuine, but in my view even one case is one case too many. However, what is really worrying is that two of the allegations that were “of a sexual nature” were upheld but the outcomes of these investigations were not made known to staff in CASS. I’m all for confidentiality and due process, but if one thing is going to stop people “coming forward in the future” it’s the perception that nothing will be done if they do. There just has to be a better way of dealing with misconduct allegations than what CSIRO (and all organizations) I’ve worked in do now. I hope we’re past the stage of denying that there is a problem. The question is how to make things better.

I’ve thought a lot about this since I blogged about the Bode versus Mundell case (here and here). We should all agree that we need to strive to create working environments wherein harassment and bullying simply do not happen, but sadly they do and until that changes we need to find ways of dealing with the perpetrators fairly but firmly and promptly.

I have two concrete suggestions to make.

The first is that organizations of a sufficient size to bear the cost should have independent misconduct investigators rather than relying on staff from the same workplace. This role could even be fulfilled by someone from a different organization altogether. Universities, for example, could set up a shared resource to deal with this kind of thing. Such a move would avoid any perceived conflict of interest but, more importantly, a dedicated investigator could carry out the work much more quickly than a senior academic who is busy with many other things.

The other suggestion is that confidentiality agreements covering disciplinary should become void if an employee leaves the institution, whether that is as a result of dismissal or because they leave before investigations are completed. That would put an end to the game of “pass the harasser”.

There are probably serious problems with both these suggestions and I’d be happy to take criticism through the comments box below.

## Thinking of Applying for a PhD Place in Physics or Astronomy?

Posted in Education with tags , , , , , , on October 12, 2016 by telescoper

This morning I am to give a short talk to interested students within the School of Physics & Astronomy here at Cardiff University about postgraduate research in which I aim to pass on some, hopefully useful,  information about how to go about applying for PhDs  in Physics  and Astronomy. Since I’ve finished writing the talk more than the usual few minutes before I have to deliver it, I thought I’d jot down here a few general remarks that might be useful to people elsewhere who are thinking of taking the plunge when they graduate. I’m aiming this primarily at UK students applying for places in the UK; special considerations apply for students wanting to do graduate research abroad.

What is a PhD? The answer to that is relatively easy; it’s a postgraduate research degree. In order to obtain a PhD you have to present a thesis like that shown on the left (which happens to be mine, vintage 1988), typically in the range 100-250  pages long. A thesis has to satisfy two conditions for the award of the degree: it should contain original research, which is publishable in an academic journal; and it should present a coherent discussion of that original work within the context of ongoing work in the area of study. In Physics & Astronomy, the PhD is pretty much a prerequisite for any career in academic research, and it usually takes between 3 and 4 years to complete. After submission of the thesis you will have to undergo a viva voce examination conducted by two examiners, one internal and one external. This is quite a tough test, which  can last anywhere between about 2 and about 6 hours, during which you can be asked  detailed questions about your research and wide-ranging questions about the general area.

The Money Side. In the UK most PhDs are supported financially by the research councils, either EPSRC (most physics) or STFC (nuclear & particle physics, astronomy). These generally award quotas of studentships to departments who distribute them to students they admit. A studentship will cover your fees and pay a stipend, currently £14296 pa. That doesn’t sound like a lot, but you should at least remember that it is a stipend rather than a wage; it is therefore not taxed and there is no national insurance payable. There is a fee (currently £4121) payable for a PhD course, but that only comes into play if you are planning to fund yourself. If you receive a studentship it will normally cover the fee as an additional component. What I mean by that is you don’t need to pay it out of the stipend, it is separate. In top of that, research council funding also supplies a Research Training Grant which covers, e.g., travel and small items of equipment so you don’t need to pay for those out of your stipend either.

How do I choose a PhD? During the course of a postgraduate degree you are expected to become an expert in the area in which you specialize. In particular you should reach the point where you know more about that specific topic than your supervisor does. You will therefore have to work quite a lot on your own, which means you need determination, stamina and enthusiasm. In my view the most important criterion in your choice of PhD is not the institution where you might study but the project. You need to be genuinely excited by the topic in order to drive yourself to keep through the frustrations (of which there will be many). So, find an area that interests you and find the departments that do active research in that area by looking on the web. Check out the recent publications by staff in each department, to ensure that they are active and to have something to talk about at interview!

Qualifications. Most universities have a formal requirement that candidates for admission to the PhD should have a “good honours degree”, which basically means at least an Upper Second Class Honours degree. Some areas are more competitive than others, however, and in many disciplines you will find you are competing with a great many applicants with First Class degrees.

How to apply successfully. The application procedure at most universities is quite simple and can be done online. You will need to say something about the area in which you wish to do research (e.g. experiment/theory, and particular field, e.g. cosmology or star formation). You’ll also need a CV and a couple of references. Given the competition, it’s essential that you prepare. Give your curriculum vitae some attention, and get other people (e.g. your personal tutor) to help you improve it. It’s worth emphasizing particular skills (e.g. computing). If you get the chance, make use of your summer vacations by taking on an internship or other opportunity to get a taste of research; things like that will undoubtedly give your CV an edge.

The Interview. Good applicants will be invited for an interview, which is primarily to assess whether you have the necessary skills and determination, but also to match applicants to projects and supervisors. Prepare for your interview! You will almost certainly be asked to talk about your final-year project, so it will come across very badly if you’re not ready when they ask you. Most importantly, mug up about your chosen field. You will look really silly if you haven’t the vaguest idea of what’s going on in the area you claimed to be interested in when you wrote your  application!

How many places should I apply for? Some research areas are more fashionable than others so the level of competition varies with field. As a general rule I would advise applying for about half-a-dozen places, chosen because they offer research in the right area. Apply to fewer than that and you might lose out to the competition. Apply to many more and you might not have time to attend the interviews.

What’s the timetable?  Most applications come in early in the new year for entry to the PhD in the following September/October. The Christmas break is therefore a pretty good time to get your applications sorted out. Interviews are normally held in February or March, and decisions made by late March. STFC runs a deadline system whereby departments can not force students to accept or decline offers before the end of March, so there should be ample time to visit all your prospective departments before having to make any decisions.

That’s all I can think of for now. I hope at least some of these comments are useful to undergraduates anywhere in the UK thinking of applying for a PhD. If there are any further questions, please feel free to ask through the comments box. Likewise if I’ve missed anything important, please feel free to suggest additions in the same manner…

## Gaia’s First Data Release!

Posted in The Universe and Stuff with tags , , , on September 14, 2016 by telescoper

It seems like only yesterday that I was blogging excitedly about the imminent launch of the European Space Agency’s Gaia Mission. In fact it was almost three years ago – 1000 days to be precise – and today the world of astronomy is a-flutter with excitement because we’ve just seen the first release of data from the mission. You can find an overview with links to all the yummy data here. I can’t resist pointing out the adoption of a rigorously Bayesian method for dealing with partial or incomplete data when a full astrometric solution is not possible due to insufficient observations. If you want to go straight to the data archive you go here or you could try one of the other data centres listed here. It’s great that all this data is being made freely available, but this is only the first set of data. It’s just a hint of what the mission overall will achieve.

If you would prefer some less technical background to the mission have a look here.

Here’s a summary (courtesy of ESA) of what Gaia has achieved so far:

There’s much more to Gaia than pictures, but here’s the first map of the sky  it produced:

I remember first hearing about Gaia about 15 years ago when I was on a PPARC advisory panel and was immediately amazed  by the ambition of its objectives. As I mentioned above, Gaia is a global space astrometry mission, which will make the largest, most precise three-dimensional map of our Galaxy by surveying more than a billion stars; DR1 is really just a taster as the measurements will become more complete and more accurate as the mission continues.

In some sense Gaia is the descendant of the Hipparcos mission launched in 1989, but it’s very much more than that. Gaia monitors each of its target stars about 70 times over a five-year period. It is expected to discover hundreds of thousands of new celestial objects, such as extra-solar planets and brown dwarfs, and observe hundreds of thousands of asteroids within our own Solar System. The mission is also expected to yield a wide variety of other benefits, including new tests of the  General Theory of Relativity.

Gaia will created an extraordinarily precise three-dimensional map of more than a thousand million stars throughout our Galaxy (The Milky Way) and beyond, mapping their motion, luminosity, temperature and chemical composition as well as any changes in such properties. This huge stellar census will provide the data needed to tackle an enormous range of important problems related to the origin, structure and evolutionary history of our Galaxy. Gaia will do all this by repeatedly measuring the positions of all objects down to an apparent magnitude of 20. A billion stars is about 1% of the entire stellar population of the Milky Way.

For the brighter objects, i.e. those brighter than magnitude 15, Gaia  measures their positions to an accuracy of 24 microarcseconds, comparable to measuring the diameter of a human hair at a distance of 1000 km. Distances of relatively nearby stars are measured to an accuracy of 0.001%. Even stars near the Galactic Centre, some 30,000 light-years away, have their distances measured to within an accuracy of 20%.

It’s an astonishing mission that will leave an unbelievably rich legacy not only for the astronomers working on the front-line operations of Gaia but for generations to come.

## The Distribution of Cauchy

Posted in Bad Statistics, The Universe and Stuff with tags , , , , , on April 6, 2016 by telescoper

Back into the swing of teaching after a short break, I have been doing some lectures this week about complex analysis to theoretical physics students. The name of a brilliant French mathematician called Augustin Louis Cauchy (1789-1857) crops up very regularly in this branch of mathematics, e.g. in the Cauchy integral formula and the Cauchy-Riemann conditions, which reminded me of some old jottings aI made about the Cauchy distribution, which I never used in the publication to which they related, so I thought I’d just quickly pop the main idea on here in the hope that some amongst you might find it interesting and/or amusing.

What sparked this off is that the simplest cosmological models (including the particular one we now call the standard model) assume that the primordial density fluctuations we see imprinted in the pattern of temperature fluctuations in the cosmic microwave background and which we think gave rise to the large-scale structure of the Universe through the action of gravitational instability, were distributed according to Gaussian statistics (as predicted by the simplest versions of the inflationary universe theory).  Departures from Gaussianity would therefore, if found, yield important clues about physics beyond the standard model.

Cosmology isn’t the only place where Gaussian (normal) statistics apply. In fact they arise  fairly generically,  in circumstances where variation results from the linear superposition of independent influences, by virtue of the Central Limit Theorem. Thermal noise in experimental detectors is often treated as following Gaussian statistics, for example.

The Gaussian distribution has some nice properties that make it possible to place meaningful bounds on the statistical accuracy of measurements made in the presence of Gaussian fluctuations. For example, we all know that the margin of error of the determination of the mean value of a quantity from a sample of size $n$ independent Gaussian-dsitributed varies as $1/\sqrt{n}$; the larger the sample, the more accurately the global mean can be known. In the cosmological context this is basically why mapping a larger volume of space can lead, for instance, to a more accurate determination of the overall mean density of matter in the Universe.

However, although the Gaussian assumption often applies it doesn’t always apply, so if we want to think about non-Gaussian effects we have to think also about how well we can do statistical inference if we don’t have Gaussianity to rely on.

That’s why I was playing around with the peculiarities of the Cauchy distribution. This distribution comes up in a variety of real physics problems so it isn’t an artificially pathological case. Imagine you have two independent variables $X$ and $Y$ each of which has a Gaussian distribution with zero mean and unit variance. The ratio $Z=X/Y$ has a probability density function of the form

$p(z)=\frac{1}{\pi(1+z^2)}$,

which is a Cauchy distribution. There’s nothing at all wrong with this as a distribution – it’s not singular anywhere and integrates to unity as a pdf should. However, it does have a peculiar property that none of its moments is finite, not even the mean value!

Following on from this property is the fact that Cauchy-distributed quantities violate the Central Limit Theorem. If we take $n$ independent Gaussian variables then the distribution of sum $X_1+X_2 + \ldots X_n$ has the normal form, but this is also true (for large enough $n$) for the sum of $n$ independent variables having any distribution as long as it has finite variance.

The Cauchy distribution has infinite variance so the distribution of the sum of independent Cauchy-distributed quantities $Z_1+Z_2 + \ldots Z_n$ doesn’t tend to a Gaussian. In fact the distribution of the sum of any number of  independent Cauchy variates is itself a Cauchy distribution. Moreover the distribution of the mean of a sample of size $n$ does not depend on $n$ for Cauchy variates. This means that making a larger sample doesn’t reduce the margin of error on the mean value!

This was essentially the point I made in a previous post about the dangers of using standard statistical techniques – which usually involve the Gaussian assumption – to distributions of quantities formed as ratios.

We cosmologists should be grateful that we don’t seem to live in a Universe whose fluctuations are governed by Cauchy, rather than (nearly) Gaussian, statistics. Measuring more of the Universe wouldn’t be any use in determining its global properties as we’d always be dominated by cosmic variance

## Preparing for a PhD Interview in Physics

Posted in Biographical, Education, The Universe and Stuff with tags , , , on February 1, 2016 by telescoper

The other day I was chatting to a group of our 4th-year MPhys students about the process for applying  (and hopefully being interviewed) for a PhD. This is the time when students in the UK have started to apply and are awaiting decisions on whether they have to go for an interview. Final decisions are usually made by the end of March so those with interviews have a busy couple of months coming up.

I actually quite enjoy doing PhD interviews, because that involves giving excellent young scientists their first step on the ladder towards a research career. I’m sure it’s not so pleasant for the candidates though. Nerves sometimes get the better of the students in these interviews, but experienced interviewers can calibrate for that. And if you’re nervous, it means that you care…