Call Windows Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, 14 March 2011

There's always one...

Posted on 09:10 by Unknown
It's impossible not to anthropomorphise. It's not just the guy hanging. It's the ones on either side looking down quizzically.


This picture is cropped from the wonderful item #50D1-5830 by Hideta Nagai, whose View Finder Photography website has some spectacular shots.
Read More
Posted in birds | No comments

Sunday, 13 March 2011

FractalLab

Posted on 15:33 by Unknown

Okay, here's a compelling reason to upgrade my browser to one that supports WebGL:


FractalLab

Read More
Posted in fractals, mathematics | No comments

Coincidence!

Posted on 14:03 by Unknown
I've only recently started this intermittent blog, and a few days ago I sent off an email to a friend, notifying him of its existence. We haven't communicated for a few months, so it was amusing to get back the response:
(interesting stuff about stuff ....)
Hey, I was in the middle of this when YOUR e-mail came in! Telepathy?
Now, I know he doesn't really think it's telepathy, but some people do get exercised about this sort of coincidence. But things like this happen all the time. And it's easy to see why.

It might seem like the question is: "What's the chance of me receiving an email from you just as I'm writing one to you, given we haven't emailed each other for ages?" Pretty small, I suspect. But actually, the question is really: "What's the chance of me receiving an email from you just as I'm writing one to you, given we haven't emailed each other for ages, and given that I've just received an email from you just as I'm writing you one?". That is, what is p(x|x) (the probability of x having happened, given that x has happened)? Well, it's one. You can't get less unlikely than that!

Okay, that seems a little unsatisfactory. It still seems somehow to be remarkably unlikely. What's the probability it will happen again? Very small. But what's the probability that some weird coincidence will happen again? Now that is rather high.

Let's assume that we think some event has a probability of one in a gazillion of happening (the probability prior to it actually having happened, that is). But there are equally gazillions of unlikely things that could happen. Say you get an email from a friend just as you were thinking of them. But they might have phoned you, or texted you, or visited you, or written to you. Or you might have seen them on TV, or read about them, or about someone with the same name. And you could have been thinking of any of your friends, or of anyone else, or of anything else.
There are oodles of possible unlikely coincidences. What are the odds that one of them happens?

The way probability works, it's easier to calculate the chance of none of them happening. Let's say the odds of each one of these things happening is one in N, where N is very large (one in a billion, one in a trillion, or more). So the probability is 1/N, and the probability of it not happening is 1-1/N (very nearly, but not quite, certain that it won't happen).

Now let's say the number of unlikely things that might happen is also this huge number N (it could be 10N, or N/10; the calculation is cleaner using N, but the overall flavour of the result still holds for other values).What is the probability that none of the N unlikely things happens? That is, what is the probability that the first thing doesn't happen, and the second thing doesn't happen, and ... all the way up to and the Nth thing doesn't happen?

We just multiply the individual probabilities together, so we get (1-1/N)^N. That's the probability of no coincidences, so the probability of at least one coincidence is p = 1-(1-1/N)^N. For N larger that about 100, p is about 63% (for 10N it's 99.99%, for N/10 it's 10%). That's a pretty good chance of a weird coincidence. And that's just today!

The moral is: when individual events are unlikely, but there are also a lot of events that could happen, something will almost certainly occur.

So, that email: unlikely coincidence? That coincidence, yes; some sort of coincidence happening, not really.
Read More
Posted in mathematics, probability | No comments

Sunday, 6 March 2011

Packing in the text

Posted on 05:02 by Unknown
I write many documents in LaTeX, and it is great for things like bibliographies, cross-referencing, and defining styles. But the default styles, such as 'article', are a bit wasteful of space. For example
\documentclass[a4paper]{article}
\title{Your Title Here}
\date{}

\begin{document}
\maketitle
\begin{abstract}
Lorem ipsum ...
\end{abstract}
\section*{Introduction}
...
\end{document}
gives the page shown on the right.

This is particularly a problem if you are preparing a document with strict page limits, such as a research proposal or a conference paper. Those places often put their own style requirements. Some provide a LaTeX style file, which is fine (provide the style actually works!), but others are a little less helpful.

Here is a typical requirement:
Font size 11 is the minimum font that is acceptable, and the minimum margin in all directions is 2cm. For accessibility purposes, a sans-serif font style such as Arial or Helvetica should be used as these are more easily readable to those with visual impairment. For the same reason, type should be justified only on the left hand side.
How do we get LaTeX to meet these requirements? Well, there are a few useful packages. 'geometry.sty' lets the margins be easily set. So we can get a conformant document with:
\documentclass[a4paper,11pt]{article} % 11pt font
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry} %min margins

\renewcommand{\sfdefault}{cmss} % sans serif
\renewcommand{\familydefault}{\sfdefault} % for whole doc

\raggedright % left justified
\parindent 1em % because \raggedright stops indenting

\begin{document}
...as above
\end{document}

Not only is it conformant, it also has more text on it than the plain `article' version. But we can do better. One reason the article style is so fascistic about its left and right margins (try to get more text by dropping a point size, and it reduces the line length!) is that very long lines are hard to read: you lose your place as you track back at the end of a line. A "11pt text, 2cm margin" format results in lines too long to read comfortably. So let's do what the newspapers do, and go to multi (here, two) columns. This actually saves space, as short section titles no longer take up a whole full width line.

Also, let's take the title and abstract into the main body, and tighten up the space around section headings using the 'titlesec.sty' package. Finally, use some 'negative leading' to get the lines a little closer together (without looking cramped), and we get:
\documentclass[a4paper,twocolumn,11pt]{article}
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}

\renewcommand{\sfdefault}{cmss}
\renewcommand{\familydefault}{\sfdefault}
\raggedright
\parindent 1em

\usepackage[small,compact]{titlesec} % section headings in smaller font size, less whitespace
\renewcommand{\baselinestretch}{0.9} % closer lines
\begin{document}
\section*{\Large Your Title Here}
\section*{Executive summary}
Lorem ipsum ...
\section*{Introduction}
...
\end{document}
The result has about twice as much text as the original 'article' style, and is fully conformant to the stated requirements.

The 'titlesec' package also allows some fancier formatting of section headers (for example, when things get a little squashed, I like to put a rule over major section titles, to aid the eye), but that's another story.
Read More
Posted in LaTeX | No comments

Thursday, 17 February 2011

The future price of electricity

Posted on 13:48 by Unknown
I got my electricity bill last week, and I noticed a nifty new feature that's been added to it: a predicted electricity cost for the next year. And very interesting that prediction is, too.

Here is my annual expenditure on electricity for the last few years (the numbers are ridiculously low for several related reasons that I won't go into here):

electricity prices
2003: £45.36
2004: £33.14
2005: £38.26
2006: £51.04
2007: £55.71
2008: £48.74
2009: £48.30
2010: £56.16

The graph shows a noisy but nevertheless upward trend, consistent with inflation more than with any increased usage on my part.

What do you think my electricity company's prediction for my 2011 bill is? A prediction that I am assured is based on "actual readings", according to my account. £60? Maybe as much £70? No. It is £488.77.

So, what does npower know about short term electricity price inflation that I don't?
Read More
Posted in electricity, estimation | No comments

Tuesday, 15 February 2011

The price of pears

Posted on 03:45 by Unknown
Tesco pears, but not exactly the ones I bought
I bought a bag of conference pears (lovely and crunchy) at Tesco last night, for £1. As I opened them today, I thought, "£1, that's quite cheap, how much is that per pear?" I counted them, and there were eight.

Without conscious decision, the calculation flashed through my head as follows: "Eight for a pound; that's half a crown each", then a slight pause before the next step: "so that's 12-and-a-half pence each."

half a crown: big money!
Half a crown? What's that, I hear you youngsters say. Well, back in the dim and distant past, we didn't have this new-fangled dumbed-down decimal currency. We had proper pounds, shillings and pence. 12 pence to the shilling, 20 shillings to the pound; 12 times tables; the lot. How long in the past? Well, we went decimal on 15 February 1971. (I remember the excitement of getting shiny "new pence" in my change on the bus to school.) That's 40 years ago to the day.

40 years: oh dear, and I still think in old money! (Not all the time, I hasten to add. It's just that "eight half crowns to the pound" was so well drummed in that it's still the natural association. Then there's always 6/8d.) But, to the day: wow.

Never mind that. What about half a crown for a single pear! Outrageous! (OTOH, 12.5p is really cheap...)
Read More
Posted in duodecimal, money | No comments

Sunday, 13 February 2011

Computer Science meets King's Cross

Posted on 03:33 by Unknown
Platform 9 3/4, from http://en.wikipedia.org/wiki/File:KingsCross.JPG
I haven't been to London for a while, but I was there last week to give a talk. As I got off my train at King's Cross, I thought I heard an announcement: "The train currently standing at platform zero is the...". What? Platform 0? I listened to check I wasn't hallucinating, and there it was again: "Platform zero for the ..."

Now, I know King's Cross quite well, I thought. It has eight platforms on the main concourse, and also platforms 9 to 11 hidden away in their own private little siding. (Forget finding platform 9-and-3/4s: I've know people fail to find the real but well-hidden platform nine!) But platform 0? Srsly? Only computer scientists start counting from 0!

Platform 0, cropped from http://en.wikipedia.org/wiki/File:Kings_Cross_Platform_0.jpg
So when I got onto the main concourse, I checked, and sure enough, there were signs to platform 0. When I got back in Google-range, I consulted that fount of all knowledge, wikipedia. Yes, there is now a platform 0, as part of the refurbishment scheme. On the one hand, it seems a shame they've gone with platform 0, since that means platform 9-and-3/4 is still a "mistake" (there are tracks, not platform, between 9 and 10). But on the other hand: platform 0. Cool.

So I was disappointed to discover that once the refurbishment is completed, the platforms will be renumbered, starting from the much more unimaginative 1. (Presumably resulting in hilarity for all concerned as the zombified commuters, with the current numbering scheme hardwired in their cortexes, start making off-by-one errors, and end up scattered all over the country.)
Read More
Posted in mathematics, trains | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • hyperbolic hyperbole
    What's with hyperbolic discounting? It's everywhere ! I first consciously noticed the term at a workshop about six weeks ago, and n...
  • better use seaweed
    As Neils Bohr is alleged to have said , “prediction is very difficult, especially about the future”. My smartphone has a weather app on it t...
  • oh dear
    We have a garden pond to help encourage frogs and other amphibians. Hedgehogs may suffer, however. :-(
  • "Windows support" -- not
    Just had another scam phone call -- someone with a strong Indian accent claiming to be calling from "Windows Technical Support" (o...
  • national stereotypes
    I've just got back from a very productive three day meeting in Paris. Just around the corner from where I was working, there was a marv...
  • retrospective holiday diary day 1: travelling north
    We went to the Lake District last “summer” ; this “summer” it was time for touring the other side of the country: Northumbria. The holiday s...
  • retrospective holiday diary day 5: trains
    Monday 24 September, and the long-threatened rain finally arrived. So this was the ideal day for the planned Carlisle-Settle rail trip . Bu...
  • funfair mirror trees
    One of the trees in our garden has died.  It died last summer in the drought, but we gave it a year to prove to us it really was dead.  It i...
  • retrospective holiday diary day 3: Lindisfarne
    Saturday 22 September, and the weather was still fine, sunny holiday weather so we decided to take advantage of the sunshine, and do Lindisf...
  • more scammers
    So not long after the scam phone call , the phone rings again. It's British Gas -- they get to call me because I'm actually a custo...

Categories

  • 3D printer
  • algorithm
  • astronomy
  • birds
  • Bonnie Tyler
  • books
  • cognition
  • computer
  • conference
  • Doctor Who
  • driving
  • ducks
  • duodecimal
  • education
  • electricity
  • estimation
  • Evernote
  • evolution
  • font
  • food
  • fractals
  • game
  • garden
  • graphics
  • grimoire
  • history
  • holiday
  • humour
  • language
  • LaTeX
  • lego
  • lol
  • mathematics
  • medicine
  • money
  • music
  • obituary
  • pedantry
  • politics
  • probability
  • psychology
  • publishing
  • python
  • quotations
  • research
  • robots
  • science
  • science fiction
  • space flight
  • statistics
  • TPS
  • trains
  • tree
  • TV
  • weather
  • web

Blog Archive

  • ▼  2013 (119)
    • ▼  December (1)
      • that's not in the least bit suspicious
    • ►  November (17)
    • ►  October (12)
    • ►  September (10)
    • ►  August (9)
    • ►  July (8)
    • ►  June (10)
    • ►  May (19)
    • ►  April (10)
    • ►  March (9)
    • ►  February (4)
    • ►  January (10)
  • ►  2012 (103)
    • ►  December (16)
    • ►  November (8)
    • ►  October (14)
    • ►  September (6)
    • ►  August (13)
    • ►  July (8)
    • ►  June (6)
    • ►  May (9)
    • ►  April (10)
    • ►  March (7)
    • ►  February (5)
    • ►  January (1)
  • ►  2011 (79)
    • ►  December (7)
    • ►  November (5)
    • ►  October (10)
    • ►  September (7)
    • ►  August (6)
    • ►  July (5)
    • ►  June (6)
    • ►  May (6)
    • ►  April (9)
    • ►  March (9)
    • ►  February (3)
    • ►  January (6)
Powered by Blogger.

About Me

Unknown
View my complete profile