Frequency Command

From GeoGebra Manual
Revision as of 21:14, 9 March 2013 by Zbynek (talk | contribs) (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact )
Jump to: navigation, search




Frequency[ <List of Raw Data> ]
Returns a list with a count of the occurrences of each unique value in the given list of data. This input list can be numbers or text. The list is sorted in ascending order of the unique values. To get a list of the corresponding unique values use the command Unique[ <List of Raw Data> ] .
Example: Enter list1 = { "a", "a", "x", "x", "x", "b" }. Frequency[list1] returns the list { 2, 1, 3 }. Unique[list1] returns the list { "a", "b", "x" }.


Frequency[ <Boolean Cumulative>, <List of Raw Data> ]
If Cumulative = false, returns the same list as Frequency[ <List of Raw Data> ]
If Cumulative = true, returns a list of cumulative frequencies for Frequency[ <List of Raw Data> ] .
Example: Enter list1 = { 0, 0, 0, 1, 1, 2 }. Frequency[true, list1] returns the list { 3, 5, 6 }. Frequency[false, list1] returns the list { 3, 2, 1}. Unique[list1] returns the list { 0, 1, 2 }


Frequency[ <List of Class Boundaries>, <List of Raw Data> ]
Returns a list of the counts of values from the given data list that lie within intervals of the form [a, b), where a and b are all the couples of consecutive numbers in the given class boundaries list. The highest interval has the form [a, b].
Example: Frequency[{1, 2, 3}, {1, 1, 2, 3}] returns the list { 2, 2 }.


Frequency[ <Boolean Cumulative>, <List of Class Boundaries>,<List of Raw Data> ]
If Cumulative = false, returns the same list as Frequency[ <List of Class Boundaries>, <List of Raw Data> ]
If Cumulative = true, returns a list of cumulative frequencies for Frequency[ <List of Class Boundaries>, <List of Raw Data> ]
Frequency[ <List of Class Boundaries>, <List of Raw Data>, <Use Density> , <Density Scale Factor> (optional) ]
Returns a list of frequencies for the corresponding Histogram Command.
If Use density = false, returns the same list as Frequency[ <List of Class Boundaries>, <List of Raw Data> ]
If Use density = true, returns the list of frequencies of each class.
Example: Let data = {1, 2, 2, 2, 3, 3, 4, 4, 4, 4} be the list of raw data and classes={0, 2, 5} the list of class boundaries. Then Frequency[classes, data, false] and Frequency[classes, data] both return the list {1, 9}, while Frequency[classes, data, true] returns the list {0.5, 3}.


Frequency[ <Boolean Cumulative>, <List of Class Boundaries>, <List of Raw Data>, <Use Density> , <Density Scale Factor> (optional) ]
Returns a list of frequencies for the corresponding Histogram Command.
Frequency[ <List of Text>, <List of Text> ]
Returns a contingency matrix containing counts of paired values from the two lists. The rows of the matrix correspond to the unique values in the first list, and the columns correspond to the unique values in the second list. To get a list of the unique values for each list use the command Unique[ <List of Text> ].
Example: Let list1= {"a", "b", "b", "c", "c", "c", "c"} and list2= {"a", "b", "a", "a", "c", "c", "d"}. Then Frequency[ list1, list2 ] returns the matrix \begin{pmatrix} 2 & 0 & 1 & 1\\ 0 &1 & 0 &1 \\ 0 & 0 & 0 & 1 \\ \end{pmatrix}
Note: See also the ContingencyTable command.
© 2024 International GeoGebra Institute