The Difference Between Lists and Data

Top  Previous  Next

Let's say we have created two parameters:

 

$p1 = list(2,4,6,8,11,15,20,22)

$p2 = data(2,4,6,8,11,15,20,22)

 

What's the difference?

 

Lists are designed for situations where you normally need to use ONE possible value from a list of values.

Data is designed for situations where you normally use ALL of the values at the same time.

 

The most obvious use of a data parameter is to hold a set of data that you are going to perform statistical calculations on.

 

Using data and list parameters is subtly different.

 

If I include $p1 in an equation or calculation, it will be replaced by ONE, randomly chosen value. If I include $p2 in an equation or calculation, it will always be replaced by the ALL of the values in the parameter.

 

clip2092

 

The effect is particularly obvious when used with the calculator.

 

clip2093