PyQRS is a tool for calculating probabilities and quantiles associated with a large number of probability distributions. In addition, random samples can be drawn. Quantiles and probabilities are displayed and edited in their natural position relative to the probability (density) graph. This makes PyQRS very easy to use.
The latest version, PyQRS 4.1, is available for the Android, Linux and the Windows platform.
For screenshots see the section Using PyQRS.
The option 'Unknown sources' should be enabled on your Android device (under Settings/Security).
Then click/tap on the downloaded package name; you will be asked whether you want to install the package.
Confirm; the app doesn't need access to personal data or peripherals.
In order to show Wikipedia pages and this web page, you will need a working internet connection.
Probability distributions are characterised by their
name and the values of their parameters.
After startup the standard normal distribution is automatically
You can select another distribution from the combibox at the left.
The parameter names are given below the distribution name.
You can enter their values in the corresponding edits and press
Simple (Python) arithmetical expressions are allowed, e.g.
1/3, (4+5)*6/7, 2**(0.5), but functions containing letters,
e.g. sqrt(2), e**2 or log(2), are not permitted.
Possible restrictions for parameter values are given in hints.
After specifying the parameter(s), the graph of the probability
density function (in the case of a continuous distribution) or the
graph of the probability mass function (in the case of a discrete
distribution) is shown under the 'pdf' or 'pmf' tab respectively.
It is possible to move the division line between the red (left hand)
and blue (right hand) part of the graph, by means of a finger
(Android version) or by the slider below the graph
(Linux and Windows version).
Thereafter the x-axis is divided in two or three parts
with red, white (or grey) and blue colours.
The figure at the left below shows such a partition with probabilities
P(X < -1.645) = 0.0500,
P(-1.645 < X < 0.000) = 0.4500
and P(X > 0.000) = 0.5000.
In the figure at the right:
P(X < 6) = 0.4164,
P(X = 6) = 0.1916
and P(X > 6) = 0.3920.
More accurate than moving the slider is entering the x-value
in one of the two edit fields below the x-axis and
The graph of the cumulative probability function is shown under the
'cdf' tab. You will find the x-value below the horizontal
axis and the corresponding (cumulative) probability
P(X ≤ x) to the left of the vertical axis.
In the figure below left:
P(X ≤ -1.645) = 0.050
and in the figure at the right: P(X <= 6) = 0.6080.
Find an x-value (quantile)
The opposite of finding a probability, given an x-value, is
finding an x-value, given a probability.
The x-value associated with a certain cumulative probability
is also called a quantile.
You can specify a left, right (under the 'pdf' or 'pmf' tab) or
cumulative probability (under the 'cdf' tab) and press 'Enter.
Then the associated x-value is shown in the edit field below
the horizontal axis.
Fit a missing parameter value
Usually we first specify a probability distribution (its name and
all its parameter values) and then PyQRS calculates probabilities
associated with a given x-value or the x-value
(quantile), given a probability.
In PyQRS 3 and 4 it is also possible to find an unknown parameter
value, given the distribution name, given the remaining parameter
value(s), given the x-value and given the cumulative
probability. The method is a heuristic, not necessarily leading to a
solution and if a solution is found, it may not be the only
possible solution. But it will work in most cases.
The procedure is as follows:
Specify the distribution (name),
Specify all known parameters by entering their value(s), each
time finishing with hitting 'Enter'.
Then only one parameter value will be left open.
This unknown parameter should be real-valued, not integer-valued.
Specify the x-value and the cumulative
The latter value is specified not only if you enter it under the
'cdf'-tab, but also if you enter it in the red edit field under the
'pdf'/'pmf'-tab if the distribution is continuous.
You may even specify the cumulative probability by entering its
complement in the blue edit field under the 'pdf'/'pmf'-tab.
After you specified the last value by hitting 'Enter', PyQRS
will try to fit the missing parameter value and show it under the
Draw a random sample
If the distribution name and all parameter values are given, you may
draw a (pseudo-)random sample from this distribution by selecting
the 'sample' tab. Specify the sample size, hit 'Enter' or click/tap
on the 'Draw a random sample'-button and the sample values will be
displayed as shown in the figure below.
After selecting the values (Ctrl-A) they may be copied to the clipboard (Ctrl-C)
and pasted into another application (Ctr-V).
Display more information
Extensive information about distributions is provided by Wikipedia.
If you have a working internet connection, after clicking the
'Show Wikipedia page' the relevant page is shown in your browser.
Similarly, information about PyQRS is shown in
your browser after clicking 'Show PyQRS page'.
Change the number of decimals
The numbers of significant digits displayed in the edit fields and in
is automatically set by the program: probabilities with 4 significant
digits and the x-value with a number of digits based on the
dispersion of the distribution. You can change the number of
significant digits on the Specification page.
History and previous versions
Our first program (mid 1990's) replacing tables of probability
distributions, was running on the command line under MS-DOS.
It was written in Pascal by Sytse Knypstra and Arjen Merckens.
Around the year 2000 PQRS (Probabilities, Quantiles and Random Samples)
was designed as a tool for students using computer aided instruction
of statistics in order to make printed tables obsolete.
It had a graphical user interface. PQRS was written in Delphi and
runs under Windows and - with the help of Wine - under Linux.
Download the compressed file
PQRS.zip (0.7 MB), unzip it and start PQRS.exe.
In 2013 PQRS was rewritten in Python.
In order to distinguish it from the previous PQRS version,
and as a tribute to Python and its author, Guido van Rossem,
the first letter in its name was replaced by 'Py'.
PyQRS should run under Linux, Windows and MacOS if the following
packages are installed:
python2.7 (already included in many Linux distributions),
python-pyside (for the graphical user interface),
python-scipy (for the numerical computations)
matplotlib (for the graphics).
Then download and unpack the compressed file
PyQRS27.zip (22 kB)
in a directory and in the same directory run:
depending on how python is known to your system.
PyQRS 4.0 (March 2016) is functionally equivalent to its predecessor
PyQRS 3. It runs on Android (mobile) devices.
The app is written in Python using the Kivy framework.
This time we could not use Scipy as we did for PyQRS 3.
The probability (density) functions and the cumulative distribution
functions were therefore programmed in Python.
The code could easily be adapted from the Delphi code we used earlier
for PQRS 2.
PyQRS 4.1 (June 2017) has an improved user interface over its
predecessor PyQRS 4.0.
It runs on Android (mobile) devices, and on the Linux (64 bits) and
Windows (64 bits) platforms.