Archive for the ‘Random’ Category

How popular is Russia in the UK?

June 4, 2017

favour1

We are sometimes asked how popular Russia is among people in Britain.

In 2015, Chatham House reported results from surveys in 2012 and 2014 asking respondents which countries they felt especially favourable and unfavourable towards.   Above, we derive an overall favourability score from (favourable – unfacourable) , take the average of  this 2012 and 2014 and plot it against the change between the two dates.

We see that Russia is out on its own in terms of being unpopular and becoming more so, followed at a respectful distance by Israel.  This is presumably due to a series of notable events in this period: BP, Pussy Riot, Greenpeace, Ukraine, none of which were well received.

Interestingly enough, a BBC poll of about the same period of attitudes to different states in a sample of 22 countries showed Russia as among the least popular but without the same deterioration.

Stationary points of f(x)=x+√x

June 4, 2017
fx

The curves in the pic are f(x) and f'(x).

Question: The function is f(x)=x+√x. Can you find its min or max value? If you calculate f'(x) and put it to 0, you get x=1/4. But draw the curve and there is no such max/min there.

One suggestion:   Clearly f'(x) has two asymptotes at x=0 and y=1 and so can never be 0 for any real value of x. But why does differentiating lead to the result x=1/4? I agree that f(x) = x-√x has a clear minimum there, but it’s a different function. My answer was that since there’s an infinity at x=0 f'(x) is undefined, but I’m not convinced that’s the answer.

OK, so √x is defined as the positive value of x^(1/2).

Let’s see if we can differentiate it:

x = √x√x  where x, √x >= 0.

D(x)  = 1 = 2√x*D(x) => D(x) = 1/(2√x)

So, f'(x) = 1 + 1/(2√x)

if f'(x) =0, then √x = -1/2.  But √x is >= 0 by definition, so there is no solution.

Let’s try to be a little more systematic while staying within the bounds of high school maths.

We consider the function  g(x,c) = x + x^(1/2)

where x^(1/2) = (√x)*(-1)^c

and we choose c to be either 0 or 1.

So g'(x) = 1 + (1/2√x)*(-1)^c

Setting g'(x) = 0 =>

√x = (-1/2)*(-1)^c

But since  √x is positive, c must be 1 rather than 0 for this to have a solution.

So by accepting a solution here we force the original function to be g(x) = x – √x.

 

Jane Austen’s estate

March 5, 2017
austen

There’s more going on here than agreement of verb with subject

A visit to the Jane Austen House Museum in Chawton raised some interesting questions, and not only about English grammar.

If there is a valid point being made in the picture above, I think it’s the corollary of the one stated: Due to her writings, she had some money of her own at a time when women generally didn’t. I wonder what Cassandra did with it? How much it was in today’s terms is an almost completely meaningless question–between £ 50,000 and £ 3,000,000 perhaps according to measuringworth.com.

In Capital in the Twenty-First Century Thomas Piketty states:  In Great Britain, the average income was on [sic] the order of 30 pounds a year in the early 1800s, when Jane Austen wrote her novels….She knew that to live comfortably and elegantly, secure proper transportation and clothing, eat well, and find amusement and a necessary minimum of domestic servants, one needed–by her lights–at least twenty to thirty times that much. The characters in her novels consider themselves free from need only if they dispose of incomes from 500 to 1,000 pounds a year.

So on that basis Jane Austen’s lifetime earnings of £ 800 wouldn’t have got her very far.  If she had bought land with the normal rental yield of 4-5% that would have given her the average and deeply insufficient annual income of £ 30-£ 40.  But the question is what the marginal cost of an unmarried sister or maiden aunt would have been–once you had the house, carriage, servants etc the marginal cost of an extra household member may have been comparatively small.

While it is true that nowadays many of us would be penniless without our jobs, Piketty’s point is that in Jane Austen’s day you might make 5x average income from a job or profession or even writing novels if the French didn’t pirate them, but it wasn’t enough–you needed to own lots of land or seize bling from the French like her brothers Charles and Francis, both of whom became admirals.

Too few and too many–I outsmart myself

February 8, 2017

