% -*- Mode:TeX -*-
%% thesis stuff

\chapter{Design Specifications}

\section{Critique of Previous Applications}

\subsection{CDS Application for the Addition of Random Variables}

The previous convolution application, written by John Piscitello, was set
up as four different screens, plus a title page and a credits page.  Each
screen shows a different lesson or aspect of adding independent
variables.

\begin{enumerate}
\item The first screen is a display of the equations that describe the
convolution algorithm.
\item The second screen shows two PMFs and demonstrates how adding random
variables can be derived, using sample space.
\item The third screen shows how convolution provides a simple mechanism
that keeps track of all the statistics of adding independent variables.
The algorithm is portrayed with a graphical demonstration.
\item The fourth screen consists of the convolution of several predefined
functions, to show interesting effects of convolving two functions,
including a smoothing of the functions.

\end{enumerate}

The screens can be navigated by using ``Prev'' and ``Next'' buttons at
the bottom.  There is also a list of the screens next to the buttons,
with which the user may jump directly to any of the five screens.  For
each of the screens, there is help available from the ``Help'' menu
option.

\paragraph{Defining/Adding independent variables}

\clearpage
\begin{figure}[h]
\PSbox{figure1.ps}{5.25in}{4.25in}
\caption{Adding Independent Random Variables}
\label{fig:1}
\end{figure}

When this screen is first brought up, it can be somewhat confusing to
figure out what to do, especially for students who might use the
application for classes other than probability.  There are several
methods that could help make this easier to use:

\begin{itemize}
\item A paragraph introducing random variables and adding them would be
useful.
\item Definitions of terms, including sample space and PMF, would be very
helpful, especially in the form of hypertext.

\end{itemize}
As shown in Figure 1, there is also a lot of wasted space when this
screen is first brought up.  There are 3 buttons to click: 
to define PMFs, to ``Show Statistics'', and to convolve the two
functions.

\clearpage
\begin{figure}[h]
\PSbox{figure2.ps}{5.25in}{4.25in}
\caption{Editting PMFs}
\label{fig:2}
\end{figure}
  The first function, to define PMFs, will bring up the screen
shown in Figure 2.  To change the values of the PMFs, each of the sliders
in the figure correspond to one possible value for the variable.  When
the user is done setting the variable, the program checks whether the sum
of the probabilities of each of the values will add up to 1, and sends an
error message if not.  There are several good ideas on this screen, and
also several things that could be improved:

\begin{itemize}
\item Allowing the user to edit PMFs to unacceptable values and then
printing a warning has good pedagogical value.
\item There is immediate feedback on the bargraphs as the PMFs are being
editted. 
\item PMFs should be edittable without having to call another screen.
\item Being able to edit PMFs by dragging the bars directly on the
bargraph would be useful.
\item Being able to see the exact values of the PMFs on the bargraphs
would be useful.
\item Being able to type in values for the PMFs instead of having to drag
with a slider would be useful.
\end{itemize}

\clearpage
\begin{figure}[h]
\PSbox{figure3.ps}{5.25in}{4.25in}
\caption{Sample Space Algorithm}
\label{fig:3}
\end{figure}

Clicking on the second button will display a table that tries to show how
to add the two pmfs using a sample space (Figure 3).  For someone who is
not already somewhat familiar with adding random independent variables,
this screen is hard to understand.  

\begin{itemize}

\item There is only one sentence available to briefly describe the
screen.
\item More help, either as a separate screen, or hypertext, to explain
the theory would make this screen more comprehensible.
\item A less cluttered display might improve readability. For example,
more subscreens for the table would make it easier to understand.

\end{itemize}

The third screen accessible from here displays a graph of the result of
adding the two functions together.

\paragraph{Convolution at work}

\clearpage
\begin{figure}[h]
\PSbox{figure4.ps}{5.25in}{4.25in}
\caption{Convolution Demo}
\label{fig:4}
\end{figure}

The next screen, shown as Figure 4, graphically demonstrates convolution,
a method to add random independent variables.  The top graph shows the
first function, with the second function flipped and placed over the
first, as the convolution function dictates.  The next graph shows the
values of the convolution of the two PMFs.  The slider under the graphs
determines the offset of the two functions in the graph on top, and the
current value of PMFC that is being calculated.  The button to the right
of the slider switches the top graph between displaying the overlapping
functions, and showing the two functions next to each other.  

\clearpage
\begin{figure}[h]
\PSbox{figure5.ps}{5.25in}{4.25in}
\caption{Convolution Demo}
\label{fig:5}
\end{figure}

