4 ms·
Related to that: https://www.schneier.com/blog/archives/2009/05/software_proble.html https://www.schneier.com/blog/archives/2009/05/software_prob... Defense at
by ciscoriordan 2y ago
Related to that: https://www.schneier.com/blog/archives/2009/05/software_proble.html https://www.schneier.com/blog/archives/2009/05/software_prob...
Defense attorneys in a DUI case got their hands on the source code for the breathalyzer. It turned out to have terrible programming, e.g. calculating new averages by averaging a new value with the previous average. The case went all the way to the New Jersey Supreme Court, which still found the device to be acceptable.
- cochleari_major 2y ago“Which would cause the first reading to have more weight than successive readings”, funny enough looks like the opposite of what’s going on.
- AdamJacobMuller 2y agoMaybe it averages from newest -> oldest With software that bad, who can say
- weaksauce 2y agoyeah the language is slightly ambiguous enough where you can't for certain know. first vs newest. the issue is that taken as a whole the quantization of the samples into 8 bins is a much bigger issue along with the problem of the no hardware watchdog or hardware malfunction alarms. along with the poor testing methodologies too.
- danaris 2y agoWell, of course, because that statement is deeply incorrect—the described mistake would cause the most recent reading to have more weight. If you have a set of readings, say, [0.1, 0.02, 0.3, 0.05, 0.08], normally when you average them you would get 0.55—the mean of the set. Calculating the average by "averaging the new reading with the previous average" would mean new + old / 2 every time. That means that for each reading after the first, your "averages" would be: [0.06, 0.18, 0.115, 0.195]. If we add a new reading of 0.01 to each of these, in the first case, we would get an average of 0.46, and in the second case, 0.1025. As you can see, even taking into account the already-very-skewed numbers, the second case biases it much further in favor of the new reading (which, in this case, is very low compared to the existing readings).
- epgui 2y agoOn the face of it, that's absolutely insane.
- krisoft 2y agoIdk, hard to guess based on the layman description, but maybe what they are describing is a rolling average? That would be quite a standard low-pass filter for applications like this. Hard to get upset over that. What matters is not the signal processing but the validation. You take a bunch of people with various blood alcohol levels measured by some already accepted lab technique and you verify that your new measurement technique is measuring within some acceptable error bound of that.
- secondcoming 2y agoThat’s not the formula for a rolling average though
- aidenn0 2y agoAn exponential moving average is a form of weighted rolling average that would match the plain-text description in the complaint and is often used in signal processing as an IIR low-pass filter (an unweighted rolling average over a window is an FIR filter)
- wnoise 2y agoIt is the formula for an exponentially weighted moving average. Which is not appropriate here...
- hiatus 2y agoThe full opinion can be found here: https://law.justia.com/cases/new-jersey/supreme-court/2008/a-96-06-doc.html https://law.justia.com/cases/new-jersey/supreme-court/2008/a...