Using Vectors To Determine Velocity - Texas Instruments TI-89 Titanium Short User Manual

Hide thumbs Also See for TI-89 Titanium:
Table of Contents

Advertisement

Sampling-without- Replacement Function
In the Program Editor, define
called with two parameters. The first parameter is a list where each
element is the number of balls of a certain color. The second parameter is
the number of balls to select. This function returns a list where each
element is the number of balls of each color that were selected.
:drawball(urnlist,drawnum)
:Func
:Local templist,drawlist,colordim,
numballs,i,pick,urncum,j
:If drawnum>sum(urnlist)
:Return "too few balls"
:dim(urnlist)!colordim
:urnlist!templist
:newlist(colordim)!drawlist
:For i,1,drawnum,1
:sum(templist)!numballs
:rand(numballs)!pick
(continued in next column)
Sampling without Replacement
Suppose an urn contains
balls of a third color, etc. Simulate drawing balls without replacing them.
1.
Enter a random seed using the
command.
2.
Assuming the urn contains 10 red balls and
25 white balls, simulate picking 5 balls at
random from the urn without replacement.
Enter
drawball({10,25},5)
Result: 2 red balls and 3 white balls.

Using Vectors to Determine Velocity

A small fishing boat leaves from the south bank of the Allegheny River
and heads at a 80° angle with an engine speed of 20 knots. However, the
eastward force of the current carries the boat along so it actually travels
at a 60° angle with the shore.
How fast is the current, and how fast does the boat actually travel?
Activities
drawball( )
:For j,1,colordim,1
:cumSum(templist)!urncum
:If pick  urncum[j] Then
:drawlist[j]+1!drawlist[j]
:templist[j]N1!templist[j]
:Exit
:EndIf
:EndFor
:EndFor
:Return drawlist
:EndFunc
balls of a color,
n1
RandSeed
.
as a function that can be
balls of a second color,
n2
n3
111

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents