Pi Day once more!

In honour of Pi Day (March 14), the chart shows six ways of randomly selecting a point in a unit disc. Four of the methods are bad, for various reasons.

A. Midpoint of random p, q on circumference

p = (cos(𝜃1), sin(𝜃1)) is a point on the circumference

q = (cos(𝜃2), sin(𝜃2)) is another point on the circumference

x = ½ cos(𝜃1) + ½ cos(𝜃2) and

y = ½ sin(𝜃1) + ½ sin(𝜃2), for random 𝜃1 and 𝜃2, define their midpoint.

B. Random polar coordinates

x = r cos(𝜃)

and y = r sin(𝜃), for random angle 𝜃 and radius r ≤ 1. This gives choices biased towards the centre.

C. Random y, then restricted x

Random y, followed by random x in the range −√(1−y2) to √(1−y2). This gives choices biased towards the top and bottom.

D. Random point on chord in A

Similar to A, but x = a cos(𝜃1) + (1−a) cos(𝜃2)

and y = a sin(𝜃1) + (1−a) sin(𝜃2), for random 𝜃1 and 𝜃2 on the circumference of the circle and random a between 0 and 1. This gives choices biased towards the periphery.

E. Random polar with sqrt(r)

Similar to B, but x = √r cos(𝜃)

and y = √r sin(𝜃), for random angle 𝜃 and radius r. The square root operation makes the selection uniform across the disc.

F. Random x, y within disc

Random x and y, repeating the choice until x2 + y2 ≤ 1. This is uniform, and the selection condition restricts the final choice to the disc.

Oh, and here are some Pi Day activities.


The train crash in East Palestine, Ohio

A great deal has been written about the train derailment in East Palestine, Ohio. The preliminary NTSB report is one of the few solidly factual responses. One important question has been: what happens when vinyl chloride burns? Theoretically, in the presence of enough oxygen, you get this:

More realistically, based on the above reaction and this paper, you also get carbon monoxide, black soot (carbon), and traces of phosgene:

Why was it burned? Because vinyl chloride, if it gets too warm, can spontaneously polymerise into PVC plastic. That reaction is heat-producing and can lead to an explosion. Since the fire following the derailment had heated the rail cars containing vinyl chloride to dangerous levels, authorities believed an explosion was imminent. A controlled burn was probably a rational decision at the time.

Hydrogen chloride (HCl) in the smoke cloud was probably the immediate threat resulting from the controlled burn (and the likely cause of dead birds), although the HCl would soon have been safely diluted by rain. Unburned vinyl chloride in the subsoil is probably the longer-term threat, and (I understand) the focus of cleanup efforts.

Why did the train derail? This (somewhat fuzzy) map and chart is my best guess at a timeline. As the train travelled east, hotbox detectors (HBDs) noted increasing wheel bearing temperatures on car 23. Some media reports suggest flames of burning axle grease were seen in Columbiana, Ohio. The HBD at East Palestine noted a temperature of 253°F above ambient, higher than the railway company’s critical threshold. The crew immediately began to further slow the already slowing train, at which point the faulty wheel bearing on car 23 failed catastrophically, triggering the derailment and fire:

The map at database.defectdetector.net suggests that there used to be hotbox detector near Columbiana, Ohio (at MP 60.8), and this would presumably have caught the fault in time to avoid a derailment. One wonders what became of that HBD. It’s a pity that we need to wait 18 months for the NTSB’s final report.

Meanwhile, the EPA has put all their air, soil, and water testing results online.


The Austin airport incident

Above is a chart of altitude data for the recent near-miss of two aircraft at Austin-Bergstrom International Airport in Texas, involving a Southwest 737 and FedEx 767, which the NTSB is investigating. Data for the chart is from Flightradar24 (at 25 foot resolution, and not totally accurate because it is calculated from air pressure). See that link also for the story, or this tweet and this other tweet.

In the chart, the emergency go-around by the FedEx aircraft is obvious (it began about 5 seconds before minimum separation, when horizontal separation was about 650 feet). The temporary rise of Southwest to 25 feet appears to be an artifact. I estimate minimum separation as 187 feet. FedEx was about 0.58 nautical miles (1.08 km) away, on course to land, when Southwest started rolling.

