# The number of defects in a piece of wire that is x yards long is $X\sim\operatorname{Poisson}(ux)$ for any $x>0$

The number of defects in a piece of wire that is x yards long is $X\sim\operatorname{Poisson}(ux)$ for any $x>0$.

1. If five defects are found in a 100-yard roll of wire, find a conservative one-sided upper 95% confidence limit for the mean number of defects in such a roll.
2. If a total of 15 defects are found in five 100-yard rolls of wire, find a conservative one-sided upper 95% confidence limit for u.

I think I'm supposed to use Chi-Square. The upper limit is $u_u =$ $X^2(2\sum_{i=0}^n X_i+2)/2n$

For part 1, what I did was just let n=1 and sum of x = 5, so I had $X^2(2(5)+2)/2 = 10.515$

Is this right? Any help is appreciated. Thanks!

Edit: POI means Poisson distribution, I'll edit that. ux is just the poisson parameter u*x where x is the length of the wire in yards.

• Please explain what "POI" means and how "$ux$" is related to $x$.
– whuber
Mar 1, 2016 at 19:20
• Added an edit in the original post.
– Joe
Mar 1, 2016 at 19:27
• Also why are you subtracting a Poisson random variable from $x$ (I'm guessing $X$ is the same as $x$)? Why not let the count itself be Poisson distributed? Mar 1, 2016 at 19:27
• Yes, that is what it is supposed to be. X is Poisson distributed, I don't know what the common notation is for that. My apologies. I think I made it more clear now
– Joe
Mar 1, 2016 at 19:40
• That makes sense. I probably should've guessed that. Mar 1, 2016 at 19:44

One way to check your work is with simulation. For instance, your answer to (1) can be checked in R with a command like

mean(rpois(1e6, 10.515) > 5)


which simulates one million (1e6) trials where the true mean number of defects is $10.515$ and reports the proportion with more than $5$ defects. The idea behind a confidence limit is that when the true mean is greater than this, you are unlikely to see as few as just $5$ defects. This situation should be right on the borderline where there is a 95% chance of observing more than $5$ defects. Compare the output with the intended confidence level of $0.95$. (I obtain $95.0005\%$, which is satisfactorily close.)

As another example, general rules of thumb suggest the UCL for $u$ should be somewhere around

$$\frac{15 + 2\sqrt{15}}{5} \approx 4.55.$$

A comparable simulation confirms this value is a little low, but not by much, because its coverage of $94.24\%$ is a tiny bit lower than the intended $95\%$.

u <- (15 + 2*sqrt(15))/5
mean(rpois(1e6, u*5) > 15)


After you work out a more precise value of $u$, plug that into this simulation to see what the coverage is.

• Thanks! When you use the general rule of thumb to obtain 4.55, where does the 15 come from? Is this just a formula? Sorry if this is simple question. Also, the code you use first, "mean(rpois(1e6, 10.515) > 5)", gives a result around .95, as you said. So doesn't this mean that 10.515 is the correct answer?
– Joe
Mar 1, 2016 at 20:42
• All should become clear, Joe, when you compare the numbers in the answer to the numbers in the question. The "2" is the only one that comes out of thin air: it's a very crude multiplier often used for 95% and 97.5% intervals. Bear in mind that a Poisson(15) distribution has a mean of 15 and a variance of 15. And yes, if I didn't make it perfectly clear, the first example confirms you answered (1) correctly.
– whuber
Mar 1, 2016 at 20:43
• Right, I just overlooked part #2, which is where the 15 comes from. Thanks again, I really appreciate it!
– Joe
Mar 1, 2016 at 20:47