Simple Problem using Bayes Rule This is Exercise 1 in Chapter 2 of the Probabilistic Robotics book by S. Thrun etal.
Problem. A robot uses a range sensor that can measure ranges from $1$m to $3$m. For simplicity, assume that actual ranges are distributed uniformly in this interval. Unfortunately, the sensor can be faulty. When it is faulty, it constantly outputs a range below $1$m, regardless of the actual range in the sensor's measurement cone. We know that the prior probability of a faulty sensor is $0.01$.
Suppose the robot queried its sensor $N$ times and every single time the measurement value is below $1$m. What is a posterior probability of a sensor fault as a function of $N$?
Attempted Solution. Let $\{X = 0\} = \{\text{sensor is faulty}\}$ and let $Z_k$ denote the $k^{\text{th}}$ sensor measurement. From the problem statement,
\begin{equation}
\begin{aligned}
P(X = 0) &= 0.01,\\
P(Z_k < 1) &= 1/3,\\
P(Z_1 < 1, \ldots, Z_N < 1 | X = 0) &= 1.
\end{aligned}
\end{equation}
I assume that the sensor measurements are independent, i.e.,
\begin{equation}
P(Z_1 < 1, \ldots, Z_N < 1) = P(Z_1 < 1) \cdot \ldots \cdot  P(Z_N < 1) = (1/3)^N.
\end{equation}
The probability we are after is $P(X = 0 | Z_1 < 1, \ldots, Z_N < 1)$. Using Bayes rule:
\begin{align}
P(X = 0 | Z_1 < 1, \ldots, Z_N < 1) &= \frac{P(Z_1 < 1, \ldots, Z_N < 1 | X = 0) P(X = 0)}{P(Z_1 < 1, \ldots, Z_N < 1)} \\
&= \frac{1 \cdot 0.01}{(1/3)^N}.
\end{align}
This is not a probability since it is not bounded by 1. Where is the mistake?

I will follow the OP's interpretation of the exercise. Then there are two ways the sensor can generate $N$ results below $1m$. Either the sensor is faulty, with probability $0.01$; or it is working with probability $0.99$ and measures $N$ values lower then $1m$, which has probability $(1/3)^N$.
In Bayesian statistics we take the sum of these two probabilities [$= 0.01 + 0.99*(1/3)^N$] and calculate the relative frequency of the desired result [faulty $= 0.01$]. If we do this, the posterior probability that the sensor is faulty is given by:
$$P = \frac {0.01} {0.01 + 0.99 * (1/3)^N}$$
This formula gives the correct result for $N = 0$. Furthermore if $N$ is very large the probability goes to $1$.
