Enhancement: Addition of Probability Functions #168
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear Fermat.js Maintainers,
I hope this message finds you well. I am writing to submit a pull request that enhances Fermat.js by adding a comprehensive set of probability functions to the library. This addition extends the library's capabilities from number theory to probability theory, providing users with a robust suite of tools for statistical analysis.
Usage Example:
Changes Made:
Added probability functions covering factorial, permutations, combinations, probability mass function (PMF), cumulative distribution function (CDF), binomial distribution, geometric distribution, Poisson distribution, normal distribution, exponential distribution, uniform distribution, joint probability, and conditional probability.
Included TypeScript type annotations for improved code readability and maintainability.
Exported all functions for ease of use in various contexts.
Purpose:
The purpose of this contribution is to make Fermat.js a more versatile and comprehensive mathematics and statistics library. With the addition of these probability functions, users will be able to perform a wide range of statistical analyses, from basic calculations to advanced probability distributions.
I have thoroughly tested these functions to ensure their correctness and have added appropriate error handling. I am open to feedback and am willing to make any necessary adjustments to align with Fermat.js's coding standards.
Thank you for considering this contribution. I believe it will enhance the library's utility for a broader audience.
Best regards,
Sriman Tharun Kumar S
Sriman7