Friday, 29 May 2015

Operational Research, psychology and bus fares

Tina and I use the bus service of Devon to travel several times a month, sometimes when we shop in the city centre, sometimes when we want a walk and the bus is a convenient means of transport.  In the UK, there is a concessionary bus travel scheme, so that we have free passes on most bus services after 9:30am on weekdays and at any time at weekends. 

This is not the sort of bus that we use, in Devon or anywhere else. 
We were waiting for a bus in Somerset (county town Taunton) earlier this week, when we noticed an advert for the local service "go anywhere" tickets.  And we were fascinated by the prices charged.  Clearly, somebody had done some calculations about how to encourage bus use by making the offers attractive.  Behind the figures are some models and some adroit psychology.  So, here are the figures.

Go anywhere for one day: Adult £10, Child £5, Family (2 adults and as many children as the parents want to look after) £20
To interpret these a little more, no return bus fare in Somerset can exceed £7.50, even if the journey needs changes of bus service.  Within Taunton, return fares on one bus service cost £3 maximum.  And one needs to know that the bus services radiate outwards from Taunton

Go anywhere for one week: Adult £15, Child £7.50, Family £30
Go anywhere for one month: Adult £55, Child £27.50

So a go anywhere ticket for one day has been priced at less than the maximum of two return journeys.  It is likely to appeal to someone starting in Taunton who needs to make two or more journeys out of the county town, or to someone who likes bus rides.  The appeal to the holidaymaker or shopper is small; such a customer will probably only make one return trip per day ... but the price may encourage the faint-hearted to take the bus and save on fuel for a car and car-parking charges

But a go anywhere ticket for a week has been priced to encourage commuters and holidaymakers to use the buses.  Commuters (five days per week or less)  within Taunton will not get an advantage, but those from outside will do so.  Holidaymakers and shoppers will be able to use the bus service on two or more days and benefit (even more if fuel and car park charges are considered), and the family ticket has been priced to treat all sizes of family equally. 

The clientele for the go anywhere monthly ticket is likely to be regular users of the service, so the price has been set to give a small discount over the price of four weeks' weekly tickets.  Holidaymakers don't stay for four weeks.

How does the bus company benefit?  Once the bus timetable and route has been set, income from passengers is mostly marginal income.  The cost of running an empty bus from A to B is a little less than running a full one, so the company benefits from every ticket sold.  So it is in their interest to maximise the number of passengers, and offering incentives such as the weekly ticket, and (less so) the daily and monthly tickets, will increase the number of customers.
Nor is this a local bus in Devon or Somerset
I have identified three customer types: commuters, shoppers and holidaymakers and they have different behaviour and needs, and hence the psychology of charges will differ for them.  I wonder if there were three models (even mental models) or more?  However many, I salute "the buses of Somerset" for their work, their financial O.R. and their psychology.

Monday, 18 May 2015

Modelling a yacht race

English schoolchildren these days are assessed in examinations at the ages of 15-16 and 17-18, now known as GCSEs (General Certificate of Secondary Education) and "A"-levels.  In my youth I was examined by "O"-levels and "A"-levels (Ordinary and Advanced).  I remember very few aspects of these examinations  One exception is a question in mathematics, as it was thought-provoking.  "Assuming that a yacht's sail deflects the incoming wind as in a mirror, explain why the angle of the sail affects the speed of the yacht"  Quite obviously it was a matter of vectors of force from the wind against the sail and the resistance of the water on the hull.  But this question was different from the usual questions in books, where the forces were acting on idealised objects ("a pendulum on a rod of negligible mass ... ", "a perfectly smooth bead is on a wire ... ")

