Re: Plot PDF of a Discrete Random Variable
- To: mathgroup at smc.vnet.net
- Subject: [mg63775] Re: [mg63761] Plot PDF of a Discrete Random Variable
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sat, 14 Jan 2006 02:32:16 -0500 (EST)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
Needs["Statistics`"]; {n=9, p=Random[]/2+1/4} dist=BinomialDistribution[n, p]; v=Table[{k, PDF[dist, k]}, {k, 0, n}]; {Total[v[[All, 2]]], Mean[dist], StandardDeviation[dist]} Show[Graphics[{Red, AbsoluteThickness[2], Line[{#, {1, 0}#}]&/@v}], Axes->True]; Bob Hanlon > > From: Thomas Madden <thomas.madden at sbcglobal.net> To: mathgroup at smc.vnet.net > Subject: [mg63775] [mg63761] Plot PDF of a Discrete Random Variable > > What is the best way, or the typical way, to plot the PDF of a discrete > random variable? Binomial for example. > > Thanks for any help. > >