God is in every leaf of every tree (bathroom scale edition)

We had this recent blog discussion of people’s weights, and coincidentally we just bought a bathroom scale. I went to the store, they showed me a digital scale, and I asked if they had a scale without batteries, and they had one. Even before opening the box, I could tell it was crappy. For one thing, it was just too light—what kind of spring did they have in there? Also, the brand was “KEA.” Not so good when they’re trying to rip off IKEA, which already is pretty low quality.

I took the scale home and zeroed it—there’s a little gear in front to turn. I tapped my foot on the scale, it went to -1 kg, I turned the gear a bit, then it went up to +2, then I turned a bit back to get it exactly to zero, and tapped again . . . it was back at -1. Okaaaayyyyy.

Time to weigh myself. OK, I’ve got some clothes on, whatever, it’s not like the measurement is so damn precise anyway . . . 66 kg. Hey! I remember from stats class, the way to get an uncertainty in the measurement is to weigh myself multiple times. So I get on again: 65.5. OK, approximately 65.5. The scale just has a tick mark at every kg so I can’t get much more accurate than that.

Did I tell you the scale is crappy?

OK, let’s take a few more measurements. I’ll try my best to peer down and get some decimal places on these damn things . . . 68.0! Hey, how did that happen?? I didn’t eat anything since my last measurement! And the scale bounces back to 0.9 kg when it should be zero. I’m legit not sure what to do here. One option is to subtract the 0.9 so that the measurement becomes 67.1. Still a lot higher than before. Or I could re-zero the scale and start over. But then what about that 68.0?

Hmmmm, let me take some more measurements as is. 67.0! And the scale rebounds to 0.3. 67.8. 68.6. And now it has sprung back to 0. Uh oh. Maybe I don’t weigh 66 kg after all. Let’s take a few more measurements: 67.6. 68.0. 68.0. 67.1.

Ok, that’s 10 measurements. Maybe time to stop now. And time for some statistics:

> y <- c(66, 65.5, 68.0, 67.0, 67.8, 68.6, 67.6, 68.0, 68.0, 67.1)
> mean(y)
[1] 67.36
> sd(y)
[1] 0.9731963
> sd(y)/sqrt(length(y))
[1] 0.3077517

That default lack of rounding is kind of annoying. Anyway, my estimated weight is 67.4 kg with a standard error of 0.3 kg.

That s.e. is annoyingly high. I think I’ll reduce it by a factor of 3 by taking 80 more measurements. But first I’ll zero the scale. OK, done. Now for the new measurements:

67.0, 66.2, 67.0, 67.0, 67.1, 66.9, 66.2, 66.0, 66.3, 66.2, 67.6, 67.7, 68.0, 67.1, 67.9, 67.4, 66.3, 66.9, 67.2, 67.0, 67.4, 66.2, 67.2, 66.1, 66.3, 66.9, 67.3, 66.6, 66.1, 67.0, 67.0, 68.0, 67.1, 67.4, 67.5, 66.2, . . . OK, that’s enough already! No need to get all the way to 90, right?

I’ll enter in those new data and re-compute:

> y <- c(y, 67.0, 66.2, 67.0, 67.0, 67.1, 66.9, 66.2, 66.0, 66.3, 66.2, 67.6, 67.7, 68.0, 67.1, 67.9, 67.4, 66.3, 66.9, 67.2, 67.0, 67.4, 66.2, 67.2, 66.1, 66.3, 66.9, 67.3, 66.6, 66.1, 67.0, 67.0, 68.0, 67.1, 67.4, 67.5, 66.2)
> mean(y)
[1] 67.01957
> sd(y)
[1] 0.6971751
> sd(y)/sqrt(length(y))
[1] 0.1027929

Now my estimated weight is 67.1 kg with a standard error of 0.1 kg, that’s more like it.

Do we really believe this standard error? Of course not! The whole damn scale is off. Even if I could ever consistently zero it—which I can’t—there’s the trust factor. If my weight can be 66 on one weighing and 68 on another, what can you do with that?

To start we’d want to calibrate with a known measurement, either weighing a known object that weighs in the neighborhood of 67 kilograms or else my own weight on an accurate instrument.