I hope that the examiner realised that this question would make the examinees pause and think, and allowed extra marks for the time that this might take; and I wonder if other students can remember the question so many years later.  (I have two other memories of that year's examinations - one that I realised ten minutes after a mathematics paper that I had subtracted 530 from 600 and got the answer 50;  the other that in a physics practical involving the cooling of water, I had poured my water away before measuring the volume - so I quickly measured the warm portion of the container, refilled it to the same depth with cold water and measured that, thus getting an answer which was "near enough".)

In the May issue of the Journal of the Operational Research Society, Robert Dalang, Frederic Dumas, Sylvain Sardy, Stephan Morgenthaler and Juan Vila describe how they modelled the forces acting on a racing yacht to determine the optimum course for that boat in the America's Cup races in 2007.  It was rather more sophisticated than my few lines on the "O"-level script in the 1960s. 

Stochastic optimization of sailing trajectories in an upwind regatta appears in the Journal of the Operational Research Society(2015) volume 66, pp 807–820,doi:10.1057/jors.2014.40 (abstract: In a sailboat race, the navigator’s attempts to plot the fastest possible course are hindered by shifty winds. We present mathematical models appropriate for this situation, which use statistical analysis of wind fluctuations and are amenable to stochastic optimization methods. We describe the decision tool that was developed and used in the 2007 America’s Cup race and its impact on the races.)

As the abstract points out, the winds are not constant in direction or strength.  Therefore, the model needs analysis of the past variation as well.  One simplification (realistic) was to model the first upwind leg of the race, as the yacht that leads at the first turn is likely to stay in the lead.  In the paper there are diagrams "Boat polars" which would have been useful in the "O"-level; they show the velocity of a selected boat in a wind of given speed and with the course set at a given bearing.  These lead to the optimal bearing for the wind speed.  The paper discusses tacking (changing the direction of the boat when going upwind) and the choice of whether to start on a left-hand tack or right-hand tack.  And then this feeds into an optimisation model which uses a discrete space for the progress of the yacht.  

Boat polars for a given speed of wind showing (on the right) the optimal course to maximise speed against the wind (from the cited paper)

All well-worth reading.  Towards the end of the paper there is a wistful comment:
Given that the Swiss team implemented our strategy software into their onboard computer system, trained to use it, and finally actually won the 2007 America’s Cup race, we can consider that stochastic optimization techniques were useful to the team. However, since a typical team’s budget is on the order of 100 million dollars, it is clear that a team of a few mathematicians only makes a small contribution to the overall effort.

With hindsight, how much should the mathematicians (O.R. scientists) have charged for their services?

Thursday, 7 May 2015

Comparing apples with oranges

Long ago, teaching a course on the statistics of surveys, I reminded my classes, repeatedly, that they should make sure that the comparisons that they made between results were rigorous.  If not, the saying goes, you are in danger of "comparing apples with oranges".  The point is that the underlying populations, and the measurements on them, should be comparable.  Apples and oranges are different fruits, grown in different countries, and their agriculture is different.  So, to be ridiculous, one could not measure the cost of producing one orange with the cost  of producing one apple, because one could not grow oranges in an apple orchard and vice versa.

So, today, an advert on a bus in Exeter caught my eye.  "More people see bus advertisements than use social media daily".  Apples=People see an advert on a bus in the course of ... how long?  The text suggests "in a day".  Oranges=People using social media daily.  Measurement in both cases=total number. 

My interest was aroused.  Not everyone who sees an advert on a bus will read it.  Very few will have gone out of their homes saying "I really must read a bus advertisement today".  But people are purposeful when they use social media.  Measurements on apples are not measurements on oranges.  I managed to find estimates of the number of daily users of social media in the UK.  It is roughly 20 million but may be as high as 25 million.  So how many people see a bus - let alone a bus advert - daily?  Guesstimating that number suggested that a figure between 15 and 25 million would be about right, knowing the population of the UK, and the working population who would be commuting and might see a bus.  So the two numbers are in the same ballpark - if the bus advert figure is for daily sightings. 

That was when my search found the website of the company making the claim.  There I found the claim:
30 million people have seen advertising on the outside of a Bus in the last week  - See more at:
30 million people have seen advertising on the outside of a Bus in the last week  - See more at:

 30 million people have seen advertising on the outside of a Bus in the last week

Aha!  the time scale for apples is now a week.  (And why write "Bus" with a capital "B"?)  My guesstimate is reasonable, since one can assume that in seven days, some people will see adverts on several days, while others will see them on one.

I hope the thousands or millions who see the advert that I saw this morning will recognise that you can't compare random exposure to an advert on a bus in one week with purposeful use of social media.  If they don't, then they shouldn't be entrusted with buying apples; they might buy oranges, or grapes, or tomatoes!
30 million people have seen advertising on the outside of a Bus in the last week  - See more at:
30 million people have seen advertising on the outside of a Bus in the last week  - See more at:
30 million people have seen advertising on the outside of a Bus in the last week  - See more at:
30 million people have seen advertising on the outside of a Bus in the last week  - See more at: