Re: DiscreteUniformDistribution PDF isn't piecewise?

• To: mathgroup at smc.vnet.net
• Subject: [mg107699] Re: DiscreteUniformDistribution PDF isn't piecewise?
• From: DrMajorBob <btreat1 at austin.rr.com>
• Date: Tue, 23 Feb 2010 08:04:33 -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.

My solution with DiracDelta contains information about the range directly
in the function, whereas Mathematica's implementation keeps the domain
information separately.

Yet Mathematica has no "Domain" function to let us retrieve it.

I think this was a plus for the mathStatica package: each distribution
could be queried for its domain or support.

Bobby

On Mon, 22 Feb 2010 21:40:38 -0600, Peter Falloon <pfalloon at gmail.com>
wrote:

> Ah okay, I now see _your_ point ;-), and it's made me think that perhaps
> the
> real problem here is that we need to distinguish between probability
> density
> functions p(x), where to get a meaningful probability you always need to
> integrate it, and probability mass functions, which are only meaningful
> for
> discrete variables.
>
> For the
> case in point, I agree that what you propose would be the "right" way
> to define a PDF. However, since we
> are dealing
> with a discrete distribution, we should actually be dealing with a
> PMF, which would only be defined for integer arguments.
>
> It seems like the current implementation in Mathematica is attempting
> to blur the distinction between PDF and PMF,
> indeed, I just checked and they do say as much in the documentation:
>
> "For continuous distributions, PDF[dist,x]dx gives the probability that
> an
> observed value will lie between x and x+dx for infinitesimal dx.
> For discrete distributions, PDF[dist,x] gives the probability that an
> observed value will be x."
>
> So in that sense I would still argue that they should use your formula,
> but
> with KroneckerDelta -- since they mean for it to be interpreted as a PMF.
>
> Cheers,
> Peter.
>
> On Tue, Feb 23, 2010 at 2:26 PM, DrMajorBob <btreat1 at austin.rr.com>
> wrote:
>
>> I meant what I wrote, I think, except that I forgot to normalize:
>>
>> pdf2[x_] = Sum[DiracDelta[x - n], {n, 1, 6}]/6
>>
>> 1/6 (DiracDelta[-6 + x] + DiracDelta[-5 + x] + DiracDelta[-4 + x] +
>>   DiracDelta[-3 + x] + DiracDelta[-2 + x] + DiracDelta[-1 + x])
>>
>> The total integral is one:
>>
>> Integrate[pdf2@x, {x, 0, 7}]
>>
>> 1
>>
>> And the plotted CDF is correct:
>>
>> Plot[Integrate[pdf2@x, {x, 0, y}], {y, 0, 7}]
>>
>> That doesn't work for KroneckerDelta or DiscreteDelta.
>>
>> However...
>>
>> Table[pdf2@x, {x, 1, 6}]
>>
>> {DiracDelta[0]/6, DiracDelta[0]/6, DiracDelta[0]/6, DiracDelta[0]/6,
>>  DiracDelta[0]/6, DiracDelta[0]/6}
>>
>> So I take your point. pdf2 is a great precursor to the CDF, but a poor
>> PDF.
>>
>> Bobby
>>
>> On Mon, 22 Feb 2010 18:13:21 -0600, gekko <pfalloon at gmail.com> wrote:
>>
>>  On Feb 23, 11:04 am, DrMajorBob <btre... at austin.rr.com> wrote:
>>>
>>>> A more correct pdf for the example is
>>>>
>>>> Function[x, If[MemberQ[Range[1, 6], x], 1/6, 0]]
>>>>
>>>> An even better answer (if I'm not getting things backward) might be
>>>>
>>>> pdf2[x_] = Sum[DiracDelta[x - n], {n, 1, 6}]
>>>>
>>>
>>> Of course you mean KroneckerDelta (or DiscreteDelta) rather than
>>> DiracDelta... ;-)
>>>
>>> Cheers,
>>> Peter.
>>>
>>
>>
>> --
>> DrMajorBob at yahoo.com
>>

--
DrMajorBob at yahoo.com

```

• Prev by Date: Re: Module, DynamicModule & MemoryInUse
• Next by Date: Re: Re: Re: problem with double integral - Very
• Previous by thread: Re: DiscreteUniformDistribution PDF isn't piecewise?
• Next by thread: Re: DiscreteUniformDistribution PDF isn't piecewise?