
129
T
T
I
I
P
P
S
S
&
&
T
T
R
R
I
I
C
C
K
K
S
S
-
-
U
U
N
N
I
I
V
V
A
A
R
R
I
I
A
A
T
T
E
E
D
D
A
A
T
T
A
A
New columns as functions of old
You have already seen the use of one trick when we created a new column
C1 by storing 2*C1 into C2 using the
HOME
view. This can easily be
extended to create new columns as functions of any number of others. For
example, a set of data that you suspect is exponential could be ‘straightened’
by storing LN(column) into a fresh column. Changes of scale and origin can
be investigated in this way by storing (say) -2*C1 + 3 into C2. You can even
combine columns such as C1 + C2 C3.
If you don’t particularly need to
see
the data as
a fresh column, you can use the
SYMB
view to
accomplish the same thing in a simpler way.
For example, the
SYMB
view snapshot on the
right would accomplish the same thing as
storing 2*C1 into C2. A histogram of H2 would
look the same as the one we produced earlier using the
HOME
view, and the
command would give exactly the same results. The advantage of this
is that it takes much less memory if both columns need not be stored.
Simulating Dice
Many of the most common experiments in probability involve the repeated
rolling of dice. This can be simulated quite easily in the Statistics aplet using
the
MATH
menu function
MAKELIST
. (Covered in more detail on page 266)
The syntax is:
MAKELIST
(
expression, variable name, start,end, increment
)
where
expression
is the mathematical rule used to
generate the numbers.
variable name
is the letter (X, Y etc.) that is to be
used
in
the
expression
(any
other
letters
will
be
taken
as
constants).
s
tart
is the first value
variable name
is to take.
e
nd
is the upper bound for
variable name
.
and
increment
is
the amount that
variable name
should be incremented by in each
iteration.
For example:
MAKELIST(X
2
,X,1,10,2)
would produce { 1, 9, 25, 49, 81 } as
X
went from 1 to 3 to 5 to …
This lets you use
MAKELIST
and
RANDOM
to simulate a normal die.