This module provides a collection of Mathematica definitions and
so-called "Palettes" that can be used
-
by lecturers for compiling electronic (interactive) mathematical
lecture notes based on Mathematica 3.x and
-
by students for working with interactive mathematical lecture notes.
Interactive lecture notes bring up some new aspects that need no (or at
least little) consideration when preparing conventional lecture notes:
-
Unique language: The mathematical language
must be very precise, no usage of notations in different contexts with
different meanings is allowed. However, the language should look as similar
as possible to the language used in normal mathematics literature.
-
Algorithmic content: Some definitions and theorems must be formulated
differently in order to become algorithmic, i.e. their content can
be used as a computation rule.
-
Side conditions: The conditions under which a computation rule would
be applied must be specified explicitely in order to guarantee that rules
are applied appropriately.
-
Tracing computations: A computation done automatically must be traceable
by the student, i.e. the student must be able to figure out why
and how a certain result was
produced. Moreover, the automated computation should be as similar
as possible to the "computation with pencil and paper" in order to have
a positive impact on the student's own performance.
As an example, it is shown how interactive lecture notes for probability
calculus and statistics can be prepared using these tools.
Prerequisites
-
Both lecturer and studend should have a basic understanding of Mathematica
because Mathematica is the user interface and all computations are
done with Mathematica.
-
The distribution contains a Mathematica notebook "README.nb" that
describes how Mathematica must be configured in order to make things
work.
The Mathematical Language
Buttons and Palettes
Buttons are active elements in Mathematica notebooks, which
- when pressed, i.e. clicked onto with the mouse - perform some action.
Normally, the action is just to paste what is written on the button into
a Mathematica notebook, thereby making input of complicated expressions
easier. Another advantage of buttons is that the user need not know how
to input particular symbols occuring in an expression, simply pressing
the button suffices! For most of the supported notations we provide buttons
to produce the respective expression. Palettes are Mathematica
notebooks containing a collections of buttons (you find the palettes in
the File->Palettes menu of Mathematica (provided that Mathematica
is setup as described in the README).
Tools for Lecturers
Support for lecturers is given mainly through the possibility to assign
names to environments (definitions, propositions, theorems, etc).
If an environment has some algorithmic content then usually this is reflected
in a computation rule that can be defined inside the environment. In Mathematica,
":=" is used to define computation rules, putting a (short)
label in parentheses on top of the ":=" assigns this label to the environment.
Whenever this rule is used during a computation later, a message saying
Alma6::verbose: Unter Verwendung von label.
is printed, where label is a hyperlink, that will jump to the place
where the environment has been defined. Basically, this is the way how
tracing computations works, i.e. rules must carry labels (responsibility
of the author), the produced trace contains links with which the student
can look up the definition of the respective computation rule.
Most of the computation rules need conditions that guide the system
to apply appropriate rules in appropriate situations. For this we invent
a special syntax:
would mean that the computation rule "lhs goes into rhs"
will only be applied when the condition "cond" is satisfied (see
the examples for details). Typically, a definition
or a theorem looks as follows:
(Note the label of the definition written as an overscript to the ":="
sign.)
After having evaluated the definition, a computation typically looks
as follows:
(The blue lines are show the trace of the computation with labels of definitions
or theorems as hyperlinks.)
Experience shows, that the author must design the properties very carefully
in order to get "good results" in the sense that the right rules are automatically
applied on the right occasions and that no infinite loops (cycles) are
produced by applying a rule and it's "inverse" in a row. Probably, this
is the crucial point in the entire business ...
Tools for Students
Of course, the main advantage for a student is that lengthy calculations
"by hand" are not necessary anymore, which opens the field for "more
interesting examples" since the restriction of limited computation power
is not relevant anymore. Furthermore it is much easier to do many examples,
which can also have a good training effect. An interesting side-effect
is learning by checking whether the automated computation is correct
or at least plausible.
When working with the lecture notes it is very often necessary to "announce
facts or properties" s.t. computation rules with a
side condition are applied appropriately even in situations where Mathematica
is not able to infer that the side condition holds.
Probability Calculus and Statistics
Lecture notes for probability calculus and statistics have been prepared
using the described tools. Additionally, the package mechanism of Mathematica
is used to implement different sections of the topic, i.e. the lecture
notes consist of a collection of Mathematica packages, each of them
representing one section. This needs some organizational stuff to be wrapped
around each section in order to make things work, which is, by our convention,
put into a subsection "Package Administration I" at the beginning and a
subsection "Package Administration II" at the end, respectively. The necessity
of this lies in Mathematica's organization of packages. For the
user of the lecture notes these parts are not relevant.
This
is how a typical working session looks on the screen: what one can
see is
-
in the center: a notebook containing a particular section of the lecture
notes with definitions, theorems, text, and examples,
-
left margin in the background: a "scratch notebook" with own calculations
and new examples,
-
right margin, partially overlapped: palettes for inputting special expressions.
We will show examples from different sections (in german):
-
Bedingte
Wahrscheinlichkeit, Satz von Bayes
-
Zufallsvariable
-
Stetige
Verteilingen
-
Erwartungswert
-
Schaetztheorie:
Erarbeitung der Maximum-Likelihood-Methode
-
Testtheorie:
Erstellung eines statistischen Tests