  In this paper, we deal with problems of testing hypotheses in the framework
of sequential statistical analysis. The main concern is the optimal design and
performance evaluation of sampling plans in the Kiefer-Weiss problems.
  For the observations which follow a discrete exponential family, we provide
algorithms for optimal design in the modified Kiefer-Weiss problem, and obtain
formulas for evaluating their performance, calculating operating characteristic
function, average sample number, and some related characteristics. These
formulas cover, as a particular case, the sequential probability ratio tests
(SPRT) and their truncated versions, as well as optimal finite-horizon
sequential tests.
  On the basis of the developed algorithms we propose a method of construction
of optimal tests and their performance evaluation for the original Kiefer-Weiss
problem.
  All the algorithms are implemented as functions in the R programming language
and can be downloaded from {\tt https://github.com/tosinabase/Kiefer-Weiss},
where the functions for the binomial, Poisson, and negative binomial
distributions are readily available.
  Finally, we make numerical comparisons of the Kiefer-Weiss solution with the
SPRT and the fixed-sample-size test having the same levels of the error
probabilities.
