Re: Discrete probablitiy distributions
- To: mathgroup at smc.vnet.net
- Subject: [mg16313] Re: Discrete probablitiy distributions
- From: "Seth Chandler" <SChandler at uh.edu>
- Date: Sun, 7 Mar 1999 01:05:40 -0500
- Organization: University of Houston
- References: <7bo143$dqc@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Suppose your list is probs={0.4,0.3,0.2,0.1} then
ListPlot[FoldList[Plus,0,probs],PlotJoined->True]
does what you want.
Seth J. Chandler
Associate Professor of Law
University of Houston Law Center
Bjorn Leonardz wrote in message <7bo143$dqc at smc.vnet.net>...
>Hello MathGroup,
>
>I have been trying to find a good way of making Mathematica help me
>prepare some lecture notes in elementary probability. This is what I
>want to achieve:
>
>Given the probability function for a discrete random variable, e.g in
>the form of a list of probabilities
>
>1. Plot the probability function (I can do this with ListPlot or
>BarChart)
>
>2. Plot the cumulative probability function.
>
>That remains to be done in some reasonably automatic way.
>
>I'd be glad for any helpful hints.
>
>Regards,
>Bjorn Leonardz
>Stockholm School of Economics
>
>