Figure 5 is the result of clicking on the button.  As the user moves the
slider, every time the slider reaches a whole number, the graphs will
also move, corresponding to the amount they should be ``slid''.  For more
information on how this screen works, see ***johnnyp's thesis ***


\begin{itemize}

\item There are problems with the screen being slow, because there is a
long delay as the computer has to calculate all the new graphs while the
slider is being moved.
\item The fact that the graphs are sliding over each other is not clear,
because they do not move until the slider hits a whole number, and then
jump to the next value.  It would be extremely helpful if the graphs
could smoothly and continuously move while the slider is moved.
\item There is no way to edit the PMFs from this screen.  It is very
inconvenient to have to switch to another screen, and then go to a screen
from there, to edit the PMFs.
\item There is no explanation on how to edit the PMFs at all.  It is
counterintuitive to have to go to another screen to edit, so it is hard
to figure out.
\item The screen is almost too cluttered to be useful.  Cleaner
formatting and better arrangements of the bargraphs and explanatory text
could improve usability greatly.

\end{itemize}

\paragraph{Convolution of predefined functions}

\clearpage
\begin{figure}[h]
\PSbox{figure6.ps}{5.25in}{4.25in}
\caption{Convolving predefined functions}
\label{fig:6}
\end{figure}

When this screen is called (Figure 6), there are graphs shown for two
PMFs, and for the convolution of the two PMFs.  Here, the user can choose
many preset PMF functions using the ``PMFs'' menu option, and the
application will graph the convolution of the user's choice.  In
addition, the button on the bottom left will zoom in on the convolved
function, to show it more clearly.  Use of this screen was very clear.
The only minor problem was the fact that when another screen is called
from this one, the menu option for ``PMFs'' is not erased, so it is
confusing in the next screen when the menu option does not do anything.
Also, the ability to choose these predefined PMFs in another screen could
be useful.

\subsection{Other cT Applications}

\subsubsection{Queuing Program}

The Queuing Program, written by Royce Shin, has everything based on a
single screen, which makes the screen somewhat cluttered and hard to
understand.  Because the basic structure of this was so different from
Piscitello's Random Variable application, not much time was spent
analyzing this application.

\subsubsection{Bernoulli Process Application}

The Bernoulli Process Application, by Andrew Grant, has a layout very
similar to Piscitello's CDS application.  Grant's application is also
split into a number of screens.  One difference is the fact that there is
a separate page for the table of contents, rather than having all the
screens accessible from anywhere.  This could encourage the user to step
through the program sequentially, but it is an unnecessary screen, and
would be more useful it was more easily available.

\section{Design issues}

This application is designed as courseware, and hence, most people will
only use it once.  Thus, the first impression, and the ease of use for people
who have never seen the program before, is extremely important.  Most
importantly, the interface has to be very intuitive to use.  Users have
to be able to be able to figure out the application after looking at it
for a short time only.  Secondly, a lot of online help is also very
useful, so that students can learn from the program more easily.

\subsection{Pedagogical Objectives}

The main pedagogical objectives of this application are to provide an
easy way for students to learn the concepts behind adding random
variables and how convolution works.  RVadd must be able to demonstrate
several separate concepts.

\begin{itemize}

\item The idea of adding independent random variables has to be shown,
including how it works, how to do it, and its applications.

\item The way convolution can be used to keep track of the accounting of
adding random variables has to be demonstrated in a way that is easy to
understand.

\item Effects of convolving two functions should be shown.

\end{itemize}

\subsection{Usage Requirements}

The design of RVadd is somewhat similar to the previous application for
adding random variables which was written in CDS, being mainly based on
the old application.  It also consists of several different screens,
formatted in basically the same way.  Many of the features are taken from
Piscitello's application, and there are a few added features to improve
usability of the program.

\begin{itemize}

\item There needs to be questions for problem sets designed specifically
for students for use with RVadd and a probability class.

\item There must be a way to edit the PMFs from any screen.

\item There must be help screens on how to use each page.

\item There must be simple ways to navigate the screens.

\item RVadd must work in Xwindows, on Macintoshes, and on DOS/Windows
machines.

\item RVadd must work with many different screen specifications,
including different size, and with color, black/white, or greyscale.

\item RVadd must be able to be clearly viewed on a projection screen for
lectures.

\item RVadd must work with mice with different numbers of buttons.

\end{itemize}

\paragraph{Defining/Adding independent variables}

This screen shows how to add random independent variables.

\begin{itemize}

