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

Design review: Pmf arithmetic #9

Open
AllenDowney opened this issue Apr 10, 2019 · 0 comments
Open

Design review: Pmf arithmetic #9

AllenDowney opened this issue Apr 10, 2019 · 0 comments

Comments

@AllenDowney
Copy link
Owner

AllenDowney commented Apr 10, 2019

When you apply an arithmetic operation to a Pmf, there are two things you might mean. For example, multiplication might mean that you want to multiply the probabilities by a scalar, sequence, or sequence of probabilities. Or it might mean you want to compute the Pmf of the product of the quantities.

One possibility is to use the arithmetic operators for the first kind of operation and the named methods (add, sub, mul, div, etc.) for the second kind.

Thoughts?

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

No branches or pull requests

1 participant