# counting experiment, setting a confidence interval in an input variable

I want to measure the distance between a photosensor and an isotropic light source.

The sensor gives me a digital number $$x$$ as a function of detected light intensity. The light intensity at the sensor is inversely proportional to the square of the distance to the source($$\propto \frac{1}{d^{2}}$$). I know the light intensity of the source, and have a formula relating the distance and the numbers($$x=f(d)$$).

It is expected that the digital numbers have a Poisson distribution. Then the parameter $$\lambda$$ is a function of $$d$$. After a set of observations, if I would have a sample mean $$\bar x$$, then how could I determine the distance and the 95% confidence interval?

In basic statistics textbooks, the confidence interval is explained in the context where the population mean is fixed but you don't know the value. Then you use the sample mean and the sample standard deviation to determine the confidence interval in $$\bar x$$. But I wonder how to determine the interval in the situation above.