Difference between revisions of "Sample Command"

From GeoGebra Manual
Jump to: navigation, search
(added "Boolean" in the 2nd command syntax)
Line 3: Line 3:
 
;Sample[ <List L>, <Size n> ]
 
;Sample[ <List L>, <Size n> ]
 
:Returns list of ''n'' randomly chosen elements of ''L''; elements can be chosen more times.
 
:Returns list of ''n'' randomly chosen elements of ''L''; elements can be chosen more times.
;Sample[ <List L>, <Size n>, <With Replacement> ]
+
;Sample[ <List L>, <Size n>, <Boolean for replacement> ]
 
:Returns list of ''n'' randomly chosen elements of ''L''. Elements can be chosen more times if and only if the last parameter is true.
 
:Returns list of ''n'' randomly chosen elements of ''L''. Elements can be chosen more times if and only if the last parameter is true.

Revision as of 10:47, 1 June 2011



Sample[ <List L>, <Size n> ]
Returns list of n randomly chosen elements of L; elements can be chosen more times.
Sample[ <List L>, <Size n>, <Boolean for replacement> ]
Returns list of n randomly chosen elements of L. Elements can be chosen more times if and only if the last parameter is true.
© 2024 International GeoGebra Institute