Go forward to Matrix Answer 1. Go backward to Vector Answer 1. Go up to Answers to Exercises.

Vector Tutorial Exercise 2
--------------------------

The average position is equal to the sum of the products of the
positions times their corresponding probabilities.  This is the
definition of the dot product operation.  So all you need to do is to
put the two vectors on the stack and press `*'.