\item The two PMFs must be shown clearly on graphs, and the result of
adding them together must be shown clearly.

\item The method that is used to add the PMFs should be easy to
understand.

\end{itemize}

\paragraph{Convolution at Work}

This screen demonstrates the convolution of two functions, by showing the
flipping and sliding of one function over the other.

\begin{itemize}

\item There must be 2 graphs showing the PMFs, and a 3rd graph showing
the PMFs being slid over each other for convolution.

\item The sliding of the graphs must be smooth enough to tell that they
are being slid.

\item The fact that sliding and summing the values of the PMFs will
result in the addition of the two PMFs must be clear.

\end{itemize}

\paragraph{Convolution of predefined functions}

This screen shows the convolution of two functions.

\begin{itemize}

\item There must be two graphs to represent 2 PMFs, and a third graph to
represent the convolution of the 2 PMFs.

\item There must be predefined types of functions available to convolve
with each other, including Bernoulli, Binomial, Geometric, Pascal, and
Random PMFs, as in Piscitello's application.

\end{itemize}

\subsection{Added Features}

There are several features that would be nice, given more time to work on
the application.

\begin{itemize}

\item Links to the World Wide Web would be useful, so that the
application could be accessed from elsewhere.  This would greatly
increase the usage of RVadd.

\item To allow more people to be able to use RVadd, limited support for
the convolution of continuous variables would be a nice addition.

\item There are hypertext explanations and definitions for some terms,
and special fonts to distinguish hypertext from normal text.

\item It might be good to be able to edit the PMFs directly on the
graphs in the future, instead of having to call another screen.  However,
there could also be disadvantages other than the difficulty in
programming.  For example, it will make it hard to give a message about
illegal PMF values.

\item On the screen to show the convolution of predefined functions, a
new function to switch to continuous variable convolution would be nice.
If this function is chosen, a different screen would have to be called to
select continuous functions instead of discrete functions.

\end{itemize}

\section{Program Features}

There are several features that are relevant to the entire program.

\begin{itemize}

\item A new screen is included to edit the PMFs.  This screen can be
called from any other screen.

\item There are help screens available through an option in the menubar.
In addition, there are more extensive explanations for the terms and
concepts than the previous application, with references to the text.

\item ``Next'' and ``Prev'' buttons to navigate the screens

\item There is a table of contents in the menu bar to jump to different
screens. (***** and possibly a page for a table of contents, as with
bernoulli application *****)

\end{itemize}

\paragraph{Convolution Equations}

As with Piscitello's application, there is a screen displaying the
equations of convolution.  Also, there is additional information
available on convolution by clicking on the equations.

\paragraph{Defining/Adding independent variables}

\begin{itemize}

\item There are two graphs at the top of the screen, to represent the two
PMFs.

\item The user can find definitions of PMF and sample space by clicking
on the words.

\item *** new way of showing statistics ******

\item Unlike the previous application, there is no subscreen ot show the
convolution of the 2 PMFs here.

\end{itemize}

\paragraph{Convolution at Work}

\begin{itemize}

\item There are two small graphs at the top of the screen to represent
the two PMFs.

\item There are two larger graphs underneath them.  One shows the PMFs
being slid over each other, and the other shows the end result of adding
the two functions together by convolution.

\item There is a slider that can be used to slide one PMF over the other
on the top graph to demonstrate the mechanics of convolution.

\item While the slider is being moved, the graphs will change in real
time.  Once the mouse is released from sliding, the slider is snapped to
the nearest whole number.

\item The component values of each of the PMFs are listed in a strip and
also slid along with the graphs, and the way the values are summed is
shown.

\end{itemize}

\paragraph{Convolution of predefined functions}

This screen consists of graphs of two functions, and a graph of their
convolution.  The PMFs can be set by calling the PMF edit screen.

\paragraph{Editting PMFs}

This screen is a new screen, designed to be called from any other screen,
to allow the editting of the PMFs.  

\begin{itemize}

\item There are sliders to set the values of the PMF.  Underneath the
sliders, there are text boxes, so that the values can be typed in
manually without having to use the sliders.

\item There is a menu option, similar to Piscitello's application, that
will allow the user to pick one of several predefined functions for the
PMFs.  Several of these functions will bring up subscreens to get
additional parameters.

\item There is an ``OK'' button that the user can press when he is
satisfied with the PMF values.

\item If the PMFs are valid after ``OK'' is pressed, they are set, and
the application continues.  Otherwise, an error message is displayed and
the values have to be changed.

\end{itemize}

