[pstricks] [Fwd: Re: binom_distribution]

John Campbell jcdotcalm at shaw.ca
Mon Apr 17 17:45:54 CEST 2006


Thank you very much.  I did not realize that there was a new version of 
pst-func.tex.   I will update; thanks again.

J. Campbell
----- Original Message ----- 
From: "Herbert Voss" <LaTeX at zedat.fu-berlin.de>
To: "Graphics with PSTricks" <pstricks at tug.org>
Sent: Monday, April 17, 2006 4:57 AM
Subject: Re: [pstricks] [Fwd: Re: binom_distribution]


> Poul Riis wrote:
>> To my knowledge a binomial distribution is defined for integral values
>> only.
>
> you mean integer values.
> that's correct, but the lines are connected to show that
> the binomial distribution goes into the normal one for n->\infty
>
>> I don't fully understand why the following seems to work...
>> - And furthermore, I don't understand why it doesn't work for all values
>> of n and p!?
>
> the starting value (k=0) is (1-p)^n, which is a problem for n>125,
> e.g. 0.5^125\approx 2.35e-38, which is nearly the smallest value
> PostScript can handle.
>
> The latest pst-func.tex (from http://perce.de/LaTeX/pst-func/)
> has two macros \psBinomial and \psBinomialN for the normalized
> distribution. Attached an example image of this code:
>
> \documentclass[12pt]{article}
> \usepackage{pst-func}
> \pagestyle{empty}
>
> \begin{document}
>
> \psset{xunit=1cm,yunit=10cm}%
> \begin{pspicture}(-1,0)(7,0.55)%
> \psaxes[Dy=0.2,dy=0.2\psyunit]{->}(0,0)(-1,0)(7,0.5)
> \uput[-90](7,0){$k$} \uput[90](0,0.5){$P(X=k)$}
> \psBinomial[linecolor=red,markZeros,printValue,fillstyle=vlines]{6}{0.4}
> \end{pspicture}
>
> \vspace{1cm}
> \begin{pspicture}(-3,0)(4,0.55)%
> \psaxes[Dy=0.2,dy=0.2\psyunit]{->}(0,0)(-3,0)(4,0.5)
> \uput[-90](4,0){$z$} \uput[90](0,0.5){$P(Z=z)$}
> \psBinomialN[linecolor=red,markZeros,fillstyle=vlines]{6}{0.4}
> \end{pspicture}
>
> \end{document}
>
>
>
> Herbert
>


--------------------------------------------------------------------------------


> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> 




More information about the PSTricks mailing list