Re: DiscreteUniformDistribution PDF isn't piecewise?

• To: mathgroup at smc.vnet.net
• Subject: [mg107697] Re: DiscreteUniformDistribution PDF isn't piecewise?
• From: DrMajorBob <btreat1 at austin.rr.com>
• Date: Tue, 23 Feb 2010 08:04:12 -0500 (EST)
• References: <hlqu3v\$go8\$1@smc.vnet.net> <201002220807.DAA28826@smc.vnet.net>

```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

```

• Prev by Date: Re: Handheld mathematica
• Next by Date: Re: ? about MatrixPlot used with ListPlot
• Previous by thread: Re: DiscreteUniformDistribution PDF isn't piecewise?
• Next by thread: Re: DiscreteUniformDistribution PDF isn't piecewise?