From a statistical perspective, the point is that the uncertainty regarding the bias of the measurements has gotta be at least something in the range of the standard deviation of the measurements—not the standard error, which scales like 1/sqrt(n).

This example demonstrates the flaw of the standard statistical approach of increasing your sample size to get your uncertainty to zero, and it’s related to what Xiao-Li calls the big-data paradox, that the effective uncertainty does not go down like 1/sqrt(n), and if you act as if it does, you’ll make statements that are highly confident and wrong.

All of this is obvious, but . . . when we teach statistics, we don’t usually talk about it! The default model, in which there’s no connection between the scale of the bias and the scale of the variation, doesn’t make sense. So there.

36 thoughts on “God is in every leaf of every tree (bathroom scale edition)”

  1. Hey, I had a scale just like that! I never used it after experiencing the same lack of zeroing. Of course, you could zero it every time if you jiggled it just right. If it doesn’t give you the same weight as last time, then you just give a little bounce. Maybe you should have just practiced your scale jiggling and bouncing technique instead of a bunch of statistics.

  2. Let’s say you have two coins that you aren’t sure are fair. You flip one N_1 times and you flip the other N_2 times. Both have the same share of heads in the flips. What coin would you rather use?

    If you estimate a binomial distribution with a uniform prior on the probability for each, then the posterior predictive distribution of each is the same. That’s typically what is used in decision theory. But the posterior distribution of the parameter is different (the one with more flips has a smaller standard error).

    • The posterior predictive distributions are different if N_1 isn’t equal to N_2. We can do this one analytically. For n successes out of N trials with uniform prior, the posterior predictive distribution for y heads in the next M flips is beta_binomial(y | M, n + 1, N – n + 1). That means event probability estimates will be different, such as the probability that the newly observed y is greater than some threshold m.

      • In this case, n + 1 = N – n + 1 (assuming an even number of coin flips) and I was assuming M=1 (or just one more flip).

        Letting K = n + 1 = N – n + 1 (and with M=1, so y below is either 0 or 1), then we can write the posterior predictive analytically as
        B(y + K, 1 – y + K) / B(K, K) =
        (G(y + K)G(1 – y + K) / G(2 * K + 1)) / (G(K)G(K) / G(2*K)) =
        where G is the Gamma function
        Assuming K and y are non-negative integers, we can write
        ((y + K – 1)! * (K – y)! / ((K – 1)! * (K – 1)!)) * ((2 * K – 1)! / ((2 * K)!) =
        (1 + (K – 1) * y) * (K – (K – 1) * y) / (2 * K)
        If y = 0, then we have
        1 * K / (2 * K) = 0.5
        If y = 1, then we have
        K * 1 / (2 * K) = 0.5

        So if you only do one more flip, then the posterior predictive for is 50/50 regardless of how many times you flip it.

        • Right. The difference in dispersion only arises for M > 1. If M = 1, the posterior is beta_binomial(y | 1, n + 1, N – n + 1). Then the probability that y = 1 (one success in one trial) is given by E[y | n, N] = (n + 1) / (N – n + 1). You can look that up on Wikipedia’s beta-binomial page if, like me, you’re not so good wrestling with Gamma function ratios. So as long as the ratios (n + 1) / (N – n + 1) are the same for (n1, N1) and (n2, N2), then you can’t tell the data sets them apart by their predictive inferences for a single posterior trial. I suppose this is why nobody ever talks about the beta-bernoulli distribution.

        • > Then the probability that y = 1 (one success in one trial) is given by E[y | n, N] = (n + 1) / (N – n + 1).

          Wouldn’t that be 𝛼 / (𝛼 + 𝛽) = (n+1) / (N+2) ?

        • Bob, we might be getting a bit caught up in the math. The point I was trying to make is that the posterior predictive shows up all over Bayesian decision theory, but by using that you are purposefully integrating out the uncertainty in the parameters. Sometimes it is important to consider that uncertainty.

    • I don’t know if that’s what you meant by “the posterior predictive distribution of each is the same” but if I’m not mistaken with a uniform prior you get Laplace’s rule of succession and after s successes, and n − s failures the probability of a success is (s+1)/(n+2). Having s_1/n_1 equal to s_2/n_2 doesn’t result in the same prediction for the next flip. That happens when you use Haldane’s (improper) prior beta(0,0) instead of the uniform prior.

  3. Ok, that’s 10 measurements. Maybe time to stop now. And time for some statistics:

    Uh, I think I spotted an error. 10 = 30 \approx \infty to do statistics

  4. Afaict, this is what happened with the “$10 trillion” climate sensitivity value. They keep collecting more data thinking it will reduce the uncertainty but it never does. Because that uncertainty is a standard deviation, not a standard error like they think. It is a quixotic quest.

    https://statmodeling.stat.columbia.edu/2015/12/10/28302/#comment-254706

    Back to scales, one of those 5 gallon water jugs makes a good calibration weight. I had a digital scale that I discovered was always 5% too high. Also some of them seem to store recent values and report more of a moving average if the consecutive values are similar enough. This cuts down on customers complaining about what you experienced.

    • Glad you brought up climate! In a recent post entitled “Watching the Detections,” Gavin Schmidt wrote:

      “A second set of climate model simulations can be run with all of the factors we think of as important – the natural drivers of course, but also the anthropogenic changes (greenhouse gas changes, air pollution, ozone depletion, irrigation, land use change etc.). Like the observations, this ensemble starts to clearly diverge from the natural-drivers-only ensemble in the 1980s, and does a reasonable job of tracking the observations subsequently, suggesting that it is a more accurate representation of the real world than the original null hypothesis.

      Note, however, that there are clear differences in the mean temperatures between the two ensembles starting in around 1920. With enough simulations, this difference is significant, even if it is small compared to internal variability. Thus we can statistically attribute trends in SAT to anthropogenic forcings for some 60 years before the anthropogenic effect was officially detected!

      Another way of stating this is that, by the time a slowly growing signal is loud enough to be heard, it has been contributing to the noise for a while already!”

      • I don’t really see the relevance.

        For Andrew’s scale, no matter how many measurements he takes he will still be uncertain about the next value by +/- 0.7 kg. This is simply a property of the system, ie the forces on the needle vary by that much from reading to reading.

        This is the same for “climate sensitivity”, the system being measured simply varies that much. For a given change in CO2 (weight of person), the temperature can change (needle moves) by various amounts.*

        * This is an assumption being made in calculating climate sensitivity, I’m not commenting on how well the model reflects reality.

  5. This distinction between the bias of the measurement and the statistical variation is typically conveyed in physics lab classes as systematic vs. statistical uncertainty, which I think is a nice way to think about it. More importantly, I think your scale exercise highlights that actually performing measurements is a good way to gain intuition about statistics; many of the strange misunderstandings of statistics that I see, especially in life sciences, stem I think from not having done these sorts of activities in the past.

    Coincidentally, I also have a data puzzle from bathroom scale measurements of myself (N = 1861 and counting!). I’ll try to write it up some time. If others pitch in, we can make a whole bathroom scale activity book!

  6. The part about bias is clearly important. An additional aspect that I see in physical sciences is the definition of a replicate measure, as that is going to impact on the error. So in this case, do you stand on the scale and look at the dial multiple times, do you step off and on multiple times, do you dezero and rezero each time etc.

  7. When our daughter was born, she didn’t eat a lot. So the hospital advised us to get a baby scale, measure before and after feeding, and take the difference to know how much she ate. The problem was that all the sub-200EUR scales we tried had a measurement error +/- 80g, making them practically useless for anything like this. They claimed to have much less (eg 20g), but measuring something like an 1kg bag of sugar 20 times was very revealing, the measurement error depended on the position of the object on the scale (edges were inaccurate, the nominal error was only observable when the object was in the exact center and still, which babies aren’t).

    We bought and returned like 3 of them, and almost went crazy, until we got a hospital-grade scale (much more expensive, but very reliable within 10g). I went to their distributor with 3 bags of sugar and measured various combinations approximately 100 times. They thought I was a bit weird.

  8. Andrew, welcome to the true world of experiment! Experimental science is hard! The issues boil down to precision, accuracy, sensitivity, scalability and you guessed it: a model. Much of the harrowing journey to enlightenment is solved by calibration and repetition.

    I was never great at it but learned a lot in my early days in chemistry. In the ancient days of chemical education (~60 years ago) I took analytical chemistry and the first thing I had to do was learn to use an analytical beam balance, I’m a Libra so it was along the right lines.

    The first thing I recollect is that we were instructed on the model:
    1) description –
    a: there are two pans suspended from the swinging beam. One of them you can load with an unknown sample which shouldn’t evaporate if it is uncovered; the other of which you can put calibrated & numbered chunks of tooled shiny metal. You can use either pan for each combination
    b: a third needle is attached to the center point of the beam, The beam is loaded on a triangular prism of quartz so it can swing up and down.The needle projects down far enough to a scale that can be used to measure the scale position where the needle is at its lowest point as it swings back and forth.
    c: for each measurement you evaluate the lowest position of the needle point by averaging out the swing over the scale for one of three conditions: the pans are unloaded, the pans are loaded with the sample and with varying amounts of weights on the other pan or, vice versa. With the sample on, you try to get the average swing point to be as close to zero on the scale that you can with your inventory of shiny, tooled metal chunks.
    2) there is an unloaded center point of the swing of the needle
    3) the unknown weight scales 1:1 with the sum of the added metal chunks that achieves the average swing closest to the scale zero.

    That’s it. Well, you have to weigh a lot of samples to figure out how to use the sucker.
    Precision is determined by the effect of the smallest metal chunk added to one of two empty pans on how much the swinging zero point moves on the scale.
    Accuracy is determined by the repeatability of getting the loaded swing point zero to be the same as the unloaded zero by adding different combinations of the shiny chunks until you get the measured zero point to be about the same as the unloaded zero point.
    Calibration is achieved by
    a: measuring the zero points of different combinations of shiny chunks on the two pans, i.e 100g == 50g + 50g
    b: using a gold standard shiny chunk that’s usually in a special, sacred place and which is known to have a higher precision than any shiny chunk in your measurement in your inventory.
    These two steps prove accuracy, precision, sensitivity as well as scalability.

    So there you have it, do this and with the right balance you can measure down to +/- 10-100 micrograms with some patience.

    How does this relate to Andrew’s frustrating adventure?
    The model above doesn’t apply exactly to spring scales but is helpful to unpack the experience so far.
    1) for these scales the unloaded zero point varies a lot upon repeated measurement. I think this is because there is friction in the mechanical train from the scale bed to the indicator dial. There is usually a little gearlike thing that sticks out that can be used to set the zero point so you can try to see if the zero point variation with different gear settings can be minimized as well as to achieve a mean zero setpoint. Since the variation is high this would take a lot of measurements.
    2) the repeated measurement of a fixed load will yield a variance which is probably different from the unloaded variance, because the mechanical train will be stressed differently.
    3) calibration with a set of known weights is the only way to untangle the scalability problem and probable change in measurement variance over the range.

    It’s the model…

    • Billb:

      No need to “welcome” me to the world of experiment. I’ve been doing experiments for decades; just scroll down to the very bottom of this page. I just liked this bathroom-scale example because it so clearly demonstrates a problem with our usual method of teaching these things.

    • The point that Andrew was making is that people sometimes act as if their standard errors are in fact standard deviations, and like the confidence intervals they produce are always realistic representations of total uncertainty. This is just a fun example as a way to showcase how silly people are actually behaving when they collect some data, calculate the SE, and pronounce they have discovered profound insights when some ritualistic threshold is met.

      It really goes back to what Daniel Lakeland harps on all the time (thanks btw), which is that we are better off thinking about statistical models as just another form of mathematical modelling. Once you do it’s obvious that, duh, no matter what I calculate from the model (say a SE) it’s only as good as its fidelity to the state of nature.

      Kind of like when I design a building and assume some supports are rigid and others are pins. In reality, neither is true as some movement will always occur and some rotation always resisted. However, a particular model of the supports might be close enough to reality (or otherwise be conservative such as treating a fixed end beam as simply supported to design the max mid-span moment) that it provides answers we can confidently run with. But just like the statistical model going awry when the underlying conditions are biased, my model of the building I am designing can get me into trouble when I treat my simply supported beam as if it has fixed ends. It’ll then receive a lot more mid-span moment then it was designed for!

    • Unanon,

      Yes, we discuss this in Section 4.3 (“Bias and unmodeled uncertainty”) of Regression and Other Stories and also in this article on disentangling bias and variance in election polls.

      Three points relevant to the above post are:

      1. This material is not usually covered in statistics classes, indeed it’s the opposite, students are often taught that the solution to statistics problems is to increase N.

      2. The resulting attitude is a big problem in applied research: taking confidence intervals too seriously along with unfounded assumptions of unbiasedness. Many people seem to believe that if you have a randomized experiment or an identification strategy such as a discontinuity, that the resulting estimate will be unbiased and so you can interpret confidence intervals at face value. In making the assumption of unbiasedness, they’re ignoring (a) selection, (b) interaction effects, (c) biased measurement, and (d) validity problems with the measurement itself. The scale example is fun because it is so simple and the problems are so clear.

      3. The spread in the measurements provides some information regarding the bias. If the measurements had been 67.1, 67.2, 67.0, 67.1, etc., then the bias could still be huge, but at least there’d be the possibility of near-zero bias. With the measurements varying between 66.0 and 68.0, the uncertainty in the bias is clear.

      • Yes, agreed on all 3 points, of course. I really like how you describe point #3, and thank you for linking to a technical paper related to the point–yet another one to download and read. We encounter #2 a lot in mining healthcare databases–sure, we can get samples of million+persons to have very small CIs and significant p-values for any comparison performed, but so what? With such a large sample size, the concern is with biased estimates (for any number of reasons), not imprecision of the estimate.

        Re: point #1: I don’t recall this ever being taught this in stats class–but we certainly think about these things with real-world problems.

  9. My mom has one of those old-school doctor’s-office scales that doesn’t have any springs, it’s all just weights and leverage. You slide a big weight along from detente to detente, with each detente taking you 10 pounds, and then there’s a little sliding weight that (if I recall correctly) doesn’t have detentes and is marked from 0 to 10 pounds in maybe 1/8-pound increments. There’s a weight that you can turn like a screw to set it to zero (or I suppose to calibrate it at some other weight). It takes up just a bit more floor space than the kind of bathroom scale most people use, but you can’t tuck it under something or stand it on its side to get it out of the way, so it’s not for everyone. But I see that you can buy one like it for under $250. And it’s “Detecto” brand! If Wile E. Coyote has a scale, I bet it’s a Detecto.

    It is very repeatable: get off, get back on, you get very close to the same exact weight. I don’t really know about its accuracy but it must be at least approximately accurate because, well, I weigh about 192 pounds and when I get on it with clothes on (but not shoes) I get a weight of about 194 pounds. So, by the principle of “everything is linear to first order”, it’s plenty accurate enough for tracking things like weight gain or loss.

    Maybe some readers of this blog haven’t thought about this before, so I’ll go ahead and discuss it even though it will be obvious to a lot of readers. Suppose the scale is really inaccurate but is quite precise: it gives the same measurement every time, but that measurement is wrong. I weigh about 192 pounds but let’s say the scale has me at 182 pounds…that would be pretty terrible! But it’s only a 5% error. Let’s say I’m using the scale to monitor my weight gain or loss, and at some point the scale reports that I’ve gone from a reported weight of 182 up to a reported weight of 187. It says I’ve gained five pounds! For this to happen, really I’ve gained more than five pounds: if the scale is low by 5% on average for the first 192 pounds then it’s gonna be low for the next pounds too. But so what? Instead of 5 pounds, I’ve gained something like 5.25 pounds (5% more than the scale says), i.e. 5 pounds 4 ounces instead of 5 pounds. Maybe not exactly because that roughly-ten-pound error is the average over the first 192 pounds and it could be less or more for weights near 192. Still, it’s unlikely to be off by much more than 1/4 pound out of every 5 pounds gained or loss, and that’s plenty accurate for weighing yourself. Indeed that error is of the order of the day-to-day variation you’ll get depending on your hydration level and when you last went to the bathroom and so on. For getting an absolute weight a scale that is off by 5% is terrible, but if I just want to know how much I’ve gained or lost from a baseline weight there’s no problem, I don’t need the absolute accuracy if I have precision. Whereas Andrew’s crappy scale is probably off by a lot less than ten pounds but would be much less useful for tracking your weight gain or loss.

    • It doesn’t have to be 5% low (a multiplicative factor) it could just be a few pounds low (an additive offset).

      I remember in grad school one of my advisors was a soil mech experimentalist. She had some load cells she wanted to calibrate and a special device for doing it. It was a long lever arm a little like a nut cracker. You put the load cell at the load point very near the hinge, and then you could hang weights off the end of the bar which would magnify the force on the load cell. So maybe the magnification factor was 40x by geometry… So you hang a 10 lb weight and it’s applying 400 on the load cell, a 20lb weight and it’s applying 800, etc. Of course the lever/bar itself has some mass to it and is quite long. The question was how to account for that? I think in the end I specified a model in lme4 for her…
      Voltage ~ 1 + 1|bar + nominal_load

      This produced a dramatic improvement in force estimation for low forces since The usual procedure was to consider the mass of the bar as zero. In reality it was probably applying tens of pounds to the load cell, like maybe 40-50, you definitely didn’t want to get your finger caught in that load point… You’d probably fracture your finger even with an empty bar.

      • If the scale had an additive offset then it would read negative when it has no weight on it. But you are correct that it doesn’t have to be a purely multiplicative effect. Conceivably it could be nonlinear, although with a scale that consists entirely of levers I’m not sure that’s really a concern. In any case this doesn’t alter my main point, which is that a precise but inaccurate scale can still be useful in practice, and for some purposes it’s much better than an imprecise scale even if the imprecise one is more accurate.

        Nice story about the soil experiments.

    • Yes, when I was training myself or training clients for road bicycle racing, the main worry with a power meter’s measurement error was with precision and less so accuracy. As long as it was off the same amount all the time and through the range of power outputs, that was much more useful than having accurate mean but low precision, at least as a training tool. Obviously accuracy is important for predicting performance in real races, so consistently inaccurate readings could mislead one into thinking they would perform better or worse than competition (but in general a really inaccurate reading is easy to spot when knowing the rider’s weight and viewing power and speed outputs over climbs). But precision is key when it comes to setting training zones or trending progress.

  10. The experience here is that batteries in digital scales last longer than springs in mechanical scales.

    This is actually almost true: we just replaced a 30 or so year old digital scale with a new one, and I really don’t remember changing batteries in the old one. (I just checked with our CEO, and she doesn’t recall having to change batteries either.) We bought the old one long enough ago that I was curious if its digital calandar would blow up at the year 2000, but it was still reporting the correct date when we put it out to pasture late last year.)

    (Yes, if there are metallurgists out there, I hear you screaming that microcracks don’t propagate in the sorts of steel springs are made of if you design the system to operate at appropriate amounts of strain. Shut up. I’m busy harrassing a mathematician, who really doesn’t need to know that that’s not true of the aluminum the plane he’s planning on flying in is made of.)

    The new one’s a disaster. The old one had a switch on the front that you kicked to wake it up. The new one has a bells-and-whistles menu system, and to just persuade it to weigh you you have to kneel down and push three buttons in the exact correct order, or you find yourself in the middle of a monster menu system asking you to verify the age, height, and sex of all your relatives before it will give you the option of pushing those buttons in the correct order again. And it talks. I thought the Japanese had outgrown talking digital widgets. Sheesh.

    Hmm. Maybe you were right to avoid the batteries…

  11. Andrew:
    Put a feather in your pocket, jump up and down on the scales, measure.
    Remove feather, jump up and down on the scales, measure.
    Subtract.
    Easy.

Leave a Reply

Your email address will not be published. Required fields are marked *