tyneside

The quiz questions about this street somewhere around Heaton were:

So can you see why this street has to be:

i) in the North generally?

ii) not on Merseyside?

iii) specifically on Tyneside?

with the intended answers:

i) many burglar alarms

ii) not enough burglar alarms

iii) two front doors per ‘house’–these look like terrace houses but were built as upstairs and downstairs flats (rather than being converted) and are known as ‘Tynesiders’.

But I may have outsmarted myself there–this also looks like what’s called an ‘avenue’ locally, which means that there’s just pavement (perhaps some flowerbeds too) out the front and vehicle access is up the back alley…

More about lost sleep

January 3, 2017

sleep1

Following the earlier study,  our client has now produced some further data covering three weeks’ holiday, with results as shown above.  We suspect that the slightly anomalous results for Sunday are indeed due to there only being three observations.  The mean amount of sleep per night is 6:32 for the Work period and 7:08 for the Holiday period.

So there is some difference, but hardly enough to say that the client is compelled to give up work.  He will have to make his own decision, which is rarely a popular piece of advice…

 

Were it not that I have bad dreams…

December 1, 2016

sleep

A middle-aged bureaucrat has collected data on his sleep pattern for 29 weeks or so. He works 4 days a week (not Wednesdays) and wants to know whether these data should impel him towards early retirement.  We can see from the above that the prospect of going back to work on Monday and Thursday causes some lack of sleep.

Table of sleep data

  Mon Tue Wed Thu Fri Sat Sun
Mean 06:25 07:10 05:12 06:52 07:40 07:07 05:00
N 29 29 29 29 29 28 28
Min 01:00 03:00 02:00 04:00 05:00 05:00 00:00
Max 08:30 09:00 07:30 09:00 10:00 12:00 07:00
Q1 06:00 06:30 05:00 06:00 06:30 06:52 04:30
Q2 06:30 07:30 05:30 07:00 07:30 07:15 05:45
Q3 07:30 08:00 06:00 07:30 08:00 08:07 06:30
StDev 01:27 01:29 01:19 01:07 01:07 01:26 01:35

The overall mean is 06:29, while results here indicate an average of 06:50 for those aged 40-55.  The difference is hardly large, but in the other hand the justified expectation of sleeping poorly tw0 nights a week is not something one would wish to continue indefinitely.

We presume that there are essentially two possible explanations for the smaller amount of sleep on Sunday and Tuesday nights:  apprehension and having to get up early/change in routine.  If it was purely a case of the latter, we would expect the effect to be greater on a Sunday night since there are two days of changed routine to account for as against one on a Wednesday night.  But in fact there is no significant difference between the means for Wednesday and Sunday, so we presume apprehension is playing a role here.

Our preliminary recommendation would be for the client to collect the same data for a substantial period of leave so as to establish how far the results above deviate from the natural pattern.  And here it is!

Not enemies, not judges, not so neat…

November 7, 2016

enemies3

Meanwhile, the exhibit above has been brought to our attention.

Well, no.

It says ‘Traitors to the people, expelled from the German national community.’

The men are leaders of the German Social-Democratic Party.

Mit der Dummheit kämpfen Götter selbst vergebens.

An enigmatic pipe fitting

July 25, 2016

IMG_1899[1]

At first I thought the problem was just that this thing (whatever it might be) had  come off the soil pipe (as I suppose it is) at the back of the house.

IMG_1898[1]
But it turned out to be split.  In fact, the whole point of the iron thing in the middle was to rust and make it split.

IMG_1902[1]

Since neither Wickes nor B&Q nor two hardware stores in Lewisham had anything at all similar, it was a case of bodging up a job with plumbers’ putty:

IMG_1903[1]

Further investigation shows no sign of such a thing on the Internet. Maybe it doesn’t exist. Certainly the self-splitting pipe fitting doresn’t sound like such a good idea…

Some resources on written communication

July 22, 2016

Words

George Orwell very wisely says the following:

