Rounding Specifications - Page 1
Forum section: electronics / general

author: metrologist
author_rank: Super Contributor
timestamp: May 14, 2018, 06:52:27 pm
content: This is probably a bit nuanced, but is there a standard approach to harmonizing specifications? For example, if we are looking at antenna gain figures and see dBi and dBd numbers by various manufacturers, and we want to present them all consistently and accurately, what is the correct way?Just a simple example, what would you do here to make them all dBd: 0dBi, 2.2dBi, 3.25dBd, 2.64dBi.I was thinking you need to use all available resolution in the stack-up calculation (gains and losses), and then determine how many significant digits are presentable.

author: Nusa
author_rank: Super Contributor
timestamp: May 14, 2018, 06:58:01 pm
content: https://en.wikipedia.org/wiki/Antenna_gainQuote

author: metrologist
author_rank: Super Contributor
timestamp: May 14, 2018, 07:45:58 pm
content: So, the marketing person wants to round up everything.0dBi, 2.2dBi, 3.25dBd, 2.64dBi-2.1dBd, 0.1dBd, 3.25dBd, 0.49dBdNow, do we add a few zero's on the end to make all the numbers have 3 significant figures?My thought is:-2.0dBd, 0.0dBd, 3.2dBd, 0.4dBd

author: Brumby
author_rank: Unknown
timestamp: May 15, 2018, 02:46:17 am
content: Part of the question is the ranges of accuracy for each of the various measurements. For example, if there is a sum involved with one measurement being ±0.5 and another ±0.005, then any decimal places are going to be fairly ignorable.If you want to define a specific number of decimal places, then this is my take:Your original..-2.1dBd..0.1dBd..3.25dBd..0.49dBdYour adjustment-2.0dBd0.0dBd3.2dBd0.4dBdMy commentWhy change?Why change?Round up, not downRound up, not downMy answer-2.1dBd0.1dBd3.3dBd0.5dBd

author: metrologist
author_rank: Super Contributor
timestamp: May 15, 2018, 01:39:41 pm
content: Why change what? The only reason for a change is to have all units the same for ease of comparison.

author: Nominal Animal
author_rank: Super Contributor
timestamp: May 15, 2018, 04:14:47 pm
content: This is what you posted, metrologist:Quote from: metrologist on May 14, 2018, 07:45:58 pm

author: metrologist
author_rank: Super Contributor
timestamp: May 15, 2018, 05:59:31 pm
content: Quote from: Nominal Animal on May 15, 2018, 04:14:47 pm-2.0dBd should be -2.2dBdIt does not seem right to say max output is 3dBm if the actual output is less, but there is no tolerance on the numbers anyway. It also seems suspicious to list one gain figure with higher resolution of digits than the others.

