# When to use hypergeometric vs binomial

I'm having some trouble understanding if I need to use a hypergeometric distribution. I have a set of components, a small proportion of which are faulty. I now want to know if a feature of that component is associated with faultiness. I know what the probability of faultiness is, so I could cast it as a binomial probability for at least the number of times that feature appears in faulty components. But, it's a small sample, so the issue of hypergeometric arises

I can see why taking cards one by one without replacement from a deck of cards is hypergeometric as there is dependency, but don't see where the dependency is in this case. The number of components, faulty ones and number of features are "just there" and I don't see how the probabilities can be influenced. Is this binomial or hypergeometric?

Edit Each component can have 15 of 51 features. There about 10000 components. The frequency of each feature in the whole sample varies a lot from 5 to ~1200. Any of the features in a component might go wrong and may result in a fault in the component. Other environmental factors mean that it is not simply presence of a feature generating a fault- you could have the same feature in OK and faulty components.

Around 500 components are faulty. I want to know which features are associated with faultiness. I know p(faultiness)=500/10000 and I now want to work out if a feature is unexpectedly frequent in faulty components.

If there were 10 of one particular feature in the population, 6 in faulty, 4 in OK components then I'd be looking for the binomial cdf with p=0.05, n=10, k=6. But should I be using a hypergeometric distribution for these small numbers?

I have a nagging feeling I should but I cannot see where the dependency lies.

• it is hard to follow the problem. Can you please define the problem clearly? Sample size? Objective? etc? Commented Jun 28, 2020 at 21:45
• @GideonKogan sorry - I've tried to explain it better Commented Jun 28, 2020 at 22:24
• I would stick with binomial. From my interpretation of your problem, you are trying to characterize the number of defects in the population, thus why I would use the binomial. If you question sampling from the population and what the chance was from drawing from the defect sub population, then that is a hypergeometric problem. Commented Jun 29, 2020 at 2:37

It is a little difficult from your description to see the problem clearly, which might explain why this post have lingered unanswered for so long. You seems to have many different features which might (or not) be associated with faulty components. With your approach you are looking separately at each feature. Doing this, for each feature you have a $$2\times 2$$ contingency table, and the question binomial or hypergeometric corresponds to analyze this table with Fisher exact test or chi-squared test. Maybe it does not make much of a difference!