EasyManuals Logo

Texas Instruments TI-89 Titanium User Manual

Texas Instruments TI-89 Titanium
977 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #757 background imageLoading...
Page #757 background image
Activities 754
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.
Sampling without Replacement
Suppose an urn contains
n1 balls of a color, n2 balls of a second color, n3 balls of a third
color, etc. Simulate drawing balls without replacing them.
: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)
: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
1. Enter a random seed using the RandSeed
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.

Table of Contents

Other manuals for Texas Instruments TI-89 Titanium

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 Titanium and is the answer not in the manual?

Texas Instruments TI-89 Titanium Specifications

General IconGeneral
Display TypeLCD
Display Resolution160 x 100 pixels
CPUMotorola 68000
CPU Speed16 MHz
RAM256 KB
Flash ROM2.7 MB
Programming LanguageTI-BASIC, Assembly
Power Source4 AAA batteries
ConnectivityI/O port
Dimensions7.5 x 3.5 x 1 inches

Related product manuals