
When we saw the dramatic surge in cases of coronavirus in 1st April, up from 179 to 430, many of us feared the worst. I did.
Then when it fell for the next two days, I hoped. Then when it went up and down for four days, I wasn’t sure what to think.
Drawing the graph helped to suggest that April 1st was a peak but the trend isn’t that clear based on just how it looks.
However, when you group the data in blocks of 3 or 4 days and generate daily averages you get something more explicit. Starting today and working back to the 1st, we get:
884 in last 3 days
Average: 295
1 035 in previous 3
Average: 345
or
1 228 in last 4 days
Average: 307
1438 in previous 4
Average: 359
The coronavirus outbreak is under control as long as we keep the lockdown?

Fingers and toes all crossed 😂 .
LikeLiked by 2 people
If you used centred moving average over does it give anything seemingly different?
I am a microbiologist so we tend to have multiple samples and CMA helps as well
LikeLiked by 1 person
I’d love to hear the answer to that
LikeLiked by 1 person
John, if you look at the two charts from:
https://www.travellingtabby.com/scotland-coronavirus-tracker/
that have ‘new cases by day’ and ‘new deaths by day’, they show a 5-day average line on top of the bar chart that sort of gives an equivalent to what is being discussed here – just plagiarise the graphs (fully downloadable in jpeg and all sorts).
I am beginning to suspect you’ve not had much practice with graph-drawing…
LikeLike
You got there first 🙂
The reporting system is quite noisy with the daily reports containing data missing from previous days, for whatever reason. To even out the noise, a rolling / moving average should provide a clearer picture – and it is quite easy to maintain.
LikeLiked by 1 person
Like this?
awk -F, ‘BEGIN {prev=0; ddn[-1] = 0;ddn[0] = 0; num=1} $1 ~ /^20/ {td=$4; id=td-prev; prev=td; ddt[num] = $1; ddn[num] = id; ++num;}; END {ddn[num]=ddn[num-1];for(idx=1; idx<num; ++idx){s=idx-1;val=(ddn[s]+ddn[s+1]+ddn[s+2])/3; val=int(val+0.5);print ddt[idx], ddn[idx], val}} ' < Scotland.csv
giving:
2020-03-11 0 0
2020-03-12 0 0
2020-03-13 1 0
2020-03-14 0 0
2020-03-15 0 0
2020-03-16 0 0
2020-03-17 1 1
2020-03-18 1 2
2020-03-19 3 1
2020-03-20 0 1
2020-03-21 1 1
2020-03-22 3 3
2020-03-23 4 3
2020-03-24 2 4
2020-03-25 6 4
2020-03-26 3 6
2020-03-27 8 6
2020-03-28 7 5
2020-03-29 1 5
2020-03-30 6 7
2020-03-31 13 12
2020-04-01 16 26
2020-04-02 50 37
2020-04-03 46 47
2020-04-04 46 31
2020-04-05 2 17
2020-04-06 2 26
2020-04-07 74 50
Being: Date, daily deaths, Calculation
Where Calculation is the mean of the number of deaths on the 3 days centered on the date.
LikeLike
John
Tempting fate, you could remove that final question mark.
There’s a definite downward trend and as you say it should continue providing we keep the lockdown going.
I see Bugger is French encore.
LikeLiked by 1 person
Some simple figures on the number of ICU beds we have available still in scotland:
We don’t want anyone to get to the stage of intensive care, so let’s hope the ones still unused stay unused, and recovery for those using them now.
There is always a delay John, people don’t get the serious symptoms immediately – I think Boris’ deterioration is more typical, if you start feeling worse after 10 days you’ll probably be needing help breathing. So, if we started lockdown two weeks ago and it was spreading before that, it will just be about now the majority of people will either start feeling better or start getting worse, then the latter group will start hospital treatment and a portion of them will become more ill over the course of weeks(?) – so the prediction that there will be a spike over the next two weeks is a reasonable one (assuming a lot of people caught it before the lockdown, but we don’t know that) – we don’t know of course, but a slower increase in deaths just now is a good sign.
LikeLiked by 2 people
Contrary: ‘I am beginning to suspect you’ve not had much practice with graph-drawing…’
I do my best. I’m hurt.
I’m starting a campaign to have you renamed.
Anyhoo, I’m dropping it for clustered averages,
LikeLike
😀
Is that my new name: ‘Clustered Averages’??
That sounds like a bunch of meanness 😉
LikeLike
The tabby’s new deaths graph is really misleading!
Careful emoticon usage. Are you worried I’m having a humour-bypass? Maybe.
LikeLiked by 1 person
Misleading? That’s the data that’s out there – the bar chart shows daily deaths as reported, but then he keeps a rolling 5-day average (remember them) to ‘smooth’ the curve – what is misleading about that? You can pick and choose your own ways to present the data…
And its the number of days for death to double (where he takes a 3-day average for calcs) that is the best indicator of things out of control – we’re doing not bad with 3.9 days for doubling (in the green on his graph).
Emoticon usage was just in case you didn’t know the meaning of ‘clustered’ or ‘average’ and didn’t get my very hilarious joke … um, I’m in more trouble now amn’t I?!
LikeLike