What is the true value given successive sub-unity sensor readings?

  • Context: Graduate 
  • Thread starter Thread starter carllacan
  • Start date Start date
  • Tags Tags
    Bayesian Filter
Click For Summary

Discussion Overview

The discussion revolves around the probabilistic analysis of sensor readings that may indicate a true value within the range (0, 3). The focus is on determining the probability that the actual value is below 1 given that the sensor outputs values under 1, especially when multiple measurements yield the same result. The conversation explores the implications of sensor failure and the independence of measurements.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant calculates the probability that the actual value is below 1 using Bayes' Theorem, concluding a high probability of 0.98 based on a single measurement under 1.
  • Another participant argues that repeated measurements under 1 do not imply independence of the events and suggests that the probability of the actual value being less than 1 decreases with more readings under 1.
  • Some participants introduce complex equations to analyze the situation, emphasizing the need to differentiate between sensor readings and sensor failures.
  • There is a suggestion that the calculations should consider the joint probabilities of true values and sensor failures, indicating that the assumptions made in earlier calculations may not hold.
  • One participant proposes that the probability of the true value being greater than 1 should be calculated instead, as it may provide insights into the overall problem.
  • Another participant mentions that no iterative procedure is necessary for the calculations, although they acknowledge that understanding the foundational concepts is important for more complex problems.

Areas of Agreement / Disagreement

Participants express disagreement on the interpretation of the probabilities related to multiple sensor readings. There is no consensus on the correct approach to calculate the probabilities, with various models and interpretations being proposed.

Contextual Notes

Participants highlight the complexity of the problem, noting that the independence of sensor failures does not necessarily translate to independence in the probabilities of the true values. The discussion also touches on the implications of assuming a single true value across multiple measurements.

Who May Find This Useful

This discussion may be useful for those interested in Bayesian probability, sensor analysis, and the implications of measurement errors in statistical modeling.

carllacan
Messages
272
Reaction score
3
We have a sensor that measures a certain value that lies in the range (0, 3). The sensor is not perfect, and sometimes it fails. When this happens it ouputs a value under 1, regadless of the actual value. The failure probability is 0,01.

Suposing the sensor outputs a value under 1, what is the probability that the actual value is below 1? Suposing that we repeat the measurement N times and we always obtain a value under 1 what is the probability that the actual value is below 1?

My attempt at a solution:

Call a the actual value, and s the measured value. Then P(a<1) = \frac{1}{3} and P(a>1) = \frac{2}{3}.Also P(s<1|a<1) = 1, P(s<1|a>1) = 0.01 and so P(s<1) = P(s<1|a<1)*P(a<1) + P(s<1|a>1)*P(a>1) = 1 \frac{1}{3}+0.01 \frac{2}{3} = 0.34 .

Using the Bayes Theorem P(a<1|s<1) = \frac{P(s<1|a<1)P(a<1)}{P(s<1)} = \frac{1/3}{0.34} = 0.98

When we get to the N measuremetns case I start having problems. Intuitively I think that measurement failures are independent of each other, that is, a faulty first measurement does not influence the probability of a faulty second measurement, and so on. Then the answer would simply be P(a<1| s_{1:N} < 1) = 0.98^N. It seems though misleadingly simple.

Could you help me out?
 
Last edited:
Physics news on Phys.org
You need to distinguish between the event "s<1" (S_{i}) and the event "failure" (F_{i}). The F_{i} may be independent, but the S_{i} are certainly not, since they measure the value. Your result would imply that a repeated measurement of s<1 actually decreases the chance of a<1, which is absurd. Let A be the event "a<1". Then

<br /> \begin{equation}<br /> \label{eq:r1}<br /> P(A|S_{1}\wedge{}S_{2})=<br /> P(A|S_{1}\wedge{}S_{2}\wedge{}F_{1}\wedge{}F_{2})P(F_{1}\wedge{}F_{2})+<br /> P(A|S_{1}\wedge{}S_{2}\wedge{}F_{1}\wedge\urcorner{}F_{2})P(F_{1}\wedge\urcorner{}F_{2})+<br /> \end{equation}<br />

<br /> \begin{equation}<br /> \label{eq:r2}<br /> P(A|S_{1}\wedge{}S_{2}\wedge\urcorner{}F_{1}\wedge{}F_{2})P(\urcorner{}F_{1}\wedge{}F_{2})+<br /> P(A|S_{1}\wedge{}S_{2}\wedge\urcorner{}F_{1}\wedge\urcorner{}F_{2})<br /> P(\urcorner{}F_{1}\wedge\urcorner{}F_{2})=<br /> \end{equation}<br />

<br /> \begin{equation}<br /> \label{eq:r3}<br /> \frac{1}{30000}+\frac{9999}{10000}=\frac{29998}{30000}<br /> \end{equation}<br />

Now, that's more like it. The more often you measure "s<1" the more
unlikely \urcorner{}A becomes.
 
Last edited by a moderator:
stlukits said:
You need to distinguish between the event "s<1" (S_{i}) and the event "failure" (F_{i}). The F_{i} may be independent, but the S_{i} are certainly not, since they measure the value. Your result would imply that a repeated measurement of s<1 actually decreases the chance of a<1, which is absurd. Let A be the event "a<1". Then

