MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Manipulating a Binomial CDF

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94035] Manipulating a Binomial CDF
  • From: Jamie Coventry <jcoventry at renaissance.edu.hk>
  • Date: Tue, 2 Dec 2008 05:20:35 -0500 (EST)
  • References: <gh0jl6$5mk$1@smc.vnet.net> <200812020543.AAA19191@smc.vnet.net>

Hi,

I have a query with a plot I'm doing with the code below. When I take 
the "probability of success" slider down to values less than 0.2, the 
graph of the BinomialCDF displays strange behaviour at n=0. The value 
of P(N=E2=89=A40) is calculated correctly, but the point is displayed below 
the horizontal axes.

Can anyone explain this?

Here's the code:

Manipulate[
  Grid[{{
     ListPlot[
      Table[Tooltip[{i, PDF[BinomialDistribution[n, p], i]}], {i, 0, 
n}],
      Filling -> Axis, FillingStyle -> Directive[Blue, Thick],
      PlotLabel -> Style["Probability density", 14, Bold],
      ImageSize -> {280, 280}, AxesLabel -> {"n", "p"},
      PlotStyle -> {Thick, PointSize[Large]}],
     ListPlot[
      Table[Tooltip[{i, CDF[BinomialDistribution[n, p], i]}], {i, 0, 
n}],
      Filling -> Axis, FillingStyle -> Directive[Blue, Thick],
      PlotLabel -> Style["Probability density", 14, Bold],
      ImageSize -> {280, 280}, AxesLabel -> {"n", "p"},
      PlotStyle -> {Thick, PointSize[Large]}],
     }}]
  , {{n, 10, "Number of terms"}},
  {{p, 0.5, "Probability of success"}, 0, 1, 0.01}]

Thanks in advance,

Jamie


  • Prev by Date: Re: ListPlot and Tooltip
  • Next by Date: Re: Copying text out of mathematica
  • Previous by thread: Re: Mathematica computes a different answer in version 7
  • Next by thread: RE: Manipulating a Binomial CDF