summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-03-18 23:41:54 +0000
committerKarl Berry <karl@freefriends.org>2007-03-18 23:41:54 +0000
commit0201728be568157e7cd5c49141ab78608354494f (patch)
treeed97e0ee46db16544d939cd5bf40de98994edcd8 /Master/texmf-dist/doc
parentd8fc29c8d1712d80b8013ad32a302cf2f9748cdf (diff)
pst-func 0.48 (18mar07)
git-svn-id: svn://tug.org/texlive/trunk@4049 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/Changes2
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/README5
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.bib8
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdfbin2139045 -> 2177985 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex192
5 files changed, 134 insertions, 73 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-func/Changes b/Master/texmf-dist/doc/generic/pst-func/Changes
index ea80f23b4c8..15482a342be 100644
--- a/Master/texmf-dist/doc/generic/pst-func/Changes
+++ b/Master/texmf-dist/doc/generic/pst-func/Changes
@@ -1,4 +1,6 @@
..... pst-func.tex
+0.48 2007-03-17 - add another distribution function: psPoisson
+0.47 2007-02-01 - add support of arrows for psPolynomial
0.46 2006-09-06 - using the bool key from xkeyval
- adding the superellipse function (Lame curve)
- uses pstricks-add for algebraic plot
diff --git a/Master/texmf-dist/doc/generic/pst-func/README b/Master/texmf-dist/doc/generic/pst-func/README
index 7aabf8766ee..0989cb41c24 100644
--- a/Master/texmf-dist/doc/generic/pst-func/README
+++ b/Master/texmf-dist/doc/generic/pst-func/README
@@ -2,13 +2,14 @@ pst-func: plotting special mathematical functions:
-- psPolynomial (with derivations)
-- psFourier
-- psBessel
--- psGauss
--- psGaussI (integral)
-- psSi and pssi (integral sin)
-- psCi (integral cosin)
-- psIntegral
-- psCumIntegral
-- psConv
+-- psGauss
+-- psGaussI (integral)
+-- psPoisson
-- psBinomial
-- psBinomialN
-- psLame (Lam\`e\ Curve -- a superellipse)
diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.bib b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.bib
index e9393cce5f0..b69387bdb29 100644
--- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.bib
+++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.bib
@@ -62,8 +62,8 @@
Samarin},
title = {The {\LaTeX} {G}raphics {C}ompanion},
publisher = {{Addison-Wesley Publishing Company}},
- year = {1994},
- edition = {1.},
+ year = {2004},
+ edition = {2.},
address = {Reading, Mass.}
}
@@ -135,9 +135,9 @@
@Book{PSTricks2,
author = {Herbert Vo\ss},
title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX},
- edition = {third},
+ edition = {4.},
publisher = {DANTE -- Lehmanns},
- year = {2006},
+ year = {2007},
address = {Heidelberg/Hamburg}
}
diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
index 06166d0f462..eae559b4ce2 100644
--- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
index 200ea4439f9..92255041f8e 100644
--- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
@@ -358,68 +358,6 @@ way, at the cost of some reduction in graphics resolution.
}
\end{LTXexample}
-\clearpage
-\section{\CMD{psGauss} and \CMD{psGaussI}}
-The Gauss function is defined as
-%
-\begin{align}
-f(x) &= \dfrac{1}{\sigma\sqrt{2\pi}}\,e^{-\dfrac{\left(x-\mu\right)^2}{2\sigma{}^2}}
-\end{align}
-%
-\noindent The syntax of the macros is
-\begin{verbatim}
-\psGauss[options]{xStart}{xEnd}
-\psGaussI[options]{xStart}{xEnd}
-\end{verbatim}
-
-%%JF
-%% comment, the angle brackets below, around "value", make sense
-%% as a convention, so I left them in
-%
-%\noindent where the only new parameter is \verb+sigma=<value>+, with
-%the default of \verb+0.5+ and can also be set in the usual way with
-%\verb+\psset+. It is only valid for the \verb+psGauss+-macro.
-\noindent where the only new parameter are \verb+sigma=<value>+ and \verb+mue=<value>+ for the
-horizontal shift,
-which can also be set in the usual way with \verb+\psset+. It is
-significant only for the \verb+psGauss+- and \verb+\psGaussI+-macro. The default is
-\verb+sigma=0.5+ and \verb+mue=0+. The integral is caclulated wuth the Simson algorithm
-and has one special option, called \verb+Simpson+, which defines the number of intervalls per step
-and is predefined with 5.
-
-\bgroup
-\psset{yunit=4cm,xunit=3}
-\begin{pspicture}(-2,-0.2)(2,1.4)
-% \psgrid[griddots=10,gridlabels=0pt, subgriddiv=0]
- \psaxes[Dy=0.25]{->}(0,0)(-2,0)(2,1.25)
- \uput[-90](6,0){x}\uput[0](0,1){y}
- \rput[lb](1,0.75){\textcolor{red}{$\sigma =0.5$}}
- \rput[lb](1,0.5){\textcolor{blue}{$\sigma =1$}}
- \rput[lb](-2,0.5){$f(x)=\dfrac{1}{\sigma\sqrt{2\pi}}\,e^{-\dfrac{(x-\mu)^2}{2\sigma{}^2}}$}
- \psGauss[linecolor=red, linewidth=2pt]{-1.75}{1.75}%
- \psGaussI[linewidth=1pt,yunit=0.75]{-2}{2}%
- \psGauss[linecolor=cyan, mue=0.5, linewidth=2pt]{-1.75}{1.75}%
- \psGauss[sigma=1, linecolor=blue, linewidth=2pt]{-1.75}{1.75}
-\end{pspicture}
-\egroup
-
-
-\begin{lstlisting}[xrightmargin=-2cm]
-\psset{yunit=4cm,xunit=3}
-\begin{pspicture}(-2,-0.5)(2,1.25)
-% \psgrid[griddots=10,gridlabels=0pt, subgriddiv=0]
- \psaxes[Dy=0.25]{->}(0,0)(-2,0)(2,1.25)
- \uput[-90](6,0){x}\uput[0](0,1){y}
- \rput[lb](1,0.75){\textcolor{red}{$\sigma =0.5$}}
- \rput[lb](1,0.5){\textcolor{blue}{$\sigma =1$}}
- \rput[lb](-2,0.5){$f(x)=\dfrac{1}{\sigma\sqrt{2\pi}}\,e^{-\dfrac{(x-x_0)^2}{2\sigma{}^2}}$}
- \psGauss[linecolor=red, linewidth=2pt]{-1.75}{1.75}%
- \psGaussI[linewidth=1pt,yunit=0.75cm]{-2}{2}%
- \psGauss[linecolor=cyan, mue=0.5, linewidth=2pt]{-1.75}{1.75}%
- \psGauss[sigma=1, linecolor=blue, linewidth=2pt]{-1.75}{1.75}
-\end{pspicture}
-\end{lstlisting}
-
\clearpage
\section{\CMD{psSi}, \CMD{pssi} and \CMD{psCi}}
@@ -535,8 +473,70 @@ In the second example, a convolution is performed using two rectangle functions.
The result (in red) is a trapezoid function.
\clearpage
+\section{Distributions}
+\subsection{Normal Distribution (Gauss)}
+The Gauss function is defined as
+%
+\begin{align}
+f(x) &= \dfrac{1}{\sigma\sqrt{2\pi}}\,e^{-\dfrac{\left(x-\mu\right)^2}{2\sigma{}^2}}
+\end{align}
+%
+\noindent The syntax of the macros is
+\begin{verbatim}
+\psGauss[options]{xStart}{xEnd}
+\psGaussI[options]{xStart}{xEnd}
+\end{verbatim}
+
+%%JF
+%% comment, the angle brackets below, around "value", make sense
+%% as a convention, so I left them in
+%
+%\noindent where the only new parameter is \verb+sigma=<value>+, with
+%the default of \verb+0.5+ and can also be set in the usual way with
+%\verb+\psset+. It is only valid for the \verb+psGauss+-macro.
+\noindent where the only new parameter are \verb+sigma=<value>+ and \verb+mue=<value>+ for the
+horizontal shift,
+which can also be set in the usual way with \verb+\psset+. It is
+significant only for the \verb+psGauss+- and \verb+\psGaussI+-macro. The default is
+\verb+sigma=0.5+ and \verb+mue=0+. The integral is caclulated wuth the Simson algorithm
+and has one special option, called \verb+Simpson+, which defines the number of intervalls per step
+and is predefined with 5.
+
+\bgroup
+\psset{yunit=4cm,xunit=3}
+\begin{pspicture}(-2,-0.2)(2,1.4)
+% \psgrid[griddots=10,gridlabels=0pt, subgriddiv=0]
+ \psaxes[Dy=0.25]{->}(0,0)(-2,0)(2,1.25)
+ \uput[-90](6,0){x}\uput[0](0,1){y}
+ \rput[lb](1,0.75){\textcolor{red}{$\sigma =0.5$}}
+ \rput[lb](1,0.5){\textcolor{blue}{$\sigma =1$}}
+ \rput[lb](-2,0.5){$f(x)=\dfrac{1}{\sigma\sqrt{2\pi}}\,e^{-\dfrac{(x-\mu)^2}{2\sigma{}^2}}$}
+ \psGauss[linecolor=red, linewidth=2pt]{-1.75}{1.75}%
+ \psGaussI[linewidth=1pt,yunit=0.75]{-2}{2}%
+ \psGauss[linecolor=cyan, mue=0.5, linewidth=2pt]{-1.75}{1.75}%
+ \psGauss[sigma=1, linecolor=blue, linewidth=2pt]{-1.75}{1.75}
+\end{pspicture}
+\egroup
-\section{\CMD{psBinomial} and \CMD{psBinomialN}}
+
+\begin{lstlisting}[xrightmargin=-2cm]
+\psset{yunit=4cm,xunit=3}
+\begin{pspicture}(-2,-0.5)(2,1.25)
+% \psgrid[griddots=10,gridlabels=0pt, subgriddiv=0]
+ \psaxes[Dy=0.25]{->}(0,0)(-2,0)(2,1.25)
+ \uput[-90](6,0){x}\uput[0](0,1){y}
+ \rput[lb](1,0.75){\textcolor{red}{$\sigma =0.5$}}
+ \rput[lb](1,0.5){\textcolor{blue}{$\sigma =1$}}
+ \rput[lb](-2,0.5){$f(x)=\dfrac{1}{\sigma\sqrt{2\pi}}\,e^{-\dfrac{(x-x_0)^2}{2\sigma{}^2}}$}
+ \psGauss[linecolor=red, linewidth=2pt]{-1.75}{1.75}%
+ \psGaussI[linewidth=1pt,yunit=0.75cm]{-2}{2}%
+ \psGauss[linecolor=cyan, mue=0.5, linewidth=2pt]{-1.75}{1.75}%
+ \psGauss[sigma=1, linecolor=blue, linewidth=2pt]{-1.75}{1.75}
+\end{pspicture}
+\end{lstlisting}
+
+
+\subsection{Binomial Distribution}\label{sec:bindistri}
These two macros plot binomial distribution, \CMD{psBinomialN} the normalized one. It is always
done in the $x$-Intervall $[0;1]$.
@@ -672,9 +672,67 @@ valid vor \CMD{psBinomialN}. The option \verb+showpoints+ is valid if \verb+curv
\end{pspicture*}
\end{LTXexample}
-\clearpage
+
+\subsection{Poisson Distribution}
+Given a Poisson process\footnote{\url{http://mathworld.wolfram.com/PoissonProcess.html}}, the probability of obtaining exactly $n$ successes in $N$ trials is given by the limit of a binomial distribution (see Section~\ref{sec:bindistri})
+%
+\begin{align}
+P_p(n|N) &= \frac{N!}{n!(N-n)!}\cdot p^n(1-p)^{N-n}\label{eq:normaldistri}
+\end{align}
+%
+Viewing the distribution as a function of the expected number of successes
+%
+\begin{align}\label{eq:nu}
+\lambda &= n\cdot p
+\end{align}
+%
+instead of the sample size $N$ for fixed $p$, equation (2) then becomes
+eq.~\ref{normaldistri}
+%
+\begin{align}\label{eq:nuN}
+P_{\frac{\lambda}{n}}(n|N) &= \frac{N!}{n!(N-n)!}{\frac{\lambda}{N}}^n {\frac{1-\lambda}{N}}^{N-n}
+\end{align}
+%
+Viewing the distribution as a function of the expected number of successes
+%
+\[ P_\lambda(X=k)=\frac{\lambda^k}{k!}\,e^{-\lambda} \]
+%
+Letting the sample size become large ($N\to\infty$), the distribution then approaches (with $p=\frac{\lambda}{n}$)
+%
+\begin{align}
+\lim_{n\to\infty} P(X=k) &= \lim_{n\to\infty}\frac{n!}{(n-k)!\,k!}
+ \left(\frac{\lambda}{n}\right)^k \left(1-\frac{\lambda}{n}\right)^{n-k} \\
+ &= \lim_{n\to\infty} \left(\frac{(n-k)!\cdot (n-k+1)\cdots(n-2)(n-1)n}{(n-k)!\,n^k}\right)\cdot\\
+ &\qquad \left(\frac{\lambda^k}{k!}\right)\left(1-\frac{\lambda}{n}\right)^n
+ \left(1-\frac{\lambda}{n}\right)^{-k}\\
+ &= \frac{\lambda^k}{k!}\cdot \lim_{n\to\infty}
+ \underbrace{\left(\frac{n}{n}\cdot \frac{n-1}{n}\cdot\frac{n-2}{n}\cdot\ldots\cdot
+ \frac{n-k+1}{n}\right)}_{\to 1} \cdot\\
+ &\qquad \underbrace{\left(1-\frac{\lambda}{n}\right)^n}_{\to{e^{-\lambda}}}
+ \underbrace{\left(1-\frac{\lambda}{n}\right)^{-k}}_{\to 1}\\
+ &= \lambda^k e^{\frac{-\lambda}{k!}}
+\end{align}
+%
+which is known as the Poisson distribution and has the follwing syntax:
+
+{\ttfamily
+\textbackslash psPoisson[settings]\{N\}\{$\lambda$\}
+}
+\begin{LTXexample}[pos=t,preset=\centering]
+\psset{xunit=1cm,yunit=20cm}%
+\begin{pspicture}(-1,-0.05)(14,0.25)%
+\uput[-90](14,0){$k$} \uput[90](0,0.2){$P(X=k)$}
+\psPoisson[linecolor=red,markZeros,fillstyle=solid,
+ fillcolor=blue!10,printValue,valuewidth=20]{13}{6} % N lambda
+\psaxes[Dy=0.1,dy=0.1\psyunit]{->}(0,0)(-1,0)(14,0.2)
+\end{pspicture}
+\end{LTXexample}
+
+
+
+\clearpage
\section{\CMD{psLame} -- Lamé Curve, a superellipse}
A superellipse is a curve with Cartesian equation
%
@@ -714,9 +772,9 @@ $\frac{5}{2}$ & Piet Hein's ,,superellipse``
\end{tabular}
\end{center}
-If is a rational, then a superellipse is algebraic. However, for irrational,
-it is transcendental. For even integers, the curve becomes closer to a
-rectangle as increases. The syntax of the \verb+\psLame+ macro is:
+If $r$ is a rational, then a superellipse is algebraic. However, for irrational $r$,
+it is transcendental. For even integers $r=n$, the curve becomes closer to a
+rectangle as $n$ increases. The syntax of the \verb+\psLame+ macro is:
\begin{verbatim}
\psLame[settings]{r}