Showing posts with label Maths. Show all posts
Showing posts with label Maths. Show all posts

Saturday, 5 November 2022

Sorry to have to disappoint you, but...

From the BBC:

A toddler from West Dunbartonshire has stunned family and friends with his extraordinary maths and language skills. Four-year-old Jamie Mohr, from Old Kilpatrick, can count in six languages and knows 17 times tables...

His mother Lorraine is tipping him to win a Nobel Prize following his "miraculous" development.


I wish him the best of luck, but there is no Nobel Prize in maths.

Thursday, 15 September 2022

Killer Arguments Against Citizen's Income, Not.

I've had a change of heart on how to 'sell' a CI, to deflect the KCNs that it would be 'unaffordable' and/or discourage people from working.

Whether it's 'affordable' (i.e. costs no more than the current system) or not depends entirely on:

1. How many people receive it.
2. How much the weekly CI actually is.
3. What the clawback rate is for people with some income.

As to 1, instead of saying:
"Everybody is entitled to claim it. There will be an income-related clawback equal to basic rate tax plus NIC. Those earning more than a certain amount (let's say the current income tax/primary NIC-free allowance of £12,570 a year), will quickly realise that the cash CI is equal and opposite to the extra tax they pay, so won't bother claiming it and will just claim the personal allowance instead i.e. be completely unaffected". All this appears to be too complex for the mathematically challenged.

I shall just say "Everybody earning less than (say) the personal allowance is entitled to claim it. This will be clawed back via PAYE from those with some earned income to ensure that claimants do not gain an advantage relative to non-claimants with similar low incomes.".

That reduces the number of claimants down to most existing pensioners plus 'about' 10 million adults out of a working age population of 'about' 45 million.

As to 2. We know the weekly rate is going to be more than £0/week (a massive saving, if we consider state pension to be a type of CI). Sensibly, we would take existing spending on welfare and pensions payments, net of clawbacks and tax paid by likely claimants and, first keep state pension at current levels, then divide the rest equally between 'about'10 million working age claimants. The answer would be 'about' £100/week (for sake of argument, depends what you do with disability-related top-ups and Housing Benefit).

Clearly, under this approach, there would be no change to the apparent 'cost' of welfare and pensions.

As to 3. we can then touch on the KCN that "people wouldn't bother working" and the clawback rate.

For sure, there are a few adults who can manage on 'about' £100/week. Most can't and will still have to work if they want the finer things in life (and rightly so, CI is a "hand-up not a hammock"). At present, as a matter of fact, clawback rates (benefits withdrawn and tax/NIC paid) are between 70% and 100%. This is where Working Tax Credits fail miserably. It might be worth officially working 16 hours a week (how the Hell do you prove that one way or another?) to get that bit extra; there is no point then doing 17 hours because you would only keep £2 or £3 for the extra hour. This is an example of the 'benefits trap'.

We know there is a Laffer Curve for taxpayers - if tax rates are too high, it's not worth running a business or working more, once you earn some bare minimum. So there is an optimum tax rate where the government can maximise tax revenues (we are at or past this point, as it happens). The same goes for welfare clawback rates - if the government wants to claw back the maximum total cash from claiamnts, it sets the rate not too low (not much clawed back and 'unfair' advantage for claimants vs non-claiming lower earners) and not too high (discourages working - not much clawed back either).

We also know that the CI clawback rate has to be set at such a rate that people working a small number of hours don't end up with more net income than people working more hours.