What is above all needed is to let the meaning choose the word, and not the other way around. In prose, the worst thing one can do with words is surrender to them. When you think of a concrete object, you think wordlessly, and then, if you want to describe the thing you have been visualizing you probably hunt about until you find the exact words that seem to fit it. When you think of something abstract you are more inclined to use words from the start, and unless you make a conscious effort to prevent it, the existing dialect will come rushing in and do the job for you, at the expense of blurring or even changing your meaning. Probably it is better to put off using words as long as possible and get one’s meaning as clear as one can through pictures and sensations. Afterward one can choose — not simply accept — the phrases that will best cover the meaning, and then switch round and decide what impressions one’s words are likely to make on another person. This last effort of the mind cuts out all stale or mixed images, all prefabricated phrases, needless repetitions, and humbug and vagueness generally. But one can often be in doubt about the effect of a word or a phrase, and one needs rules that one can rely on when instinct fails. I think the following rules will cover most cases:

(i) Never use a metaphor, simile, or other figure of speech which you are used to seeing in print.

(ii) Never use a long word where a short one will do.

(iii) If it is possible to cut a word out, always cut it out.

(iv) Never use the passive where you can use the active.

(v) Never use a foreign phrase, a scientific word, or a jargon word if you can think of an everyday English equivalent.

(vi) Break any of these rules sooner than say anything outright barbarous.

The general principle also applies to expressing yourself in a foreign language.  Starting from English words will very rarely do-you need to see what it is you want to say, and then the words (constructions, grammar) will find themselves.

The Plain English people have followed up with some similar guidance here.  You can see how well you have followed these rules by using a readability checker.

If you want to write about statistics (numbers, etc), the ONS have produced some guidance here.  They also have Effective Tables and Graphs  guidance, and it’s good.

Checking grammar

Word-processors will of course check grammar and spelling for you.  There are also tools online, such as onlinecorrection or SpellCheckPlus.  The latter  will indeed query hypercorrection along the lines of in case of trouble, please speak to John or I.

Style analysers

These can be quite fun.  Among others, there are expresso, textalyser and hemingwayapp, which is rather good.

On a more overtly fun level, you can play with I write like (Orwell writes like Orwell; most text ends up being ascribed to David Foster Wallace if it mentions anything modern or H.P. Lovecraft).  Or you can try Gender Guesser, where Orwell comes out as Weak MALE Weak emphasis could indicate European.

Presentation

There is some advice here that usefully balances more technology-driven approaches.  In fact, it almost comes down to handing round a paper with a few relevant charts and graphs.

Where next for Pro Bono OR?

May 25, 2016

chart2

In view of the success of the UK Operational Research Society’s Pro Bono Scheme, which links OR professionals with charities to their mutual benefit, participants in the upcoming European OR Conference will be keen to learn which of their countries it can most easily be expanded to.

In an attempt to answer this question, the chart above shows a measure of the penetration of Operational Research in each country (the number of members of the national OR Society per million population) against a measure of the importance of the charitable sector in that country (the percentage of the population claiming to have given money to charity over the past four weeks), for those European countries where both data items are available.  Clearly one would be looking for countries with a large charitable sector and a high penetration of Operational Research.

The UK is in the lead on both indicators, followed at a respectful distance by the normal suspects in North-Western Europe together with Croatia and Slovenia.  The fact that Norway/Sweden, Germany/Austria/Switzerland and Hungary/Czech Republic are all very close to each other gives us some hope that we are actually measuring something real here.

Whether one can implement such a scheme successfully probably depends on having some central body that can make it happen, and it is nor clear that other European countries have an infrastructure comparable to the UK Operational Research Society.  Even more importantly perhaps, one needs a driving force who is determined to make the thing happen in the first place.

With regard to the variables employed, membership of national OR societies is probably a reasonable measure of the penetration of OR in particular countries, and it would be hard to find anything else without a great deal of effort.  As ever in international comparisons, the size of the charity sector is subject to definitional problems, for example where you have churches funded out of taxes (as in Germany) or charities contracted on a large scale to carry out what would otherwise be functions of the State (as in the US or the UK).

Data on OR Society membership comes from the EURO website, while that on population is from Wikipedia.  Data on donations comes from the CAF World Giving Index 2015.