Pretty maths

Bear with this post as it goes through some equations at the beginning, but it is worth it. We’ll be doing some of the calculations to get this picture:

Mandel_zoom_00_mandelbrot_set
The Mandelbrot Set

This is the set of numbers “c” such that {\displaystyle z_{n+1}=z_{n}^{2}+c} is bounded. These z are complex numbers, which we’ll ignore for now. It is much easier to understand if we look at some examples:

Let’s say c = -1.

We start with 

This is repeating, and the numbers are bounded.

 

Let’s now try c = 0.5.

We start with 

We can see that these numbers are getting bigger and bigger, and it is not bounded.

One more: c=-1.9

It bounces around a lot, never getting very big or very small, so it is bounded. It is kinda fun to sit with a calculator and try this.

Mathematicians call this kind of system “chaos”, as it is very sensitive to the starting conditions. Sometimes this is called the butterfly effect. Note that chaotic is not the same as random: in chaotic systems if you know everything about the initial conditions you know what will happen, whereas in random systems even if you knew everything about the initial conditions you wouldn’t know what was going to happen.

Benoit Mandelbrot was one of the first mathematicians to have access to a computer. Hopefully you can also see now why Benoit Mandelbrot needed a computer to work these out. He repeated this for lots of values of c. The pretty picture we started with is really a plot of the set of c (called the Mandelbrot set), where the colours indicate what happens to the sequence (eg how quickly it converges, if it does).

Mandelbrot Set with Axes

 

You can zoom into the colourised picture to see how complex this is here. Lots of people (me included) think it is pretty cool. It is really worth taking a look to appreciate the complexity.

Other than being pretty, why does this matter?

Stepping back: This picture is made from the formula {\displaystyle z_{n+1}=z_{n}^{2}+c}. This is so simple, and yet gives rise to infinite complexity. In the words of Jonathan Coulton,

Infinite complexity can be defined by simple rules

Benoit Mandelbrot went on to apply this to the behaviour of economic markets, among other things. Later people have applied this to fluid dynamics (video), medicine, engineering, and many other areas. Apparently there is even a Society for Chaos Theory in Psychology & Life Sciences..!

Further reading

This article is good for more explanation of the maths.

Apologies to any Pure mathematicians for the simplifications in this article.

 

The oldest profession?

Apologies for the late sharing last week, the integration between WordPress and Linkedin/Facebook was more login-dependent than I realised! I hope you managed to catch up when it was shared on Tuesday instead.

And-now

Accounting

As a novice small business owner, one of the first things I did was find an accountant, so I could make sure I was legally compliant and not doing anything silly in terms of the way I was doing my finances. I am not an accountant, so clearly the contents of this blog does not constitute advice, may be incorrect, relates to UK specifically, and is for general interest only :p.

I visited a local accountancy practice, who did a free 1hr no-commitment consultation. This was useful in terms of answering my immediate questions, which were around how to extract money from the company and how to not-mess-up dealing with “The Taxman”. This materialised as questions like:

  • Should I pay myself a salary?
  • Should I register for VAT?
  • How should I do “expenses”?

The answers to these were:

  • Salary yourself as little as you can afford, and as soon as you start paying yourself ensure it is at least the minimum wage. Once you start paying yourself, you will have to do this monthly and tell HMRC (Her Majesty’s Revenue and Customs) about it. HMRC  are the tax department of government in the UK.
  • VAT register as late as possible (since it requires yet more paperwork) unless you have big capital expenditure (which I don’t). You only have to VAT register after something like £83,000 turnover.
  • Expenses should make things look obviously like the legitimate business expenses they are, so it doesn’t matter too much whether it is paid on a company bank card or on personal bank card, as long as you keep it all logically separate. The problem is when you buy something using entirely company money and use it for non-company things.

I decided, as part of my ever-continuing education, to complete my first set of accounts myself (with a little help).  As a result of this, I also learned:

  1. Accountants are charging a lot for what are simple activities once you know how to do them. For me, from scratch, it took about a day to put together my first set of accounts. My local accountant was charging over £500 for the same thing (which I guess would take them much less than half the time it took me).
  2. There are lots of tricks to legitimately avoid paying tax, which can be found on online forums or by paying accountants (if you are interested in reducing tax payment).
  3. Micro-entity accounts really do make things easy for very small companies, since they don’t ask for too much detail. [1]
  4. The “government gateway” website, which links nicely with Companies House, is actually pretty usable.
  5. Double-entry bookkeeping is almost a millennia old, the oldest complete set coming from the Republic of Genoa in 1340 [2]. Accounting itself may be from around 5000BC, pre-dating even money as Babylonians used it to keep track of livestock.
  6. It is definitely worth copying someone else’s spreadsheets (google or ask around) for cashbook, expenses and accounts templates.
  7. Little bit of lean: I’m now getting some sense of “flow” from my expenses. When I get home after a day out on business, I get all my receipts and (before I even have a cup of tea) I put them into my expenses spreadsheet, numbering and filing each receipt. Not only does this mean I get it “Done” and remove the activity of finding  and sorting receipts, but it means that I don’t dread spending hours once every few months doing expenses.

I’m really glad to have done a set of accounts so I know how it works, and if I decide to pay an accountant to do it in future I will know what I’m paying for. Overall I’d say doing this once is a highly recommended experience, much like having a vaccination.

tl;dr; Accounting is pedantic but not hard.

 

[1] https://www.gov.uk/annual-accounts/microentities-small-and-dormant-companies

[2] https://en.wikipedia.org/wiki/History_of_accounting

Should I buy wine?

Orley Ashenfelter, an economist at Princeton, wanted to guess the prices that different vintages of Bordeaux wine would have. This prediction would be most useful at the time of picking, so that investors can buy the young wine and allow it to come of age. In his own words:

The goal in this paper is to study how the price of mature wines may be predicted from data available when the grapes are picked, and then to explore the effect that this has on the initial and final prices of the wines.

For those of you not so au-fait with wine, prices vary a lot. At auction in 1991, a dozen bottles from Lafite vineyard were bought for:

  • $649 for a 1964 vintage
  • $190 for a 1965 vintage
  • $1274 for a 1966 vintage

Wines from the same location can vary by a factor of 10 between different years. Before Ashenfelter’s paper, people predicted wine quality by experts, who tasted the wine and then guessed how good it would be in future. Ashenfelter’s great achievement was to bring some simple science to this otherwise untapped field (no pun intended).

He started by using the things that were “common knowledge”: in particular that weather affects quality and thus selling price. He checked this by looking at the historical data:

In general, high quality vintages for Bordeaux wines correspond to the years in which August and September are dry, the growing season is warm, and the previous winter has been wet.

Ashenfelter showed that 80% of price variation could be down to weather, and the remaining 20% down to age. With the given inputs, the model he built was:

log(Price) = Constant + 0.238 x Age + 0.616 x Average growing season temperature (April-September) -0.00386 x August rainfall + 0.001173 x Prior rainfall (October-March)

As it turned out, this simple model was better at guessing quality than the “wine expert”: a success for science against pure intuition. The smart part of his approach was getting insight in to the things people felt mattered (weather) and checking that wisdom. Here, he showed that yes it is quite appropriate to use weather and age to model wine prices.

Through the age variable, it also gives an average 2-3% annual return on investment [1] (note this is pre-2008 so is unlikely to behave like this today[2]).

Should I buy wine? Quite possibly, as long as I don’t drink it all.

 

Source: http://www.wine-economics.org/workingpapers/AAWE_WP04.pdf

[1] http://onlinelibrary.wiley.com/doi/10.1111/j.1468-0297.2008.02148.x/abstract

[2] http://www.wineinvestmentfund.com/latest-figures/performance-glance.aspx

Keep it lean

I spent last week with a friend, trying to help him spring clean his house. He’s been struggling with feeling overwhelmed with all the complexities of life, and wanted some external help.

“Being lean” isn’t reading a book. “Being lean” is “being lean”. [1]

Key principles to articulate:

  • Limit work in progress – e.g. do one thing at a time
  • Make it visual – e.g. through a physical board and colourful post-its
  • Keep inventory small – e.g. don’t waste time writing out the 50 things you wish were doing already, just write down the first 5 and crack on
  • Sustainability is important – both in terms of pace and what happens after you (the trainer) are gone

You’ll notice the above are all “for example” rather than “this is exactly how you must do it.” As a coach, and as a mathematician,  I don’t care how you do it, I care that it is smart. And the above principles are either psychologically or mathematically sensible. This is also why the role of Scrum Master does not make sense, but Agile Coach perhaps does.

Cue Kanban board!

williamkanban
Low budget Kanban board

Especially with novices, this doesn’t need to take very long. As you can see, the above has been assembled (by the trainee) using a cereal box. It is very important the trainee does it themselves, so they feel ownership.

Contrary to popular belief, smaller is better. Small tasks make it feel more sustainable, and help give more endorphins as you move to “Done” more frequently. Just like a production line, which is where Kanban was famously popularised. [2]

Supporting others in their lean journey is about giving them tools, not doing things for them. If your friend wants their house clean, it might help in the short term to clean their house for them: but it will just get dirty again. The essence of this is something like “Give a man a fish and you feed him for a day, teach a man to fish and you feed him for a lifetime”, and it extends further to “Why are you eating fish?” and “Have you thought about farming?”

It is much smarter to give them the ability and motivation to clean it themselves, and techniques and motivation to keep it up once it is in a reasonable state. Better still is to give them the broader desire and ability to reflect more fully, to understand why this matters to them and how it helps them on a deep level (psychologically, spiritually, philosophically, e.t.c.) Or maybe it doesn’t and they shouldn’t be prioritising doing it.

Motivation is key. Without it, there would be nothing done. As a coach, your role is about inspiring more than anything else. If you can build a sustainable flame in someone, they can easily google the rest.

 

[1] https://xkcd.com/703/

[2] http://www.toyota-global.com/company/vision_philosophy/toyota_production_system/just-in-time.html