Taking all this into account, the optimum clawback rate is somewhere in the region of 30% to 40% (minimm wage earners keep £6 or £7 for every hour worked i.e. two or three times as much as now), which is, happily enough, the same as basic rate tax/NIC (depending on whether you include Employer's secondary NIC or not). So there is no need for a parallel means-testing/clawback system, we just give claimants BR codes for PAYE! And the work incentive has doubled or trebled at the stroke of a pen - and it's not just the extra bit of CI clawed back, their employers will also be making more profit and paying more tax!

* The German 'liberal' FPD party, which is socially AND economically liberal, unlike its UK sister party which is just soft-socialist, had exactly these proposals in its 2021 manifesto, the FDP are part of the ruling Coalition, and it seems not unlikely that this will be actually implemented next year (fingers crossed). I happened to see this in the ZDF evening news yesterday, which I watch occasionally for old time's sake.

Monday, 29 August 2022

"Find the area of the square"

Another one from Mind Your Decisions that YT suggested I watch a week or two ago:
He then does it the obvious and quick but rather boring way, using Pythag.

I watched the first minute (so that I didn't know his method or the answer) and then decided to drift off to sleep to see whether my subconscious could work out how to do it using the 'co-ordinates' method. At four in the morning, I dreamed that I knew how to do it and was explaining it to my daughter (who's doing a maths degree). So I woke up and tried it; my subconscious had cracked it for me!

First, redraw the picture, mentally at least:
The formula for a circle is X^2 + Y^2 = 1.
The two blue outlined squares touch the origin (0,0) and point D.
The equation for the green line is Y = X/2.
Point D has co-ordinates that satisfy both equations.
So (X^2)/4 + X^2 = 1.
Point D has co-ordinates X = √0.8, Y = √0.2.
Point B has co-ordinates (0,√0.2).
Length AB = √0.2.
The orange triangle must be a 90-45-45 triangle, so length AC also = √0.2
Length BC (using Pythag) = √0.4.
BC is the side length of the square, so the area of the square = 0.4.

Thursday, 11 August 2022

Mind Your Decisions - maths fail

Watch the first minute or so of his recent video, until he's explained the question, then press pause:

He rambles on for another five minutes explaining, rather too quickly, an unnecessarily complicated way of working it out. Try doing it my way (below) first to really torture yourself when you are watching it!

I left the following comment:

Far too complicated!

It's length 4 from one corner of a hexagon to the opposite corner.
'Vertical' height of each triangle in the hexagon = sq rt 3.
Put the square flat on the table, fold up the flaps and look at it from the side.
Point E/F is 1 'across' and has hypotenuse sq rt 3.
Acos 1/sq rt 3 = 54.74 deg (no need to know length of the other side).

Then rotate the square so that you are looking at it diagonally from one corner.
Distance from E/F to a point diagonally opposite (assuming there are four hexagons all folded up) = 4 x sq rt 2.
Distance diagonally across the square = 2 x sq rt 2.
So point E/F is sq rt 2 'across' and has hypotenuse 2 (side length of hexagon).
Acos sq rt 2/2 = 45 deg (no need to know length of the other side).

Took my daugher two minutes once I had explained the basic approach. OK, she's studying maths...

Thursday, 3 February 2022

A small number x a big number x a random positive number = a very big number.

From The Guardian:

Extreme weather has cost Europe about €500bn over 40 years

European pop. is about 500 million, so that's €25 per person per year i.e. bugger all.

European Environment Agency data shows worst-hit countries to be Germany, France and Italy

No surprises there. France and Germany are two of the largest countries by land area, Italy is also pretty big.

Towards the end of the article:

[The UK's] losses were calculated at about €57bn over the period, equivalent to close to €1,000 per person, with 3,500 deaths.

That would have been a better headline. £25 per person per year and 175 deaths per year.

That's only a tenth as many as UK road deaths. UK road deaths are very low by European standards and less than half a percent of total UK deaths. The article says that most European 'extreme weather' deaths are from heat stroke, so not unexpectedly the UK has few of those.

Sunday, 30 January 2022

Trees and CO2 capture - fun with numbers

Here are my workings, if you spot any glaring errors, please leave a comment. It's all round figures, I'm not going to bicker about anything more accurate than the first significan figure.

How many trees would we need to clear the backlog?

CO2 in atmosphere = 3,000 billion tonnes (3 x 10^12)
One-third of that is the increase since 1850 = 1,000 billion tonnes, this is apparently the Bad and Planet Warming portion. 1850 level is accepted as beneficial.
World population = 8 billion
Bad CO2 per person = 125 tonnes.
Trees consist of mainly CO2 by mass, plus a bit of H.
My mistake 1 - see comments - about half of the weight of a live tree is water.
An 80 foot tall hardwood tree = 9 tonnes
Let's say an average medium sized tree = 5 tonnes.
(A four foot long section of tree trunk with diameter 2 foot = 1 tonne, so if the main trunk is 16 feet high (two storeys of a house) plus 25% for boughs and branches, that's 5 tonnes)
So we'd need to grow another 25 trees per person to catch up. Sure, those trees will take decades to grow, but you have to start somewhere.

Ongoing emissions

At present, total CO2 in atmosphere is going up by 1% a year.
My mistake 2 - see comments - probably closer to 0.5%
1% x 3,000 billion tonnes = 30 billion tonnes.
30 billion ÷ 8 billion people = 4 tonnes per person.
Let's say each tree soaks up 0.1 tonnes of CO2 per year while it's growing (from above - 5 tonnes divided by 50 years)
That's 40 trees per person i.e. each person plants that many to offset the element of their lifetime emissions which aren't being soaked up naturally. This sort of overlaps with the 25 from above for older people, but hey.
The maths gets super tricky after that. People are born and they die. Older trees would have to be cut down once they reach maturity and are soaking up little additional CO2, then stored somewhere dry - to be replaced by new trees that are soaking up carbon as they grow. So I won't bother looking that far ahead.

Land area needed

25 to clear the backlog, plus 40 for ongoing = 65 per person. Number of trees in the world = about 400 per person
So broadly speaking, an increase in tree cover of one-sixth Forests (and presumably other wooded areas) = 31% of global land area
So that would have to go up to 36%, which seems do-able.

Applied to the UK

Decent sized trees per acre = 200. (In the dense wood at the top of my road, there are fairly big trees whose trunks were about 5 or 6 yards apart, so each tree has its own circle = 24 sq yards. 4,840 sq yards ÷ 24 sq yards = 200)
So the UK would need to 65 trees per person/200 trees per acre x 70 million people = 23 million acres, or 40% of the UK land area.
There's not that much suitable land (Scottish grouse moors, marginal farmland and such like) in the UK, but maybe we could get half-way there?
Countries like the UK that don't have enough land area per person and especially city-states like Monaco or Hong Kong will have to buy up some land in Canada or Siberia, where the land costs pennies, and let their trees grow there.

Alternative calculations welcome!

UPDATEs:

1. The two mistakes seem to largely cancel out. Trees only soak up half as much CO2 per tree as I thought, but we only need to soak up half as much CO2 = overall 90 not 65.

2. The Welsh government reckons that they need about 30 trees per person to be 'carbon neutral'. I assume (rightly or wrongly) that this is just to deal with ongoing CO2 increases and not clear the backlog, so ballpark, our figures are in agreement.

Thursday, 4 November 2021

Calculating the speed of a falling object etc. using the physics approach.

I like doing a bit of mental arithmetic, when I'm in a boring meeting or lying awake at night. A typical challenge is calculating the speed of falling objects; how long it takes them to fall etc. There's one constant, acceleration due to gravity (hereafter abbreviated to 'gravity' for brevity) = 9.8 m/s2 and then you have to work out how to work it out; then remember how to work it out while you actually work it out.

It's surprisingly fiddly, tedious and not much fun. Here's a link to an explanation with an embedded calculator.

It occurred to me this morning that taking the maths approach is a load of bollocks, it's quicker, easier and simply more fun taking the physics approach. You just have to remember a bit of GSCE level physics:
1. Initial potential energy of an object = kinetic energy of the object just as it hits the ground.
2. Potential energy = mass x height x gravity.
3. Kinetic energy = half x mass x velocity squared.

For simplicity, mass is always 1kg so does not appear in the answers (it would cancel out anyway), we're using SI units and we're ignoring air resistance.

Q1: Object is doing 60 m/s when it hits the ground. From what height was it dropped?

A: Closing KE = 1/2 x 60 x 60 = 1,800
∴ Starting PE = 1,800
∴ Starting height = 1,800/9.8 = 183 metres

Q2: An object is dropped from a height of 500 metres,
a) at what speed does it hit the ground
b) how long before it hits the ground?


A: Starting PE = 9.8 x 500 = 4,900
∴ Closing KE = 1/2 x 9,800
∴ Closing velocity squared = 9,800
∴ a) Closing velocity = 99 metres/second
(Calculating square roots made easy here)
∴ b) Time taken to fall (constant acceleration at 9.8 m/s2) = 99/9.8 = 10.1 seconds.
----------------------------------------------------------------------
The old fashioned maths approach is probably better (simpler calculation and more intuitive) if you are told time taken to fall:

Q3: An object falls for five seconds before it hits the ground. From what height was it dropped?

A: Closing velocity = 5 x 9.8 = 49
∴ Average velocity = 1/2 x 49 = 24.5
∴ Height = 5 seconds x 24.5 = 122.5 metres

The physics approach would be:
A: Closing kinetic energy = 1/2 x (5 x *9.8) x (5 x 9.8) (no need to calculate the actual number)
Starting potential energy = closing kinetic energy
Height = starting potential energy ÷ *9.8
∴ Height = 1/2 x 5 x 5 x 9.8 = 122.5 (the *9.8s cancel out)

Both approaches boil down to:

Height = 1/2 x time in seconds squared x gravity, but you'd have to remember this extra equation, so this approach is not advised.

Tuesday, 28 September 2021

"First signs of stabilisation in fuel supply crisis"

Reports Sky News.

The whole thing is an absolutely fascinating example of irrational human behaviour. Being a natural born trouble maker with a bit of spare time, I queued twice over the weekend to unnecessarily fill up two of my cars -  I would have done the third one but I noticed the MOT had expired (it's gone in today). It made me all nostalgic for the 1970s or East Germany.

There is a whole branch of applied maths for Queueing Theory, and no doubt they'll be analysing the heck of out this for years to come.

I always assumed that it would sort itself out within a week or so. On average (say), motorists fill up every two weeks, a petrol station can handle three times its normal volume and everybody bunches and fills their cars over a five day period (14 ÷ 3, rounded). Then theoretically for the next nine days (14 - 5), very few people need to or will bother filling up at all.

Except heavy users, they have no choice. And people who are would rather fill up again even if the tank is three-quarters full, which are unknown unknowns. The effect will be minor - while people just topping up spend much the same amount of time in the queue, at the pump, faffing about in their cars before driving off (what the heck are they doing?) and manoeuvring their way back into the traffic they are only buying smaller amounts of fuel per visit, so total fuel sold per petrol station per day is the same (more customers x smaller volumes).

Maybe we will reach a steady state where everybody tops up a quarter tank every three or four days, which is the same amount of fuel purchased, just more time in longer queues? Which will dwindle to every week, and hence to every fortnight again.

I don't know how this will pan out, but it is very interesting.

Wednesday, 8 September 2021

Welcome to the new basic rate of tax - it's 42%

Employer has £100 to pay on wages.

New Secondary NIC rate = 13.8% + 1.25% = 15.05%. So the max. gross wage he can pay out = £100 ÷ 1.1505 = £86.92

New Primary NIC rate = 12% + 1.25% = 13.25%, add on official basic rate of tax 20% = 33.25%.

£86.92 less 33.25% = £58.02, an overall tax bill of £42 = 42%.

If you factor in VAT, which takes one-sixth of earnings in the productive economy, it's closer to 52% overall. It's far worse if you also have Student Loan Repayments or Working Tax Credits that are being clawed back.

Wednesday, 26 May 2021

"pV = nRT"

Alarmists and Physics Deniers don't actually know what this equation signifies and make themselves look silly by trotting it out as if it somehow supports Alarmist Theory and/or debunks the Gravito-Thermal Effect.

Nothing of the sort. There's a full explanation and worked example at ChemGuide.co.uk. This is basic first year level GCSE Physics and nothing controversial.
-------------------------------------
Let's apply it to typical temp, pressure, density at sea level:
Pressure = 101,325 Pa
Volume = 1 m3
Mass of air in 1 m3 at 'standard temperature and pressure' = 1.227 kg
n = number of moles of gas in 1 m3 = mass/m3 divided by molecular mass of 'air', which is 29g/mole
R = universal gas constant* = 8.31441 J/K/mol
Temp = 288K

Stick in the numbers on the right hand side, 1,227/29 x 8.31441 x 288 = 101,314. Close enough to 101,325!
------------------------------------
Now we've got the hang of it, what's the likely temperature at 10 km altitude?
Wiki tells us that pressure up there is 26,300 Pa, density is 416 g/m3.
The left hand side is 26,300 x 1 = 26,300
The right hand side is 416/29 x 8.31441 x T = 119.3 x T
So 119.3 T = 26,300; and T = 26,300/119.3 = 220K

Which is exactly what the blue line on Wiki's chart - and real life measurement - show. Wiki's chart is what you get if you just start by assuming ever increasing density in a gravitational/acclerating field and working from there (see diagram 5).

In fact, you can assume constant density, desnity which increases linearly or geometrically as you go down, there would still be a similar profile with increasing pressure and hence temperature towards the surface. Basic maths. Any other outcome is mathematically impossible unless you assume that density increases with height at an implausible rate (in which case, what happens at the top?).
------------------------------------
* Keen-eyed readers will know that this is Avogadro's number x Boltzmann's constant.

Checking whether a number is prime.

You can't really check whether a number is prime, you can only check whether it divides by a prime number smaller than the square root of the original number and rule it out if it does. So it's a question of ruling out as many as possible as quickly as possible.

First, you rule out even numbers and numbers ending in 5 (apart from 2 and 5).

The next obvious/easy thing to do is to add the digits and see if they add up to 3, if they do, the number divides by three i.e. 291 = 2 + 9 + 1 = 12 (unless you start with 3, which itself is prime).

But I've watched another couple of maths videos on YouTube, and what they boil down to is that there is a better test that helps you rule out more numbers. The test is - divide the original number by thirty and just look at the remainder, or take "number mod 30" if you are using a scientific calculator.

If the remainder is not a prime number, the original number is not prime. If the remainder is prime (or ends in 1, even though the number 1 itself is officially not a prime number) and the original number is less than 300, there is a two-thirds chance the original number is prime. The chance of it being prime is slightly better than 50% for numbers up to 1,500. That percentage drifts downwards, the larger the number is. So if the original number was above 1,500, you might as well just assume it is not prime, even if the remainder is prime.

If the original number passes the second test and you want to improve your chances of getting it right, you have to do the long hard slog with divisibility tests, and check if it divides by 7, 11, 13...

I hope this comes in handy next time you are in a pub quiz. I can't think of many other uses for such trivia.

Saturday, 1 May 2021

How to estimate pressure and temperature using density as a starting point

As a fun maths challenge, I decided to apply the principles outlined in Acceleration ≈ gravity and see whether I could get sensible results by applying basic maths, basic physics and common sense.

Let's assume that you are only given the following measurements (taken from the US standard atmosphere):
1. Pressure at sea level = 101.325 Pa
2. Temperature at sea level = 288 K
3. Density at sea level = 1,200 kg/m3 (a bit on the low side?)

T x D ∝ T. We would do it the long way round by using Barry to find pressure at each altitude; then inserting the temperautre based on the lapse rate to find density at each altitude.

But what if you are also told that D at the top of the troposphere (10 km altitude for simplicity) = 400g/m3? It's actually much easier. You can interpolate everything else, including the likely lapse rate.

1. Set up your Excel sheet, type in the given numbers (pale yellow)
2. You can assume that density changes in straight line, but it is more realistic to assume it changes geometrically, so it goes up by a factor of 1.011 (3^0.1) for each km lower (doesn't make much difference)
3. Then work out the 'mass of the air/m3' for each 1 km 'slice' of altitude. That's just density x 1,000. I hid this column to simplify it a bit.
4. We know that the total mass of air at sea level must be enough to create a pressure of 101,325 Pa at sea level, so it must be 101,325/9.801 ≈ 10,338 kg total, so you put in 2,649 kg (pale blue) as a balancing figure (to get it to add up to 10,338 kg).
5. Pressure = force ÷ area, so it is simply 'mass of air above that altitude' x gravity (9.801 m/s2) per m2, so e.g. at 9 km, it's 2,649 kg + (446 g/m3 x 1,000 m) = 3,095 kg x 9.801 = 26 kPa
6. Temperature ∝ pressure/density i.e. temperature = pressure/density x constant 'k'
7. Work out 'k' = (288 x 1.2)/101 = 3.411 in this example (it's not a universal constant, you work it out individually each time)
8. Temperature at each altitude = pressure/density at that altitude x 3.411.

The results match the Standard Atmosphere very well. The T, and P results for top of troposphere are pretty bang-on. It does show that the lapse rate is lower than the accepted mid-figure 6.5 K/km at low altitudes and higher at higher altitudes. This is not unrealistic, as there is more absolute humidity at lower altitudes, but that's probably a happy accident and it averages out to ~6.5 K/km overall:
All this neither proves nor disproves the Physics Denier's contention that sea level temperature would be ~33 degrees cooler without 'greenhouse gases' (disproving that is far simpler and requires little or no maths, just facts and logic), but I love a maths challenge.
------------------------------------------
These workings also give a good understanding of the real world, against which you can test various Physics Denier theories - like the 'Top Of Atmosphere' theory, which says the temperature at the Effective Emitting Altitude (about 5 to 6 km up) is fixed at 255K, but sea level temperatures are 33 degrees warmer than that solely because of 'greenhouse gases'. This is an alternative explanation for the observed lapse rate of ~6.5 K/km, but it has to be that much anyway because of gravity, in other words... the 'Top of Atmosphere' theory assumes that gravity doesn't exist.

Or... do they mean that without greenhouse gases, the Effective Emitting Altitude would be sea-level (so sea level temperature would be 255K) and the gravity-induced lapse rate would stay much the same? On Mars, there is about thirty times as much CO2 as there is on Earth, but the Greenhouse Effect is negligible on Mars (5 degrees at most) and the Effective Emitting Altitude is no higher than it is on Earth. So that fails on the facts. Hmm.

Sunday, 11 April 2021

Calculating the marginal corporation tax rate in your head using 'rectangles'

This post is not really about tax, I'm just using it as an example of how to use 'rectangles' to simplify and solve maths problems, so is of general application.
-----------------------------------------------
From the BBC:

Mr Sunak... said a new small profits rate would maintain the 19% rate for firms with profits of £50,000 or less, meaning that about 70% of companies - 1.4 million businesses - would be "completely unaffected" by the tax rise. And there will be a taper above £50,000, so that only businesses with profits of £250,000 or greater will be taxed at the full 25% rate - about 10% of firms.

Assuming this works the same as the old way (when the lower and upper limits were £300,000 and £1.5 million), you can work out the marginal tax rate on profits between £50,000 and £250,000 as follows:
£50,000 x 19% = £9,500
£250,000 x 25% = £62,500
£62,500 - £9,500 = £53,000
£250,000 - £50,000 = £200,000
£53,000 ÷ £200,000 = 26.5%

Which is a bit tedious.

This morning I tried using 'rectangles' in my head instead. This turns out to be much easier and quicker - there are more steps but the first six require no calculations at all and only take a couple of seconds:

1. The green rectangle is the tax you pay on exactly £50,000 of taxable profits.
2. The yellow rectangle plus the red rectangle is the total additional tax you pay on exactly £250,000 of taxable profits.
3. But they don't officially make you pay the 'red' tax; they make you pay the 'orange' tax in addition to the 'yellow' tax on profits between £50,000 and £250,000.
4. The red and orange rectangles must have the same area.
5. The red rectangle is 6% high and £50,000 wide.
6. The orange rectangle is X% high and £200,000 wide.
7. The orange rectangle is four times as wide, so it's only one quarter as high.
8. X = 6% red height x 1/4 = 1.5%.
9. Total height of yellow plus orange rectangle = 25% + 1.5% = 26.5%.

This is so painfully obvious to me now, why didn't I think of this decades ago, when the marginal rate changed every few years? The relevance of this may seem pretty arcane, but when you have groups of companies, it comes in handy when deciding how to minimise the total tax payable when there's a decision to be made, like surrendering losses or restricting the capital allowance claim this year in exchange for a larger WDA claim in the next year etc.

Tuesday, 22 December 2020

Looks like election fraud (but isn't)

Trump and Trump supporters have claimed that election results like this indicate election fraud:

In-person votes, counted first:
Trump - 39,200
Biden - 30,600
(A solid lead for Trump on 56%).

Postal votes, counted next:
Trump - 9,800
Biden - 20,400
(A massive lead for Biden on 71%)

Add them together and you get:
Trump - 49,000 votes
Biden - 51,000 votes
(A modest overall win for Biden on 51%).

The postal votes look a bit suspicious at first sight, but the actual explanation for this is that Trump advised his voters to vote in person. In his addled mind, he thought that postal votes for him would be deliberately lost in the system somehow, which is nonsense if you think about it for half a second. If corrupt election officials are prepared to shred postal Trump votes, why wouldn't they also be prepared to shred in-person Trump votes?

Biden did the sensible thing and told his voters to vote by post if possible (because of Covid) or in person if they preferred. Thus maximising the likelihood of any potential voter actually voting for him. There must have been some potential Trump voters who couldn't vote in person and didn't get round to voting by post either. Biden hedged his bets; it was a good strategy, regardless of Covid.

I can't find a breakdown of in-person and postal votes. It looks to be about 30% postal and 70% in person. So (let's assume), because of the candidates' exhortations, only 20% of Trump voters voted by post against 40% of Biden voters. Multiple those numbers up, assuming an overall narrow 51%-49% split in this particular area, and you get the results shown above.

It is not at all unusual for the Democrat candidate to win an election - they won four out the previous eight (or six out of eight if you go by popular vote and not by electoral college votes!). It is less usual for a sitting President to be voted out after one term, but it does happen i.e. Jimmy Carter (Dem) in 1980 and George H.W. Bush (Rep) in 1992. Hillary Clinton and Al Gore won the popular vote but lost the electoral college vote and were prepared to take it on the chin, rules are rules, so Trump is being a pathetic bad loser IMHO.
-------------------------------------------
The only conspiracy theory that I will subscribe to is that Pfizer weren't too happy with Trump's suggestion that drug prices be capped, which is why they delayed the announcement that their vaccine works until a few days after the election. Had they announced it shortly before the election, Trump would have got a real boost, seeing as it was his government which funded the research.

A similar thing happened to Julia Gillard in Australia, go figure. Rent seekers appear to have undue influence in elections; they have a lot of spare cash to spend on lobbying to make sure the rents continue to roll in. It's a Georgist thing, not a left-right thing.

Thursday, 10 December 2020

"There are only 10 kinds of people in this world...

... those who understand binary and those who don't."

Pinched from here

Thursday, 5 November 2020

Estimating square roots made simple

I have sometimes occupied myself (i.e. in boring meetings or at school prize givings where you can't use paper) by calculating square roots in my head by trial and error i.e. guess the root and square it, then if the answer is too high, try again with a slightly smaller guess etc.

D'oh, I am so dumb.

There is a much simpler, quicker and more obvious method. Which most people probably already know, but here it is for the record.

If you have to guess √28, you start with the nearest known square number i.e. 25, imagine a square (illustrated below) with side length 5 = area 25 and overlay it onto a square with area 28. The total surface area of the grey shaded cells = 3 (28 minus 25). There are ten such cells (plus a smaller square in the bottom right, which I'll get to later), so each cell has area of a smidge less 0.3. They are one unit high (or wide) so the width (or height) is a smidge less than 0.3.

So as a first approximation, √28 = 5.3.

This overstates the answer slightly, because of the smaller square (5.3^2 = 28.09). We can do the same process again - divide the area of the smaller square (0.3^2 = 0.09) by ten = 0.009 and deduct that from 5.3 = 5.291.

Checks on calculator: 5.291^2 = 27.995. Close enough.

The same applies if the nearest square number is larger. So first approximation = √80 = 9 - (1/18) = 8.944. When you are this close, there is no point bothering with reapportioning the smaller square (again, you subtract it from the first approximation), because its area is only 0.056^2, and 0.056^2 ÷ 18 = so close to zero as makes no difference (and mighty difficult to calculate in your head, it's 0.00017).

Checks on calculator: 8.944^2 = 80.003. Again, close enough.

Here's the diagram, in case my explanation is not clear:

Wednesday, 7 October 2020

De-nesting nested radicals using an Excel spreadsheet

This wasn't very difficult to set up.

Let's say you are given "√(17/5 - √24/5)" i.e. you have to find the square root of "17/5 - √24/5":

The Steps are:

1. Write this down in the proper format - the "1" in the middle is implied if there is no number there. The calculations are the same whether the sign in the middle is "-" or "+", you only need this again at Step 7.

2. Write a "2" in the middle and adjust the right hand number accordingly. I set up a look-up table, so if the number in the middle in Step 1 is "1" you do 24/5 ÷ 4 = 6/5. NB, dividing by "1/4" is the same as multiplying by 4. You can reconstruct the table by doing "4 ÷ middle number squared"

3. Then we apply the same trick as for solving quadratic equations. Divide 17/5 by 2 and square it (or square 17/5 and divide the result by 4) = 289/100. Compare this with 6/5. Subtract the smaller number from the larger number = 169/100.

4. Take the square root of the result from 3. √169/100 = 13/10.

5. Divide the left hand number 17/5 (from Step 1) by 2 = 17/10 and add your answer from Step 4. 17/10 + 13/10 = 30/10 = 3.

6. Divide the left hand number 17/5 by 2 and subtract your answer from Step 4. 17/10 - 13/10 = 4/10 = 2/5.

7. Now check in the first line whether the sign in the middle was "+" or "-". Assuming you are looking for an answer which must be a positive number (like the length of the side of a triangle), if it was "+" you put "+" in the middle of your answer. If it was "-" you put the a "-".

If there are two possible answers (a positive and a negative) then you switch signs, so if it the sign in Step 1 was "+", the other possible answer is "-√3 -√2/5". If it was "-", the other possible answer is "√2/5 -√3".

Here are the steps on the spreadsheet plus the look-up table. The symbols in columns B, D, F and H, i.e. √, (, ), +, - and =, are purely for decoration and are not used in the calculations:


Email me if you'd like the spreadsheet with workings :-)

Friday, 2 October 2020

De-nesting nested radicals

A "nested radical" is something like this "√(18 + 8√5)", in other words, the answer includes the square root of a (multiple or fraction of a) square root. I stumbled across this concept recently and have read a few articles since, I think they make it all too complicated.

You often end up with a nested radical when you are solving quadratic equations or trying to find the length of the hypotenuse.

For example, the adjacent and opposite of a right angle triangle are both "2 + √5" long (it's an isosceles right angle triangle i.e. a 45-45-90 triangle) - how long is the hypotenuse?

Using "first insides outsides last", (2 + √5) x (2 + √5) = 4 + 4√5 + 5
This simplifies to 9 + 4√5.
Multiply by 2 = 18 + 8√5.
The hypotenuse is the square root of that = √(18 + 8√5). Messy.

The steps to de-nesting this are as follows:
Start again with "18 + 8√5"
Change the "8" to "2", which means divide it by 4*.
Square the number you had to divide by = 16.
Multiply 5 (the number after the square root sign) by 16 = 80.
Restate it as "18 + 2√80"
Then see if you can find two numbers which add up to 18 and multiply to 80.
The answers are "8" and "10", obviously.**
So "√(18 + 8√5)" simplifies to "√8 + √10"***.

You can check this on a scientific calculator - either way, you end up with 5.9907.
-----------------------------------
* There are endless wrinkles to this - what if you are trying to find the square root of "8 + √320"? You need a "2" in front of the square root sign, so just pop a "2" there anyway (multiply the implied "1" by "2") and divide 320 by 2 squared = 80.

Then there are multiples which are fractions or odd numbers; roots of fractions; negative numbers and so on. But they are all variations of the basic method.

** If you struggle with this step, and I often do, you can use the same approach as for solving quadratic equations.
18 ÷ 2 = 9.
(9 + u) x (9 - u) = 81.
81 - u^2 = 81.
U^2 = 1.
U = 1.
(9 + 1) x (9 - 1) = 80.

*** Don't forget the basic rule that the square root of 4 can be "2" or "-2". So although there's no such thing as a negative length of a hypotenuse, in a different context, "-√8 - √10" might also be a valid answer. If you get "√8 - √10" then the negative of that, "√10 - √8", is also a possible answer.
-----------------------------------
Clearly, there are some nested radicals that you just can't simplify, unless you are happy ending up with an answer that includes a multiple of i (the square root of -1) which is sort of missing the point.

There is one handy shortcut to see whether you can solve it in the first place, which is to change the number before the square root sign to "1" and adjust the number after the square root sign accordingly.
If the whole number squared minus that number is itself a perfect square, there will be an answer.
For example, starting with "8 + √320" again:
18^2 = 324.
324 - 320 = 4.
"4" is a perfect square number, so there will be an answer.
-----------------------------------
Right, that's a bit of fun with numbers for a Friday evening, clocking off now :-)

Tuesday, 15 September 2020

Quarantine madness

At my daughter's school, one of the pupils in Year 8 had Covid-19 symptoms or tested positive (not sure). As a result, the whole of Year 8 has to stay at home for two weeks. I assume that this also applies to all teachers who gave a lesson with that pupil in it (she wasn't sure).

I don't know whether the school is under some legal obligation to do this, or whether they are overreacting to cover their arses, but this is surely madness?

There are one hundred pupils in each Year plus two dozen teachers. Mass Covid-19 testing indicates that about 2% of people test positive. So if they actually tested everybody in a whole Year and all the teachers regularly, the probability that at least one tests positive is over 90% (1 minus 0.98^124).

On that basis, most pupils and most teachers will be in quarantine most of the time (there is no test yet to see whether people have had it and are immune AFAIAA), so they might as well continue doing online lessons and everybody stays at home.

Sunday, 23 August 2020

The 15-75-90 right angle triangle

My daughter knows the relative side lengths of 45-45-90 and 30-60-90 triangles (they are right angle triangles because there's a 90) off by heart (she needs them for maths competitions) and laughs at me when I forget them.

I stumbled across the 15-75-90 triangle by accident a couple of weeks ago and it had fairly easy-to-remember side lengths. But I couldn't remember what they were, how I did it or find my scribbled workings, so I Binged it (this is like 'Googling' something, but using Bing) and found an explanation at Robert Loves Pi.

That all seems a bit long-winded to me, so here is the shorter version:

1. Draw an equilateral triangle.

2. Draw an isosceles triangle with interior angles 30-75-75.

3. Divide the equilateral triangle vertically to give you a 30-60-90 triangle. The (relative) side lengths of the base B and hypotenuse A are 1 and 2, so the vertical C is √3. Colour this pale blue.

4. Put the pale blue 30-60-90 triangle on top of the isosceles triangle. Then do the numbers. The angle at the bottom left is still 75°. The angle at the bottom right is 75° - 60° = 15°. The base of the smaller triangle (side D) is 2-√3 (side A minus side C) and the other known side (side B) is 1. Add the squares of those two and take the square root of the answer, which simplifies down to 2√(2- √3)*.

Click to enlarge:



* Jason Tyler in the comments at Robert Loves Pi says "If you don’t like nested radicals, you can express 2√(2-√3) as √6 – √2"
How did he do this?
Start again with the sum of the squares of 1 and 2-√3
= 8 - 4√3.
= 6 - 4√3 + 2
= 6 - 2√12 + 2
Remember that √12 = √6 x √2...
= (√6 - √2)(√6 - √2)
so the square root of '8 - 4√3' = √6 - √2.

This is a neat trick, but only seems to work in some circumstances, where you can put the first expression into the form 'A +/- 2√AB + B'.