The landing approach was CAT III ILS due to heavy fog. It seems to me that the clear-thinking FedEx pilots saved lives that day. A recording of the radio communication is here. Transcript is as follows (accurate to-the-second timestamps are not available):

  • FDX1432: Austin tower, FedEx 1432 heavy passing 5.4 for that CAT III ILS 18L.
  • Tower: FedEx 1432 heavy, Austin Tower, 18L RVR [Runway Visual Range] touchdown 1400, midpoint 600, rollout 1800, 18L cleared to land.
  • FDX1432: Cleared to land 18L, FedEx 1432 heavy.
  • SWA708: Tower, Southwest 708, we’re short of 18L and we’re ready.
  • Tower: Southwest 708, Austin Tower, runway 18L RVR 1200, midpoint 600, rollout 1600, fly heading 170, runway 18L, cleared for takeoff, traffic 3 mile final is a heavy 767.
  • SWA708: Okay, 170 cleared for takeoff, 18L, copy the traffic, Southwest 708.
  • FDX1432: Tower, confirm FedEx 1432 heavy is cleared to land on 18L [hearing the message to SWA708 and seeing a potential problem].
  • Tower: FedEx 1432 heavy that is affirmative, 18L you are cleared to land, traffic departing prior to your arrival is a 737.
  • FDX1432: Roger.
  • Tower: Southwest 708 confirm on the roll.
  • SWA708: Rolling now.
  • FDX1432: Southwest abort [seeing SWA708 on the runway in front of him at the limit of visibility in the fog].
  • FDX1432: FedEx is on the go [go-around].
  • Tower: Southwest 708, roger [apparently believing “abort” came from SWA708], you can turn right when able.
  • SWA708: Negative.
  • Tower: FedEx 1432, climb and maintain 3000 [feet], when able you can turn left heading 080.
  • FDX1432: Left turn to 080, 3000, FedEx 1432 heavy.
  • Tower: Southwest 708, you can turn left heading 170.

COVID-19 and Vitamin-D

The chart above shows national Covid mortality against latitude of national capitals (open circles are for the Southern Hemisphere, solid circles for the Northern). The trend line in blue has a correlation of 0.50 (with p < 10−13). Countries further away from the equator are definitely reporting more Covid deaths.

It is possible that these numbers reflect under-counting in the tropics (although this is unlikely for Singapore = SG) and over-counting in wealthier countries away from the tropics (e.g. by reporting deaths of patients with positive Covid tests as Covid deaths, even if the actual cause of death is unrelated). However, it seems unlikely that under-counting and over-counting can explain everything here.

This paper in The Lancet notes that “It has long been clear that groups that traditionally exhibit vitamin D deficiency or insufficiency, such as older adults and nursing home residents, and Black, Asian, and minority ethnic populations, are the same groups that have also been disproportionately impacted by COVID-19. Additionally, increased time spent indoors due to strict lockdowns and shielding triggered concerns that some people might not obtain the necessary physiological levels of vitamin D from sunlight.

My chart above is consistent with this: decreased sunshine away from the equator appears to increase Covid mortality, presumably due to vitamin D deficiency. This study in QJM notes, “vitamin D supplementation is effective in reducing COVID-19 severity. Hence vitamin D should be recommended as an adjuvant therapy for COVID-19.” Personally, I have been taking this advice for quite some time.


Are there more hurricanes nowadays?


Hurricane Ian approaches Florida (NOAA image)

Florida is counting the cost of Hurricane Ian (above). While we empathise with the people affected by this terrible tragedy, and wish them well, it’s appropriate for a science blog to reflect on what’s happening. The paper “Trends in Global Tropical Cyclone Activity: 1990–2021” by Philip J. Klotzbach, Kimberly M. Wood, Carl J. Schreck III, Steven G. Bowen, Christina M. Patricola, and Michael M. Bell (Geophysical Research Letters, 14 March 2022) is a good guide.

Klotzbach et al. find that global hurricane counts have in fact decreased since 1990. We are not seeing more hurricanes. Restricting attention to Category 4–5 hurricanes (see below) shows no significant change. This overall decrease seems to be driven by more frequent La Niña years, which are associated with fewer hurricanes in the huge Pacific Ocean, and more in the smaller North Atlantic Ocean, giving a reduced total.

Global damage has increased significantly, however, due to having more people and more infrastructure in hurricane-prone coastal areas. It seems difficult to stop people from moving to Florida to live, so there is a clear need to make buildings and infrastructure more hurricane-proof. This document from the government of Queensland (Australia) offers some useful tips for home construction.


Figure 3c from Klotzbach et al. Category 4–5 hurricanes in six tropical cyclone basins during 1990–2021.


Some thoughts on Roe

The hot topic at the moment is the recent “repeal” of Roe v. Wade by the US Supreme Court. This topic involves not only legal, but also moral, social, and scientific issues. This blog being a science blog, it’s appropriate to comment on the scientific issues here, and to that end I have produced the chart of human prenatal development above. Horizontal bars show fetal size on a logarithmic scale, and the two images are from Wikimedia and from USAID. Confusingly, two time scales are in regular use for prenatal development, one starting at the last menstrual period, and the other at fertilisation (around 2 weeks later). The chart shows both.

Roe v. Wade had, in fact, largely been overturned by Planned Parenthood v. Casey in 1992. The majority of people in the US (around 63%) believe that abortion should be legal in some cases but illegal in others (although views vary widely between demographic groups and from state to state). Roe v. Wade claimed a constitutional right to an abortion based on a constitutional right to privacy, and attempted to draw a cutoff for abortion legality based on the trimester of pregnancy:

  1. “For the stage prior to approximately the end of the first trimester, the abortion decision and its effectuation must be left to the medical judgment of the pregnant woman’s attending physician.
  2. “For the stage subsequent to approximately the end of the first trimester, the State, in promoting its interest in the health of the mother, may, if it chooses, regulate the abortion procedure in ways that are reasonably related to maternal health.
  3. “For the stage subsequent to viability the State, in promoting its interest in the potentiality of human life, may, if it chooses, regulate, and even proscribe, abortion except where necessary, in appropriate medical judgment, for the preservation of the life or health of the mother.”

Planned Parenthood v. Casey rejected both of these ideas, grounding a right to abortion instead in the due process clause of the 14th Amendment (“nor shall any State deprive any person of life, liberty, or property, without due process of law”), and drawing a new legal line solely based on viability (the age at which the unborn baby can survive outside the womb) rather than on “Roe’s rigid trimester framework.”


The Supreme Court of the United States: the Roberts Court

Viability has some appeal as a guideline, since many people consider it problematic to kill an unborn baby which could be delivered by caesarean and then cared for successfully in the neonatal intensive care unit down the hall. However, as the recent judgement by the Roberts Court in Dobbs v. Jackson Women’s Health Organization notes, viability “is heavily dependent on factors – such as medical advances and the availability of quality medical care – that have nothing to do with the characteristics of a fetus.” In fact, the viability threshold has been dropping at around a week per decade, sitting now at around 22 or 23 weeks (see the chart). Dobbs also took issue with the constitutional aspects of the decision in Casey, overturning it (and what was left of Roe), so that “the authority to regulate abortion is returned to the people and their elected representatives.” Some of “the people” have been very happy about this, while others have protested.

Another scientific (or rather, technological) issue relevant to the decision in Dobbs has been the widespread use of obstetric ultrasonography in the United States. Janelle Taylor notes that “the obstetrical exam has come to incorporate rituals of showing and telling and giving out pictures” (we have all seen them on Facebook). Such images have greatly influenced how the fetus is viewed by the population at large. Unsurprisingly, such images have also lent support to pro-life campaigners, since they give a very clear face to the unborn. This article in The Atlantic notes that “in recent years, pro-life activists have been more successful in using that tool [scientific evidence] to shift the terms of the policy debate.”

More complex has been the debate on whether the unborn human can feel pain. Even in adults, pain is complex, with two separate human pain systems, one more precisely localised, and the other more affective (it “hurts” more). No real scientific consensus currently exists on when a fetus can feel pain (indeed, how could you really prove a hypothesis here?). Various stages are reported in the literature, some as early as 14 weeks, and this literature has been heavily cited as part of the ethical debate on abortion. Other writers have, rather disturbingly, suggested that only adult human beings can truly feel pain. The debate in the US and elsewhere is ongoing.


Pi Day!

Pi Day is coming up again (3/14 as a US date). The number π is, of course, 3.14159265… Here are some possible activities for children:

  • Search for your birthday (or any other number) in the digits of π
  • Follow in the footsteps of Archimedes, showing that π is between 22/7 = 3.1429 and 223/71 = 3.1408.
  • Calculate 333/106 = 3.1415 and 355/113 = 3.1415929, which are better approximations than 22/7.
  • Measure the circumference and diameter of a round plate and divide. Use a ruler to measure the diameter and a strip of paper (afterwards measured with a ruler) for the circumference. For children who cannot yet divide, try to find a plate with diameter 7, 106, or 113.
  • Calculate π by measuring the area of a circle (most simply, with radius 10 or 100), using A = πr2. An easy way is to draw an appropriate circle on a sheet of graph paper.

You can also try estimating π using Buffon’s needle. You will need some toothpicks (or similar) of length k and some parallel lines (such as floorboards) a distance d apart (greater than or equal to k). Then the fraction of dropped toothpicks that touch or cross a line will be 2 k / (π d), or 2 / π if k = d. There is an explanation and simulator here (see also the picture below). And, of course, you can bake a celebratory pie and listen to Kate Bush singing π, mostly correctly!

This picture by McZusatz has 11 of 17 matches touching a line, suggesting the value of 2×17/11 = 3.1 for π (since k = d).

Actually, of course, π = 3.1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 … (digits in red are sung by Kate Bush, accurately, although some have said otherwise).


Six new solar cars

For solar car fans, here are six newly revealed cars. They will race at one or both of:

SCM  NL  Vattenfall Solar Team (Delft) 

Three-wheel (outrigger) challenger (new car: Nuna11) – this year will be the last year that Delft partners with Vattenfall. Starting in 2022, Brunel will be their main sponsor. They have been recruiting for the 2022 Sasol Solar Challenge, and will also race in Morocco. Their new car features an asymmetrical top surface (to create more downforce on the left wheel), a new motor cntroller (suitable for hills), and a LiFePO4 battery.


Credit (click image to zoom)

iESC  SCM  NL  Top Dutch Solar Racing 

Challenger (new car: Green Spirit) – they are hoping to race their new car in Morocco.


Credit (click image to zoom)

iESC  SCM  BE  Agoria Solar Team / KU Leuven 

Three-wheel (tadpole) challenger (new car: BluePoint Atlas) – they have built a new car to defend their title. It is named after the Atlas Mountains.


Credit (click image to zoom)

iESC  SCM  NL  Solar Team Twente 

Three-wheel (tadpole) challenger (new car: Red Horizon) – they have built a three-wheeler this year, and will race both at Zolder and in Morocco.


Credit (click image to zoom)

iESC  SCM  DE  Sonnenwagen Aachen 

Three-wheel (outrigger) challenger (new car: Covestro Photon) – this team did very well in 2019, in spite of being blown off the road. They are excited about racing at Zolder again. They will race 2 cars at Zolder: the new car (7) and the previous car (70).


Credit (click image to zoom)

iESC  TR  Solar Team Solaris (Dokuz Eylül University) 

Challenger (new car: S11) – they missed the last ESC, but hope to attend the next one with their new car.


Credit (click image to zoom)


Eurovision Song Contest and GDP

Following up on my previous post and the one before that, here is some more analysis of Eurovision Song Contest voting for this year. There are some interesting correlations between national tele-votes (not jury votes) and demographic variables, especially per capita GDP. As the map above shows, this is essentially a proxy for the northwest–southeast axis.

Iceland came 4th with the song 10 Years in spite of never actually competing; a positive COVID-19 test result restricted the band to their hotel; and they were judged based on a tape of their rehearsal performance. The richer Nordic countries seem to have been especially generous in this situation (see chart below).

Conversely, the winning song from Italy received generally lower tele-votes from the richer countries (I am not entirely sure why):

The song Je me casse from Malta came 7th overall. As with Iceland, the higher tele-votes came from the richer countries, although the pattern here is fuzzier than for Iceland. There are also some notable outliers: the Australian tele-vote of 8 for Malta probably reflects the 176,000 people of Maltese descent living in Australia.

Russia shows a pattern somewhat similar to Italy (p < 0.004, R2 = 22%), but this is simply because the former Soviet countries that vote for Russia are also the poorer ones. A better predictor can be obtained by counting Russian expatriates (p < 0.001, R2 = 44%).

And finally, here is a plot of tele-vote totals against jury vote totals. They differ substantially:


Eurovision Song Contest: More Analysis

Following up on my previous post, here is some more analysis of Eurovision Song Contest voting for this year. The maps above show a hierarchical clustering analysis on tele-voting (above) and jury voting (below), based on calculating simple Euclidean distance between vote vectors and on an assumption that countries would give themselves 12 points if they could. Some key differences between the four main clusters are highlighted in colour (note that Azerbaijan, Israel, the Netherlands, and the UK clustered alone or in a pair):

Tele-voting cluster 1 (green)

Countries: Australia, Belgium, Denmark, Estonia, Finland, Germany, Iceland, Ireland, Italy, Latvia, Lithuania, Malta, Norway, Poland, Sweden, and Ukraine.

Average votes:  Italy:  8, Iceland:  8, Ukraine:  8, Finland:  8, Lithuania:  8, France:  6, Switzerland:  4, Sweden:  4, Norway:  4, Malta:  2, Russia:  2, Serbia:  1, Belgium:  1, Albania:  1, Germany:  1, Greece:  0, Cyprus:  0, and Moldova:  0.

Tele-voting cluster 2 (purple)

Countries: Austria, Bulgaria, Croatia, North Macedonia, Serbia, Slovenia, Spain, and Switzerland.

Average votes:  Italy:  10, Serbia:  10, France:  8, Switzerland:  6, Ukraine:  6, Finland:  5, Iceland:  4, Russia:  2, Bulgaria:  2, Greece:  2, Azerbaijan:  2, Albania:  2, Spain:  2, Malta:  1, Lithuania:  1, Portugal:  1, Cyprus:  1, and Moldova:  0.

Tele-voting cluster 3 (red)

Countries: Albania, Czech Republic, France, Moldova, Portugal, and Romania.

Average votesMoldova:  10, Ukraine:  9, Italy:  8, France:  8, Switzerland:  6, Finland:  4, Greece:  4, Russia:  3, Portugal:  3, Iceland:  2, Sweden:  2, Albania:  2, Lithuania:  1, Bulgaria:  1, Israel:  1, Azerbaijan:  1, Serbia:  0, and Cyprus:  0.

Tele-voting cluster 4 (yellow)

Countries: Cyprus, Georgia, Greece, Russia, and San Marino.

Average votes:  Italy:  10, Greece:  9, Cyprus:  9, France:  7, Ukraine:  6, Finland:  4, Russia:  4, San Marino:  4, Lithuania:  3, Switzerland:  2, Bulgaria:  2, Moldova:  2, Azerbaijan:  2, Malta:  1, Albania:  1, Iceland:  0, and Serbia:  0.

Check out the disputed songs: Iceland: 10 Years, Lithuania: Discoteque, Serbia: Loco Loco, Moldova: Sugar, Greece: Last Dance, and Cyprus: El diablo.

The map below shows jury voting. For jury voting, there were only two substantial clusters (i.e. containing 4 or more countries – Albania, Malta, Romania, France, Israel, Norway, Sweden, Belgium, and Italy clustered alone or in small clusters of 2 or 3 countries).

Jury voting cluster 1 (purple)

Countries: Australia, Austria, Croatia, Czech, Denmark, Estonia, Finland, Georgia, Germany, Iceland, Ireland, Latvia, Lithuania, Netherlands, NM, Poland, Portugal, Serbia, Slovenia, Spain, Switzerland, Ukraine, and UK.

Average votesSwitzerland:  9, Iceland:  8, France:  7, Italy:  6, Malta:  4, Bulgaria:  4, Portugal:  4, Ukraine:  3, Finland:  3, Lithuania:  2, Russia:  2, Israel:  2, Belgium:  2, Greece:  1, Sweden:  1, Serbia:  1, Cyprus:  1, Azerbaijan:  1, San Marino:  1, Netherlands:  1, Spain:  1, Germany:  1, UK:  1, and Moldova:  0.

Jury voting cluster 2 (red)

Countries: Azerbaijan, Bulgaria, Cyprus, Greece, Moldova, Russia, and San Marino.

Average votesGreece:  9, Moldova:  8, Malta:  7, Bulgaria:  7, Italy:  6, France:  6, Russia:  6, Cyprus:  4, Azerbaijan:  4, San Marino:  3, Portugal:  2, Belgium:  2, Switzerland:  1, Iceland:  1, Ukraine:  1, Finland:  1, Lithuania:  1, Sweden:  1, Israel:  1, and Spain:  1.

Check out the disputed songs: Switzerland: Tout l’Univers, Iceland: 10 Years, Greece: Last Dance, and Moldova: Sugar