Skip to main content
19 events
when toggle format what by license comment
Mar 23, 2017 at 21:15 answer added user44169 timeline score: 0
Mar 23, 2017 at 20:49 history edited user44169 CC BY-SA 3.0
added 1 character in body
Mar 23, 2017 at 20:02 history edited user44169 CC BY-SA 3.0
deleted 1 character in body
Mar 23, 2017 at 16:32 vote accept CommunityBot
Mar 23, 2017 at 16:30 history edited user44169 CC BY-SA 3.0
added 1 character in body
Mar 23, 2017 at 15:44 comment added JimB I think that $K$ takes on the values 0 through $2 M$.
Mar 23, 2017 at 15:27 answer added JimB timeline score: 4
Mar 23, 2017 at 13:33 comment added J. M.'s missing motivation Right, I purposely did not give a complete definition; I'll leave that to somebody else. I only wanted to illustrate that SeriesCoefficient[] is useful for taking arbitrary-order derivatives of a generating function.
Mar 23, 2017 at 13:25 comment added user44169 @J.M. the series is finite in this case so Coefficientworks, but the problem is that when I tried to use it inside ProbabilityDistribution it says that my distribution is zero. And I need all the coefficients, not only the negatives, as I showed in the piecewise function of the question.
Mar 23, 2017 at 13:11 comment added J. M.'s missing motivation Actually, you'll want to use SeriesCoefficient[] for that: f[k_Integer?Positive] := SeriesCoefficient[(c/(Dd x) + (Dd - t - c)/Dd + (t - d) x/Dd + d x^2/Dd)^m, {x, 0, k}]. As for normalization: Method -> "Normalize" is useful for the lazy.
Mar 23, 2017 at 12:45 history edited user44169 CC BY-SA 3.0
added 157 characters in body
Mar 23, 2017 at 12:42 comment added user44169 the bracket mean "coefficient of". I tried to define this distribution with the built-in function Coefficientand using assumptions but it says that my distribution is zero... The useful thing here is that, if it works, I can have a symbolic expression (that depends on the parameters) for the mean.
Mar 23, 2017 at 12:12 comment added Szabolcs Unfortunately I cannot write an answer using the example from your question because I do not fully understand it (I don't know the meaning of the square brackets in $[x]$ and I do not see if $f(k)$ is normalized (which is necessary for ProbabilityDistribution)
Mar 23, 2017 at 12:11 comment added Szabolcs In general, you can define distributions with parameters as usual. For example dist = ProbabilityDistribution[((-1 + x)/x) x^-k, {k, 0, Infinity, 1}]. Here x is a parameter. Mean[dist] and Variance[dist] work. You will notice that the latter is a ConditionalExpression, because these probabilities make sense only if x>1. It is these kinds of assumptions that are harder to control when using Mean/Variance than when you do the Sums directly.
Mar 23, 2017 at 10:37 history edited J. M.'s missing motivation
edited tags
Mar 23, 2017 at 10:12 comment added user44169 @Szabolcs well, I want to define it as a probability distribution to evaluate easily mean, variance and other parameters. But you right, probably is not needed at all, more like I wanted to see how to use this built-in function and if is possible to define these kind of probability distributions with various parameters.
Mar 23, 2017 at 10:09 comment added Szabolcs I guess the important question is: what do you want to do with this distribution? ProbabilityDistribution may or may not be the best way to deal with it.
Mar 23, 2017 at 10:07 comment added Szabolcs Yes, ProbabilityDistribution can be used when you have parameters. Just make sure that the probabilities add up to 1—it doesn't check this. Also, if you have too many parameters, many of the simple symbolic calculations (like Mean) may fail. Consider also setting $Assumptions in that case.
Mar 23, 2017 at 9:51 history asked user44169 CC BY-SA 3.0