Re: DiscreteUniformDistribution PDF isn't piecewise?
- To: mathgroup at smc.vnet.net
- Subject: [mg107700] Re: DiscreteUniformDistribution PDF isn't piecewise?
- From: Peter Falloon <pfalloon at gmail.com>
- Date: Tue, 23 Feb 2010 08:04:44 -0500 (EST)
- References: <hlqu3v$go8$1@smc.vnet.net> <201002220807.DAA28826@smc.vnet.net>
> > The problem with a PMF is one we've already seen: 1/6& isn't a PMF (or PDF) > at all, unless we know its accompanying domain. It could be uniform discrete > on ANY 6 numbers or other objects. > I agree; what I'm trying to say is that a possible solution for a PMF (as opposed to a PDF) is as you suggested, except replacing DiracDelta by KroneckerDelta: myPDF[DiscreteUniformDistribution[{imin_Integer,imax_Integer}], x_] := (1/(imax-imin+1))*Sum[KroneckerDelta[x,i], {i,imin,imax}] This has the desired behaviour for a PMF (which, according to the documention, is what the Mathematica implementation seeks to provide for discrete distributions such as this one) -- whereas the DiracDelta version would be appropriate for a PDF. Cheers, Peter.
- References:
- Re: DiscreteUniformDistribution PDF isn't piecewise?
- From: "Nasser M. Abbasi" <nma@12000.org>
- Re: DiscreteUniformDistribution PDF isn't piecewise?