Curved patterns and claims in the news · Statistics &… | StemPy Lab
Course 5.3·Lesson 3 of 3
Curved patterns and claims in the news
Not every relationship is a straight line. A curve can often be straightened by taking a logarithm or a square root, and then the methods of this chapter work again. This lesson shows one example of each, and ends with the questions to ask when a news report says that one thing causes another.
about 30 min1 simulation1 practice question1 Python program6 questions to check yourself
This lesson is free to read. Enroll free to keep your place and take the tests.
Lesson 3 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
recognise growth that multiplies, and straighten it with a logarithm;
use a square root for a quantity that grows like a square;
turn a prediction on the log scale back into a count;
read a claim in the news with the right questions.
A growing culture
A made-up school laboratory counts the yeast cells in a warm sugar solution every hour.
Time (hours)
Cells (thousand per mL)
0
5
1
11
2
19
3
42
4
80
5
165
6
310
The counts curve upwards: each hour adds more than the hour before. A straight line fits badly: r=0.8864, and the residuals run positive, negative, then positive again. The counts roughly double each hour. Growth that multiplies by the same factor in each step is called exponential.
Taking logarithms
Take log10 of each count. Multiplying by 2 always adds the same amount, log102≈0.301, to the logarithm. So the logarithms grow by equal steps, and they lie close to a straight line. Indeed, the correlation between the time and log10 of the count is 0.9995.
Two graphs side by side for a made-up yeast culture over six hours. On the left, the cell counts in thousands per mL curve steeply upwards. On the right, the base ten logarithm of each count is plotted against time with a straight line through the points.
The least-squares line for the logarithms is
log10y=0.7127+0.2983x.
What does it mean? Each hour adds 0.2983 to the logarithm, so it multiplies the count by 100.2983≈1.988, nearly 2. The doubling time is 0.2983log102≈1.009 hours.
To predict, work on the log scale and then undo the logarithm. At 3.5 hours, log10y=0.7127+0.2983×3.5, so y=101.757≈57.1 thousand cells per mL. The usual warning holds: at 10 hours the line predicts about five million cells per mL, but the sugar runs out long before.
The square root idea
Some quantities grow like a square. The stopping distance of a car is one: double the speed and the braking distance grows about four times. The test-track data of the course on the least-squares line gave r=0.9916 and a U-shaped residual plot. Take the square root of each distance and plot it against the speed: the bend disappears, and r rises to 0.9998. In words: a log suits growth by equal factors, and a square root suits growth like a square.
Reading claims in the news
Here is a made-up headline: "Children who eat breakfast get better marks." Before you believe that breakfast causes better marks, ask these questions.
Was it an experiment or an observational study? Were the children given breakfast at random, or did the reporters only compare families?
What lurking variables could there be? Families who serve breakfast may also have more time, more books or more sleep.
How strong is the link? Ask for r or the size of the difference, not just "a link".
Is the result about the people in the data? A study of one town, or of adults, may not apply to you.
Was the pattern a straight line, and was it an extrapolation? "If one hour helps, ten hours help ten times as much" is rarely true.
Who paid for the study, and how many studies agree?
Your turn: new numbers
Try it in Python
The program compares r for the counts and for their logarithms, fits a line to the logarithms, and turns its slope into a growth factor and a doubling time.
The usual mistakes
Forgetting to undo the logarithm. A prediction of log10y=1.757 means y=101.757, not 1.757.
Straightening a curve that has a real end. Growth stops when food or space runs out.
Taking the log of zero or a negative number. It is not defined. Logs suit counts and sizes that are always positive.
Reading a headline as a proven cause. Ask the six questions first.
Remember these
Growth by an equal factor each step becomes a straight line on a log scale.
A slope b for log10y means a factor of 10b for each unit of x.
A square root suits a quantity that grows like a square.
A claim of cause needs an experiment, or a strong case from many studies.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
A count is 3, 6, 12, 24 at times 0, 1, 2, 3. By how much does log10 of the count rise each step?
A line for a count is log10y=1+0.5x. By what factor does the count grow for each unit of x?
Why can we not take the logarithm of a count of 0?
A headline says: "People who drink green tea live longer." Name one lurking variable.
The area of a square field grows with its side. Which transformation of the area gives a straight line against the side?
References
OpenStax, Introductory Statistics, Chapter 12 (Linear Regression and Correlation).
OpenStax, College Algebra, Chapter 6 (Exponential and Logarithmic Functions).
Enroll free in Correlation and Cause
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.