Skip to main content
18 events
when toggle format what by license comment
Oct 28, 2016 at 20:59 comment added JimB Let us continue this discussion in chat.
Oct 28, 2016 at 20:57 vote accept Andrew S.
Oct 28, 2016 at 16:33 comment added JimB One can still use probability generating functions when the values are non-integer or you can use a multinomial distribution which gives you the probabilities for the frequencies of each possible outcome. If most of the values are integers and only a few are non-integers, then great gains in efficiency are possible. Again, you'd need to give more details.
Oct 28, 2016 at 15:57 comment added Andrew S. @JimBaldwin Right, but I encountered this problem with even a small example and didn't know where to go. Will be testing my actual case with your solution and see how it goes. Thanks!
Oct 28, 2016 at 15:55 history edited Andrew S. CC BY-SA 3.0
added 605 characters in body
Oct 28, 2016 at 15:47 comment added JimB Don't know. You need to give all of the necessary details such as the size of your actual situation. If things are slow with n=10 and just 3 outcomes, then fixing things for n=100 and 100 outcomes might become impossible with some solutions. A small example is great but you also need to indicate the size of your real situation to get appropriate help.
Oct 28, 2016 at 15:42 answer added JimB timeline score: 4
Oct 28, 2016 at 15:40 comment added Andrew S. @JimBaldwin Somehow, I didn't think about this possibility. However, in this case I will have to scale all the possible outcomes of my initial random variable to account for cases when they are non-integer, and to "reverse" it when counting the coefficients. Am I right? If so, then for the provided example works faster then my naive C# code. Are there any caveats with this solution? For example, if my initial distribution consists of like ~100 outcomes, instead of 3? And I still would like to know why TransformedDistribution is so slow.
Oct 28, 2016 at 15:28 comment added Andrew S. @wolfies Provided the code with explanations.
Oct 28, 2016 at 15:11 history edited Andrew S. CC BY-SA 3.0
added 697 characters in body
Oct 28, 2016 at 15:04 comment added JimB You should also give a complete example. For instance, you give the PDF as a formula and not as a Mathematica distribution function. Also, because you state that these are all identical independent random variables, why not use generating functions? The generating function of the sum of $n$ random variables is just the generating function of a single random variable raised to the $n$-th power. You could then use the functions Coefficient or CoefficientList to get the probabilities of interest.
Oct 28, 2016 at 15:00 comment added wolfies Your code makes no sense as you have not defined tX[v], nor vMax, nor resF. It's just gobbledegook at the moment, leaving the reader to guess.
Oct 28, 2016 at 14:35 history edited Szabolcs
edited tags
Oct 28, 2016 at 14:30 history edited Andrew S. CC BY-SA 3.0
added 59 characters in body
Oct 28, 2016 at 14:29 comment added Andrew S. @Szabolcs , yes, you are right. I should expand them. RV stands for random variable.
Oct 28, 2016 at 14:28 comment added Szabolcs It will make your question more attractive if you explain your abbreviations. Please do not create new tags unless it seems clear that there's a benefit (e.g. there are already many questions which could have had the tag) and the name is self explanatory (rv??)
Oct 28, 2016 at 14:12 history edited Szabolcs
edited tags
Oct 28, 2016 at 14:08 history asked Andrew S. CC BY-SA 3.0