Chaitanya's Random Pages

December 31, 2013

Large day to day temperature increases for Melbourne

Filed under: climate and weather — ckrao @ 4:07 am

Recently Melbourne has had a few recent unusually large maximum temperature increases from one day to the next, and I wanted to see how often this occurs. For example this year the city weather station had maximums of 19.8°C and 31°C on Nov 30 and Dec 1, 26.9°C and 39.9°C on Dec 18-19, 22.4°C and 36.5°C (Dec 27-28), and 25.5°C and 40.8°C (Jan 16-17). Similarly large decreases in temperature are more frequent due to cold fronts sweeping south-eastern Australia.

The following analysis was carried out with data from Australia’s Bureau of Meteorology.

Firstly, the following boxplot illustrates the distribution of maximum temperature differences from one day to the next. In the summer months large increases occur more frequently than I had expected. (To interpret a box plot, the thick black line represents the median, the red boxes span the quartiles and the dashed lines extend 1.5 times the interquartile range in both directions. Outliers beyond this range are plotted separately.)

boxplot_tempdiffs

One data point that immediately stands out is at top left of the graph – it seems that in 1900 there was an increase from a maximum of 15.1°C to 40.3°C on 15-16 January 1900! This appears too large to be plausible.

As expected the temperature differences are negatively skewed in each month (lower tail fatter than the upper tail), with skewness values tabulated below.

JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC
-0.37 -0.59 -0.46 -0.51 -0.37 -0.07 -0.09 -0.40 -0.52 -0.46 -0.43 -0.42

Zooming in on the warmer months December-March we have the following histograms showing the fatter lower tail. However the upper tail is larger than I had anticipated.

summer_tempdiff_histograms

Here are answers to some questions I had posed regarding this data.

How often is the maximum temperature above 30°C after failing to reach 20°C the previous day?

This has happened on average 1.2 times per year in Melbourne with frequency-by-month shown below.

JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC Total
35 16 20 2 0 0 0 0 0 13 59 53 198

There have in fact been 13 occasions (6 in January, 4 in November) where the maximum was above 35°C after being less than 20°C the previous day. This happened most recently in 1983 (35.0°C on 25/1 after 19.4°C on 24/1).

How often is the maximum temperature above 40°C after failing to reach 25°C the previous day?

This has happened 25 times (14 in January) with 24.4°C and 44.7°C on 9-10 Jan 1939, and 24.1°C and 43.3°C (23-24 Dec 1868) being two of the bigger increases. Most recently we had maximums of 24.2°C and 40.8°C on 15-16 Jan 2007. Melbourne has experienced 203 40+ days in the 159 years of records.

How often is there a day-to-day increase of at least 15°C?

This has happened on average 0.8 times per year in Melbourne, about half the time in January as shown below.

JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC Total
62 19 5 0 0 0 0 0 0 0 13 31 130

 

Finally, listed below are some notable events.

  • The days 8-13 January 1939 (the 13th was Black Friday) had maximum temperatures of 43.1, 24.4, 44.7, 33.5, 25.6 and 45.6°C respectively, hence containing two 20-degree increases! The only other 20-degree increase was the anomalous 15.1°C to 40.3°C jump from 15-16 January 1900 mentioned earlier.
  • 9-10 Jan 1877: 19.7°C and 38.1°C
  • 9-10 Jan 1882: 19.9°C and 37.1°C
  • 26-28 Feb 1865 had maximum temperatures of 20.3, 39.7 then back to 19.9°C.
  • 1-3 Mar 1893 had maximum temperatures of 23.0, 40.8 then back to 22.1°C.
  • 4-5 Apr 1888: 17.9°C and 30.1°C, the biggest increase in April
  • 29-30 Oct 1919: 20.1°C and 34.7°C, the biggest increase in October
  • 13-14 Nov 1878: 22.3°C and 39.4°C, the biggest increase in November
  • 23-24 Dec 1868: 24.1°C and 43.3°C (mentioned earlier)
  • 15-16 Dec 1897 : 22.3°C and 41.7°C
Advertisements

December 25, 2013

The binomial theorem for non-positive-integer indices

Filed under: mathematics — ckrao @ 9:16 pm

If n is a positive integer, the expansion of (x+y)^n has each term being a product of n variables of the form x^k y^{n-k} where k ranges from 0 to n. The coefficient of x^k y^{n-k} is precisely the number of ways we can choose k of the n variables to be x, which is \binom{n}{k}. Hence we have the binomial theorem:

\displaystyle (x+y)^n = \sum_{k=0}^n \binom{n}{k} x^k y^{n-k}. \quad \quad(1)

But what if n is not a positive integer? This post is about how we extend this formula and why it still holds. Interestingly the same formula holds with minor modifications. Firstly we change the upper limit of the sum to infinity – the sum will then only converge in particular circumstances. Secondly we extend the definition of the binomial coefficient to complex values of n via \binom{n}{k} := \frac{n(n-1)\ldots (n-k+1)}{k!}.

Note that if x is a complex number then x^k is defined for any non-negative integer k – we simply do repeated multiplication, and define x^0 = 1 (even for x = 0). However a non-integer power of a complex number is not straightforward to define unless the number is a positive real. If x > 0 we can define x^n := \exp(n \alpha) where \alpha is the unique real solution to \exp(\alpha) = x. Extending the definition to other complex numbers leads to issues with multifunctions or discontinuities (e.g. (-1)^{1/2} could be one of two values i or -i). Hence we are going to restrict ourselves to the case x and y real.

While the term x^k is fine, we need to take care with y^{n-k} if n is no longer an integer. Hence we shall restrict ourselves to non-negative y. The binomial theorem is valid when y = 0 so consider y > 0. When does the infinite series converge? By the ratio test, the sum \sum_{k=0}^{\infty}a_k converges if the limit of |a_{k+1}|/|a_k| converges to a number less than 1 as k \rightarrow \infty. (The sum does not converge if the limit is greater than 1 and if the limit either does not converge or is equal to 1, then the test is inconclusive.) Applying this test to our case of a_k = \binom{n}{k} x^k y^{n-k} gives us

\begin{aligned}\frac{|a_{k+1}|}{|a_k|} &= \frac{n(n-1)\ldots (n-(k+1)+1) x^{k+1}y^{n-(k+1)}}{(k+1)!} \frac{k!}{n(n-1)\ldots (n-k+1) x^k y^{n-k}}&= \frac{|n-k|}{k+1}\frac{|x|}{y}. \end{aligned}

This has limit less than 1 as k \rightarrow \infty provided |x| < y. We can thus state the following.

If n is a complex number, x is real, y is positive  and |x| < y, then the sum \displaystyle\sum_{k=0}^{\infty} \binom{n}{k} x^k y^{n-k} converges.

The reason this sum is equal to (x+y)^n is a consequence of the Taylor series expansion of (1+x)^n about x = 0 and the fact that the identity \displaystyle (x+y)^n = y^n (x/y + 1)^n is valid when y > 0. Also note that the condition |x| < y implies x+y > 0 so (x+y)^n is well defined.

We can also use a differential equations approach to proving this. Fix y and consider \displaystyle f(x) =\sum_{k=0}^{\infty} \binom{n}{k} x^k y^{n-k} as a power series in x valid for |x| < y. The power series is differentiable term by term within this interval of convergence and so

\displaystyle f'(x) = \sum_{k=1}^{\infty} \binom{n}{k} k x^{k-1}y^{n-k}. \quad \quad (2)

We may also write this as

\begin{aligned} f'(x) &=\sum_{j=0}^{\infty} \binom{n}{j+1} (j+1) x^{j}y^{n-(j+1)}\\ &= \sum_{j=0}^{\infty} \frac{n(n-1)\ldots (n-j) (j+1) x^{j }y^{n-(j+1)}}{(j+1)!}\\ &= \sum_{k=0}^{\infty} \binom{n}{k} (n-k) x^{k}y^{n-k-1}.\quad \quad (3) \end{aligned}

Adding x times (2) to y times (3),

\begin{aligned} (x + y)f'(x) &= \sum_{k=0}^{\infty} \binom{n}{k} k x^{k}y^{n-k} + \sum_{k=0}^{\infty} \binom{n}{k} (n-k) x^{k}y^{n-k}\\ &= n \sum_{k=0}^{\infty}x^{k}y^{n-k}\\ &= nf(x). \quad\quad (4)\end{aligned}

Hence by (4)

\begin{aligned} d/dx [(x+y)^{-n} f(x) ] &= (x+y)^{-n} f'(x) -n (x+y)^{-n-1} f(x)\\ &= (x+y)^{-n-1} [(x+y) f'(x) - nf(x)]\\ &= 0,\end{aligned}

so we deduce that (x+y)^{-n} f(x) is constant. For x=0 this is y^{-n} f(0) = y^{-n}y^n = 1, and we conclude that f(x) = (x+y)^n.  Summarising, we have the following result.

If n is a complex number, x is real, y is positive  and |x| < y, then

\displaystyle (x+y)^n = \sum_{k=0}^{\infty} \binom{n}{k} x^k y^{n-k}.

A particularly attractive special case of this formula is for y=1, n = -1/2 and x replaced with -x:

\begin{aligned} \frac{1}{\sqrt{1-x}} &= \sum_{k=0}^{\infty} \binom{-1/2}{k} (-x)^k \\&= \sum_{k=0}^{\infty} \frac{(-1/2)(-3/2)\ldots (-1/2 - k + 1)}{k!} (-x)^k\\ &= \sum_{k=0}^{\infty} (-1)^k \frac{(1)(3)(5)\ldots (2k-1)}{k!}\frac{(-x)^k}{2^k}\\ &= \sum_{k=0}^{\infty} \frac{(2k)!}{(2)(4)\ldots (2k) k!}\frac{x^k}{2^k}\\ &= \sum_{k=0}^{\infty} \frac{(2k)!}{k! k!} \frac{x^k}{4^k} \\ &= \sum_{k=0}^{\infty} \binom{2k}{k} \frac{x^k}{4^k}, \quad |x| < 1.\end{aligned}

References/Further reading

Blog at WordPress.com.

%d bloggers like this: