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

functions to convolve simple distributions #919

Merged
merged 8 commits into from
Jul 17, 2019

Conversation

glennmoy
Copy link
Contributor

@glennmoy glennmoy commented Jun 25, 2019

These are simple functions to convolve distributions where a closed form exists.

Edit: taken essentially from this list: https://en.wikipedia.org/wiki/List_of_convolutions_of_probability_distributions

Please advise if this is the correct place to put them or if somewhere else would be more suitable.

@glennmoy glennmoy changed the title initial functions to convolve simple distributions WIP: initial functions to convolve simple distributions Jun 25, 2019
@glennmoy glennmoy changed the title WIP: initial functions to convolve simple distributions WIP: functions to convolve simple distributions Jun 25, 2019
@mschauer mschauer self-assigned this Jun 26, 2019
Copy link
Member

@mschauer mschauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice start, next step to think of are tests.

@glennmoy glennmoy changed the title WIP: functions to convolve simple distributions functions to convolve simple distributions Jul 2, 2019
@codecov-io
Copy link

codecov-io commented Jul 2, 2019

Codecov Report

Merging #919 into master will increase coverage by 3.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #919      +/-   ##
==========================================
+ Coverage   73.94%   77.03%   +3.09%     
==========================================
  Files         107      110       +3     
  Lines        5269     5235      -34     
==========================================
+ Hits         3896     4033     +137     
+ Misses       1373     1202     -171
Impacted Files Coverage Δ
src/Distributions.jl 100% <ø> (ø) ⬆️
src/convolution.jl 100% <100%> (ø)
src/utils.jl 74.5% <0%> (-1.97%) ⬇️
src/multivariate/dirichletmultinomial.jl 98.55% <0%> (ø) ⬆️
src/matrix/matrixnormal.jl 97.95% <0%> (ø)
src/matrix/matrixtdist.jl 98% <0%> (ø)
src/multivariate/mvlognormal.jl 96.82% <0%> (+0.05%) ⬆️
src/univariates.jl 64.92% <0%> (+0.48%) ⬆️
src/univariate/discrete/binomial.jl 73.4% <0%> (+0.77%) ⬆️
... and 39 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 432545a...af97ea1. Read the comment docs.

Copy link
Contributor

@nickrobinson251 nickrobinson251 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for adding these!

@nickrobinson251
Copy link
Contributor

BTW \oplus ⊕ has been suggested as an alias for the sum of idendepent ranom Variables which is (the generalisation) of what convolve does. (Presuming we're okay with conflating RVs with their distributions).

Should we add that here?

maybe @mschauer has thoughts?
#307 (comment)

@matbesancon
Copy link
Member

BTW \oplus ⊕ has been suggested as an alias for the sum of indedepent random Variables which is (the generalisation) of what convolve does. (Presuming we're okay with conflating RVs with their distributions).

I think convolve leads to less ambiguity, but would be ok with \oplus as alias

@matbesancon
Copy link
Member

In any case this could go in another PR

@matbesancon
Copy link
Member

alright, I think we can merge this as soon as travis passes, check if you want some last modifications

@glennmoy
Copy link
Contributor Author

alright, I think we can merge this as soon as travis passes, check if you want some last modifications

just cleaned up the comments. merge when ready!

@mschauer mschauer merged commit 558a4ed into JuliaStats:master Jul 17, 2019
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

Successfully merging this pull request may close these issues.

6 participants