author: Nominal Animal
author_rank: Super Contributor
timestamp: May 15, 2018, 06:50:28 pm
content: Quote from: metrologist on May 15, 2018, 05:59:31 pmExactly. It is mathematically correct to round say 3.6 to 4, regardless of the units or scale.I recall a time when hard drives became available for home PC users (just before '386 era) in my part of the world, and the manufacturers' marketers used -- and still use -- "megabyte" for 106bytes, even though they knew quite well that the established value for a megabyte was 220= 1048576 bytes, or 4.8576% more.Mathematically, the marketers were right! That's why we havemebibyteinstead. (I don't think I've ever used the full word out loud, but I do use kiB, MiB, GiB, and TiB for 210, 220, 230, and 240bytes, respectively, to minimise confusion. Some still refuse, calling 230bytes a gigabyte.)So, while it does notseemright, it is still the mathematically correct thing to do. Rounding from halfway could go either way, though.If the specified figures are too vague, there is usually a good reason for it. Perhaps the quality varies, or perhaps the manufacturer does not even know. Sometimes it is so that the marketers can round it to a bigger figure; similar to but opposite for pricing items at e.g. 9.99.

author: metrologist
author_rank: Super Contributor
timestamp: May 15, 2018, 07:14:45 pm
content: Well, I'm also conflicted by something I recall from chemistry, and significant figures...

author: Cerebus
author_rank: Super Contributor
timestamp: May 15, 2018, 10:48:36 pm
content: Quote from: metrologist on May 14, 2018, 07:45:58 pmNo. There is a significant difference between 10V and 10.000000V (depending on the instrument, anything up to about $20,000+ difference). The former says that the precision of this figure is correct to no better than 1 volt, the latter that the precision is correct to no better than 1µV.You should not add any trailing zeroes to the right of the decimal point that you don't have evidence to support. This is exactly why a figure like 1.3 x 103is preferred in scientific literature, it does not falsely imply precision the way that saying 1300 does. Conversely, stating 1.300 x 103clearly implies that those zeroes are significant.Just for completeness, there is a convention for showing the error in stated numbers. A figure like 1234(15) indicates that your measurement is 1234 and that the true value you're measuring lies in the range 1234±15 (i.e. 1219 to 1249), normally with a ±2σ or 95% certainty.

author: JohnnyMalaria
author_rank: Super Contributor
timestamp: May 16, 2018, 01:52:59 am
content: Often, people get so hung up onprecisionthat they forget the other half of the equation:accuracy.I might have an analytical balance can report mass to 10 micrograms but be woefully inaccurate. My 5g of chemical may read out as 3.40326g. Great precision, totally unfit for purpose.Another thing worth noting is the rounding of averaged data. e.g., my super-duper (or not) balance may report to the nearest 10 micrograms but when reporting an average of, say, 3 readings then the value should be reported to the nearest 100 micrograms.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: May 17, 2018, 03:58:29 pm
content: Quote from: JohnnyMalaria on May 16, 2018, 01:52:59 amExplain please. If the readings vary due to random factors (noise in A/D, vibration, possibly air currents) then the average legitimately has higher precision than the individual readings, with precision improving as one over the square root of the number of readings in the average. Of course you have to have good reason to believe the randomness of the readings to take advantage of this improvement.There are reasons to believe that precision could suffer with multiple readings (drift for example), but a factor of ten reduction in precision requires some justification. It won't always be that bad.

author: JohnnyMalaria
author_rank: Super Contributor
timestamp: May 17, 2018, 05:29:08 pm
content: I should have clarified that this is the practice in the pharmaceutical industry. Nevertheless, you should only report mean data to the precision supported by the standard deviation of the data. If you are using an appropriate precision measurement technique then you ought to obtain a standard deviation at least equal to the lowest significant figure of the technique. If not then the chosen technique isn't precise enough.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: May 18, 2018, 01:08:18 am
content: This discussion just illustrates the importance of fully understanding what you are measuring and what you are measuring it with. There are certainly circumstances where the mean will be known much more precisely than the standard deviation. Think of the standard coin flip experiment. While the answers are binary with one significant digit of precision, and standard deviation will rapidly converge to a value of one sixth of the range used to represent the states, the mean of a large number of samples (say 10 billion), will be known to several digits of precision. This mean may or may not be the exact midpoint of the range. The average can precisely and accurately reveal any bias in the coin due to imperfect geometry, mass distribution problems, or a practiced flip.Use of averages to improve precision is widely used, though often implicit (low pass filters for example), but is not always available because of measurement time limits, stability of the measured item or measuring instrument, non-ergodic noise or any of a number of other potential problems.

author: Nominal Animal
author_rank: Super Contributor
timestamp: May 18, 2018, 10:22:09 am
content: Quote from: CatalinaWOW on May 18, 2018, 01:08:18 amFully agreed.For example, when microbenchmarking software, it is much better to use median (or some quantile) to describe the time or cycles taken by some code, rather than mean/average. This is because the timing errors are completely biased (timing may contain other, unrelated events), and cause a significant shift in the average. The standard deviation of the timings depends mostly on the error frequency and magnitude, and doesn't really tell anything about the code itself being microbenchmarked.Even for us humans, it is useful and easy to characterize a code with a microbenchmarking result similar to e.g."this code runs in less than X cycles(or nanoseconds on some specific hardware)in at least 50% of runs".Of course, on a higher level, microbenchmarking itself is only indicative, as other code executing at the same time (especially on multithreaded architectures with shared caches between cores) can affect the total run time of the code on a real workload. (That being the difference between a microbenchmark and a proper benchmark: attempting to measure real world tasks and operation.)