summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/Changes3
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/README6
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdfbin2878161 -> 2950293 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex70
-rw-r--r--Master/texmf-dist/tex/generic/pst-func/pst-func.tex36
5 files changed, 107 insertions, 8 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-func/Changes b/Master/texmf-dist/doc/generic/pst-func/Changes
index c3765d66846..81721cdc330 100644
--- a/Master/texmf-dist/doc/generic/pst-func/Changes
+++ b/Master/texmf-dist/doc/generic/pst-func/Changes
@@ -1,5 +1,6 @@
..... pst-func.tex
-0.67 2010-02-09 - fic bug with arrows in \psPolynomial
+0.68 2010-02-11 - add Weibull distribution
+0.67 2010-02-09 - fix bug with arrows in \psPolynomial
0.66 2010-01-26 - new optional argument for the Gini
coefficient of \psLorenz
0.65 2010-01-25 - new distribution \psCauchy
diff --git a/Master/texmf-dist/doc/generic/pst-func/README b/Master/texmf-dist/doc/generic/pst-func/README
index 3538fe8df75..5c3df64feeb 100644
--- a/Master/texmf-dist/doc/generic/pst-func/README
+++ b/Master/texmf-dist/doc/generic/pst-func/README
@@ -11,7 +11,6 @@ pst-func: plotting special mathematical functions:
-- psCumIntegral
-- psConv
-- psGauss
--- psGaussI (integral)
-- psPoisson
-- psBinomial
-- psBinomialN
@@ -20,6 +19,7 @@ pst-func: plotting special mathematical functions:
-- psChiIIDist
-- psTDist for Student's t-distribution
-- psBetaDist for Beta distribution
+-- psWeibull for Weibull distribution
-- psLame (Lam\`e\ Curve -- a superellipse)
-- psThomae (popcorn function)
-- psplotImp (plotting implicit defined functions)
@@ -37,9 +37,9 @@ TeX Frequently Asked Questions:
pst-func needs pst-plot (pstricks-add) and pstricks, which should
be part of your local TeX installation, otherwise get it from a
-CTAN server, f.ex. ftp://ftp.ctan.org
+CTAN server, http://mirror.ctan.org
PSTricks is PostScript Tricks, the documentation cannot be run
with pdftex, use the sequence latex->dvips->ps2pdf.
-%% $Id: README 82 2009-01-23 17:38:22Z herbert $
+%% $Id: README 286 2010-02-11 09:40:41Z herbert $
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 514033fbab5..9809b471224 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 880c2649723..d08f8bedaad 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
@@ -1,4 +1,4 @@
-%% $Id: pst-func-doc.tex 273 2010-01-26 18:28:55Z herbert $
+%% $Id: pst-func-doc.tex 285 2010-02-11 09:40:27Z herbert $
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,
smallheadings, headexclude,footexclude,oneside]{pst-doc}
\usepackage[utf8]{inputenc}
@@ -1403,6 +1403,74 @@ and has the syntax (with a default setting of $s=1$ and $\mu=1$):
\clearpage
+\subsection{Weibull distribution}
+
+In probability theory and statistics, the Weibull distribution is a continuous probability
+distribution. The probability density function of a
+Weibull random variable $x$ is:
+
+\begin{align}
+P(x) &= \alpha\beta^{-\alpha} x^{\alpha-1} e^{-\left(\frac{x}{\beta}\right)^\alpha}\\
+D(x) &= 1-e^{-\left(\frac{x}{\beta}\right)^\alpha}
+\end{align}
+
+or slightly different as
+
+\begin{align}
+P(x) &= \frac{\alpha}{\beta}\,x^{\alpha-1} e^{-\frac{x^\alpha}{\beta}}\\
+D(x) &= 1 - e^{-\frac{x^\alpha}{\beta}}
+\end{align}
+
+always for $x\in[0;\infty)$.
+where $\alpha > 0$ is the shape parameter and $\beta > 0$ is the scale parameter of the distribution.
+
+$D(x)$ is the cumulative distribution function of the Weibull distribution. The values for
+$\alpha$ and $\beta$ are preset to 1, but can be changed in the usual way.
+
+The Weibull distribution is related to a number of other probability distributions; in
+particular, it interpolates between the exponential distribution $(\alpha = 1)$ and the
+Rayleigh distribution $(\alpha = 2)$.
+
+\begin{center}
+\psset{unit=2}
+\begin{pspicture*}(-0.5,-0.5)(2.6,2.6)
+\psaxes{->}(0,0)(2.5,2.5)[$x$,-90][$y$,180]
+\multido{\rAlpha=0.5+0.5}{5}{%
+ \psWeibull[alpha=\rAlpha]{0}{2.5}
+ \psWeibullI[alpha=\rAlpha,linestyle=dashed]{0}{2.4}}
+\end{pspicture*}
+%
+\begin{pspicture*}(-0.5,-0.5)(2.6,2.6)
+\psaxes{->}(0,0)(2.5,2.5)[$x$,-90][$y$,180]
+\multido{\rAlpha=0.5+0.5,\rBeta=0.2+0.2}{5}{%
+ \psWeibull[alpha=\rAlpha,beta=\rBeta]{0}{2.5}
+ \psWeibullI[alpha=\rAlpha,beta=\rBeta,linestyle=dashed]{0}{2.4}}
+\end{pspicture*}
+\end{center}
+
+\begin{lstlisting}
+\psset{unit=2}
+\begin{pspicture*}(-0.5,-0.5)(2.6,2.6)
+\psaxes{->}(0,0)(2.5,2.5)[$x$,-90][$y$,180]
+\multido{\rAlpha=0.5+0.5}{5}{%
+ \psWeibull[alpha=\rAlpha]{0}{2.5}
+ \psWeibullI[alpha=\rAlpha,linestyle=dashed]{0}{2.4}}
+\end{pspicture*}
+%
+\begin{pspicture*}(-0.5,-0.5)(2.6,2.6)
+\psaxes{->}(0,0)(2.5,2.5)[$x$,-90][$y$,180]
+\multido{\rAlpha=0.5+0.5,\rBeta=0.2+0.2}{5}{%
+ \psWeibull[alpha=\rAlpha,beta=\rBeta]{0}{2.5}
+ \psWeibullI[alpha=\rAlpha,beta=\rBeta,linestyle=dashed]{0}{2.4}}
+\end{pspicture*}
+\end{lstlisting}
+\psset{unit=1cm}
+
+The starting value for $x$ should always be 0 or greater, if it is
+less than 0 then the macro draws a line from (\#1,0) to (0,0) and
+starts \Lcs{psWeinbull} with 0.
+
+\clearpage
\section{The Lorenz curve}
The so-called \Index{Lorenz curve} is used in economics to describe inequality in
diff --git a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
index 4a368f76c0c..efd6897f09b 100644
--- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
+++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
@@ -1,4 +1,4 @@
-%% $Id: pst-func.tex 281 2010-02-09 09:16:17Z herbert $
+%% $Id: pst-func.tex 285 2010-02-11 09:40:27Z herbert $
%%
%% This is file `pst-func.tex',
%%
@@ -30,8 +30,8 @@
% interface to the `xkeyval' package
\pst@addfams{pst-func}
%
-\def\fileversion{0.67}
-\def\filedate{2010/02/09}
+\def\fileversion{0.68}
+\def\filedate{2010/02/11}
\message{`PST-func' v\fileversion, \filedate\space (hv)}
%
\pstheader{pst-func.pro}
@@ -736,6 +736,36 @@
}%
}\ignorespaces}
%
+\def\psWeibull{\pst@object{psWeibull}}
+\def\psWeibull@i#1#2{%
+ \addbefore@par{plotpoints=500,alpha=1,beta=1}%
+ \begin@OpenObj
+ \def\pst@tempA{#1}%
+ \ifdim#1pt<\z@ \psline(#1,0)(0,0)\def\pst@tempA{0}\fi
+ \psplot[algebraic=false]{\pst@tempA}{#2}{
+ \psk@alpha \psk@beta \psk@alpha neg exp mul % alpha*beta^(-alpha)
+ x \psk@alpha 1 sub exp % x^(alpha-1)
+ mul
+ Euler x \psk@beta div \psk@alpha exp neg exp % e^(-(x/beta)^alpha))
+ mul }
+ \end@OpenObj%
+ \ignorespaces%
+}
+\def\psWeibullI{\pst@object{psWeibullI}}
+\def\psWeibullI@i#1#2{%
+ \addbefore@par{plotpoints=500,alpha=1,beta=1}%
+ \begin@OpenObj
+ \def\pst@tempA{#1}%
+ \ifdim#1pt<\z@ \psline(#1,0)(0,0)\def\pst@tempA{0}\fi
+ \psplot[algebraic=false]{\pst@tempA}{#2}{
+ 1
+ Euler x \psk@beta div \psk@alpha exp neg exp % e^(-(x/beta)^alpha))
+ sub
+ }
+ \end@OpenObj%
+ \ignorespaces%
+}
+%
\define@boolkey[psset]{pst-func}[Pst@]{Gini}[true]{}
\psset[pst-func]{Gini=false}
%