Hi, and welcome to the forum.
AOO Help wrote:HYPGEOMDIST: Returns the hypergeometric distribution.
Syntax: HYPGEOMDIST(X; NSample; Successes; NPopulation)
X: the number of results achieved in the random sample.
NSample: the size of the random sample.
Successes: the number of possible results in the total population.
NPopulation: the size of the total population.
It will be far simpler to calculate the value directly than to call the Calc function from an external application. The calculation is easily done in a dozen lines in any decent programming language. I doubt if you can call the Calc function without installing large parts of the Open Office application. AOO is an integrated system; you can't install selected bits and pieces of it. Even if you install the whole suite, it will be more challenging to determine how to utilize the Calc function than it will be to do the calculation yourself.
Read about the Probability Mass Function (pmf) of the
Hypergeometric distribution. In this reference N (population size) is the same as NPopulation above, K (number of success states in the population) is Successes above, n (number of draws) is NSample above, and k (number of successes) is X above. Read about
binomial coefficients if you're not familiar with how to calculate them.
If this answered your question please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800 on MacOS 10.14.6. The locale for any menus or Calc formulas in my posts is English (USA).