Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Addition of Probability Functions #168

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Srimans7
Copy link

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:
Screenshot 2024-02-14 at 10 59 47 AM

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

@plegner
Copy link
Member

plegner commented Feb 15, 2024

Thanks for your contributions! However, rather than adding lots of new functions, can we update the existing functions here:
https://github.com/mathigon/fermat.js/blob/master/src/random.ts#L73
https://github.com/mathigon/fermat.js/blob/master/src/combinatorics.ts#L19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants