# Thread: Am I being swindled with my sleepers?

1. ## Am I being swindled with my sleepers?

If I buy 17 new railway sleepers, the specification sheet of which accurately states that 5% sleepers are not cuboid, what is the probability that I find 9 out of 17 of the sleepers on delivery are not cuboid (assuming there are no other confounding influences on shape and that the sleepers are randomly selected)?

This is a real situation - the company supplying the sleepers tells me I've just been unlucky. I want to illustrate my response with the probability of this event happening randomly, which I'm guessing is pretty slim.

Thank you, TommyF (a medic, not a mathematician)

2. Originally Posted by tommyf
If I buy 17 new railway sleepers, the specification sheet of which accurately states that 5% sleepers are not cuboid, what is the probability that I find 9 out of 17 of the sleepers on delivery are not cuboid (assuming there are no other confounding influences on shape and that the sleepers are randomly selected)?

This is a real situation - the company supplying the sleepers tells me I've just been unlucky. I want to illustrate my response with the probability of this event happening randomly, which I'm guessing is pretty slim.

Thank you, TommyF (a medic, not a mathematician)

If the probability that a sleeper is defective is $5\%$, and the sleepers in a batch are independent samples from the population of all sleepers with this defect rate, then the number defective in a batch of $17$ has a binomial distribution $B(17,0.05)$ , and so the probability that $9$ or more would be defective by chance is:

$
p(N_{dfctv} \ge 9)=\sum_{k=9}^{17} b(k,17,0.05) \approx 3.3\ 10^{-8}

$

or as we sometimes describe such probabilities; vanishingly small.

RonL

3. Disclaimer: This is my mathematical opinion. This is not in any way a legal or business opinion. I am treating this problem like any other word problem from any user in this forum. I am not responsible for any and all courses of action you take using the information in this post. I am also not guaranteeing that the information is correct (though I think it is). Understood? In short, I will take no responsibility for the accuracy of my answer and I certainly take no responsibility for anything you do with the information.

Just for your interest, this is a binomial distribution. "Success" here is finding a non-cuboid sleeper. p=0.05. X is the random variable for how many successes there were out of N=17 trials. Now I am interpreting the claim of 5% as saying 5% of what they manufacture is non-cuboid. You could interpret the 5% claim by saying they had some number in stock (say 200) and 5% of those were non-cuboid. I am assuming the former which is I think what makes the most sense. If you assume the latter, I think that it actually makes 9 out of 17 less likely.

$\Pr(X=9) ={17 \choose 9}0.05^9(1-0.05)^8= 3.15e-08$

You could instead ask what is the probability of doing this or worse? Which is really probably the better question to ask.

$\Pr(X\geq9) = \sum_{i=9}^{17}\Pr(X=i)=\ldots= 3.29e-08$

Not much change though.

One way to interpret this is that the chances are worse than 1 in about 30,000,000 (just calculate 1/3.29e-08).

An even better thing to do is to set up a hypothesis test (we've pretty much already done the math needed for this.

Null hypothesis: probability for non-cuboid sleeper is 0.05 (5%)
Alternative hypothesis: probability is greater than 5%

We already calculated the so-called p-value as 3.29e-08. People use different thresholds for when to reject the null hypothesis. For example people often reject the null hypothesis if the p-value falls below 0.1, 0.05, or 0.1. Regardless, this is well below all of them. I.e. statistics is telling you to reject the null hypothesis; the probability is most likely greater than 5%.

Just for giggles I looked to see how high of a probability the success would have to be before you would not reject the hypothesis. If the probability of a non-cuboid sleeper were 25% (null hypothesis), you would start getting to the regime where you would not be able to reject that hypothesis, statistically speaking. So based on your "sample" of 17, I would expect the chances of a non-cuboid sleep are probably greater than 25%.

You could write down a confidence interval for the sample you took, but I think we're beating a dead horse here.

4. Hello, Tommy!

5% of new railway sleepers are not cuboid.
17 sleepers are randomly selected.
What is the probability that 9 sleepers are not cuboid?
. . More than half? . . . pretty slim!
The probability of a defective (D) sleeper is 0.05
The probability of a good (G) sleeper is 0.95

The formula for Binomial Probability gives us:

. . $P(\text{9D, 8G}) \;=\;{17\choose9}(0.05)^9(0.95)^8 \;\approx\;0.000000315$

There will be 9 defective sleepers . . . about once in 32 million samplings.