<br /> \begin{equation}<br /> \label{eq:r1}<br /> P(A|S_{1}\wedge{}S_{2})=<br /> P(A|S_{1}\wedge{}S_{2}\wedge{}F_{1}\wedge{}F_{2})P(F_{1}\wedge{}F_{2})+<br /> P(A|S_{1}\wedge{}S_{2}\wedge{}F_{1}\wedge\urcorner{}F_{2})P(F_{1}\wedge\urcorner{}F_{2})+<br /> \end{equation}<br />

<br /> \begin{equation}<br /> \label{eq:r2}<br /> P(A|S_{1}\wedge{}S_{2}\wedge\urcorner{}F_{1}\wedge{}F_{2})P(\urcorner{}F_{1}\wedge{}F_{2})+<br /> P(A|S_{1}\wedge{}S_{2}\wedge\urcorner{}F_{1}\wedge\urcorner{}F_{2})<br /> P(\urcorner{}F_{1}\wedge\urcorner{}F_{2})=<br /> \end{equation}<br />

<br /> \begin{equation}<br /> \label{eq:r3}<br /> \frac{1}{30000}+\frac{9999}{10000}=\frac{29998}{30000}<br /> \end{equation}<br />

Now, that's more like it. The more often you measure "s<1" the more
unlikely \urcorner{}A becomes.

I understand your solution, but, don't you have to use another time the Bayes Theorem? Like "on top" of the first result? This comes from a introduction to recursive Bayesian filters, so I "feel" like there should be an iterative procedure. Or am I wrong?
 
No iteration needed.

<br /> \begin{equation}<br /> P(A|S_{1:N})=\frac{1}{3}*(0.01)^{N}+\frac{100^{N}-1}{100^{N}}<br /> \end{equation}<br />

I guess this is an iteration of sorts, which you can prove by induction, on the Total Probability Theorem

http://mathworld.wolfram.com/TotalProbabilityTheorem.html
 
Last edited by a moderator:
stlukits said:
No iteration needed.

<br /> \begin{equation}<br /> P(A|S_{1:N})=\frac{1}{3}*(0.01)^{N}+\frac{100^{N}-1}{100^{N}}<br /> \end{equation}<br />

I guess this is an iteration of sorts, which you can prove by induction, on the Total Probability Theorem

http://mathworld.wolfram.com/TotalProbabilityTheorem.html

I understand that there is no need, but this is the foundation for more complicated problems. Namely problems in which we have a probability distribution over many values and the reality is influenced by probabilistic actions. Or, mathematically, we have p(z_t| x_t ) and p(x_t| u_t ).

In the case of this problem:

p(z_t| x_t ) becomes
if x_t &lt; 1:~~ p(z_t|x_t) = 1 for z_t &lt; 1 and 0 for z_t &gt; 1
if x_t &gt; 1:~~ p(z_t|x_t) = 0.01 for z_t &lt; 1 and 0.99 for z_t &gt; 1

And p(x_t| u_t ) is just p(x).

Later on these distributions will be far more complicated, so I need to understant the general method, aplied to this problem, in order to better understand more advanced things.
 
carllacan said:
Suposing the sensor outputs a value under 1, what is the probability that the actual value is below 1?
When we get to the N measuremetns case I start having problems. Intuitively I think that measurement failures are independent of each other, that is, a faulty first measurement does not influence the probability of a faulty second measurement,
As stlukits says, even if the probabilities of failures are independent, the probabilities of the true values being less than one may not be. Although the problem is stated as though there is one identical true value for all the trials, when you multiply the Bayesian probabilities, you are assuming the true values are independent for all measurements. If there is one true value, your calculation must change.

P(true value < 1 | all N measurements < 1) = P( (true value < 1) and (all N measurements < 1))/P(all N measurements < 1)

This is still a direct application of Bayes' Rule.
 
  • Like
Likes   Reactions: 1 person
stlukits was correct in that your original answer is wrong. A long string of readings of values less than one is strongly indicative that the true value is indeed less than one. It is the probability that the true value is greater than one that should be decreasing. After that, I don't know what stlukits was calculating. His result is incorrect.I'll look at the sample space as the set cross product of (true value ≥ 1, true value <1) and (sensor read true, sensor failed):
  • The true value is greater than one and the sensor read true,
  • The true value is greater than one and the sensor failed,
  • The true value is less than one and the sensor read true,
  • The true value is less than one and the sensor failed.
Note that a sensor reading of less than one excludes the first outcome. The only way to have a true value greater than one and a sensor reading less than one is if the sensor failed. This suggests that you look at the opposite of the problem than you were asked to look at: What is the probability that the true value is greater than one given a sensor reading that was less than one? Try using Bayes' Law to calculate this probability. The probability that the true value is less than one is one minus this calculated probability.

To calculate the probability that the true value is greater than one given two readings that are both less than one, you simply change the prior probability from your default prior based on the principle of indifference to the probability you calculated above for a true value greater than one given a single reading less than one. Similarly, the probability that the true value is greater than one given n readings all of which are less than one, you change the prior to the probability of n-1 successive sub-unity readings.
 
  • Like
Likes   Reactions: 1 person

Similar threads

  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 45 ·
2
Replies
45
Views
7K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
12
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 80 ·
3
Replies
80
Views
8K