Showing posts with label Excel. Show all posts
Showing posts with label Excel. Show all posts

Sunday, September 5, 2021

TI-Nspire CX II and TI-84 Plus CE: COUNTIF, SUMIF, AVERAGEIF

TI-Nspire CX II and TI-84 Plus CE:  COUNTIF, SUMIF, AVERAGEIF


Introduction


Three popular spreadsheet functions are operating on elements of a list contingent of a criteria.   


Let L be a list of numerical data.


COUNTIF(L, criteria):   returns a count of all the elements that fit a criteria


SUMIF(L, criteria):  returns the sum of all the elements that fit a criteria


AVERAGEIF(L, criteria):  returns the arithmetic average of all the elements that fit a criteria


Example:


L = {0, 1, 2, 3, 4, 5, 6}


COUNTIF(L, "≥4") = 3.  

Counts all the elements of L that are greater than or equal to 4.


SUMIF(L, "≥4") = 15

Sums all the element's of L that are greater than or equal to 4. 


AVERAGEIF(L, "≥4") = 5

Returns the arithmetic average of L that are greater than or equal to 4.


Note that:


AVERAGEIF(L, criteria) = SUMIF(L, criteria) ÷ COUNTIF(L, criteria)


TI-Nspire CX II:  The functions countif and sumif


The TI-Nspire has two built in functions countif and sumif.  The averageif can easily be defined in the equation from the last section.


You can download a tns demonstration document here:  

https://drive.google.com/file/d/1XfRyHSQz92TXGmzohhej0--wLYS0yxkF/view?usp=sharing


TI-84 Plus CE Programs:  LISTIF


The program LISTIF calculates all three functions COUNTIF, SUMIF, and AVERAGEIF.  There are two custom lists that are created as a result of this program:


List A:  The input list.


List B:  The list that meets the criteria.


To get the small "L" character, press [ 2nd ], [ stat ] (LIST), B* for the small L.   The small L must be the first character of your list name.  Once created, custom lists are shown under the LIST - NAMES menu.


Although I did not test this on previous calculators, this program should work on the TI-82, TI-83 family, and all of the TI-84 Plus family.


Program listing:


Download Link:

Eddie

All original content copyright, © 2011-2021.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Wednesday, June 21, 2017

HP Prime and Casio fx-CG50: Basic Spreadsheet Comparison

HP Prime and Casio fx-CG50:  Basic Spreadsheet Comparison






HP Prime
Casio fx-CG50
Maximum Spreadsheet Size
10,000 rows by 676 columns
999 rows by 26 columns
Accessing Spreadsheet mode
[Apps], Spreadsheet
[MODE], 4
Creating and saving files
The Spreadsheet app can be copied and renamed
Files can be created and saved.  The fx-CG50 stores spreadsheets as separate files.
Clearing the entire spreadsheet
[Shift], [Esc] (Clear), pressing OK
From the main menu: [ F3 ] (DELETE), [ F3 ] (ALL), [ F1 ] (OK)
Inserting text labels in cells
[ALPHA], [ 0 ] (“ “)
[ALPHA], [ *10^ ] (“).  Text cells are indicated by a solid black strip on the left side of the cell.
Inserting the colon character, for ranges (:)
[ALPHA], [ - ] ( : )
During cell entry/edit, [ F3 ] ( : )
Inserting the dollar sign character, for absolute cell references ($)
During cell entry/edit, the touch key ( $ )
During cell entry/edit, [ F2 ] ( $ )
Starting a formula with the equals sign (=)
[Shift], [ . ] ( = )
[Shift], [ . ] ( = )
The SUM function
During formula entry:  [Toolbox], (App), Spreadsheet, SUM
During formula entry:  [ F5 ] (CELL), [ F5 ] (Sum).  The function is named CellSum.
The AVERAGE function
During formula entry: [Toolbox], (App), Spreadsheet, AVERAGE
During formula entry: [ F5 ] (CELL), [ F3 ] (Mean). The function is named CellMean.
The IF function
During formula entry:  [Toolbox], (Ctlg), select when
Syntax:  when(condition, do if true, do if false)
During formula entry:  [ F5 ] (CELL), [ F4 ] (CellIf). 
Entering a random number
During formula entry:  [Toolbox], 5. Probability, 4.  Random:
1 for random number:  RANDOM()
2 for random integer:  RANDINT(a,b)
During formula entry:  [OPTN], [ F5 ] (PROF), [ F4 ] (RAND)
[ F1 ] for random number: Ran#
[ F2 ] for random integer: RandInt#(a,b)
Change text color
(Format), 4. Color, select color
[Shift], [ 5 ] (FORMAT), 1. Char Color, choose color, [EXIT]
Change cell color
(Format), 5. Fill, select color
[Shift], [ 5 ] (FORMAT), 2. Area Color, choose color, [EXIT]
Number of colors
16,777,216.  18 set colors, plus one master color selector
8 colors:  black, blue, red, magenta, green, cyan, yellow, white
Selecting a Group of Cells
Press the soft key (Select), choose cells, turn off by pressing (Sel *)
[Shift], [ 8 ] (CLIP), choose cells, turn of by pressing [EXIT]
Sizing columns
Go to top of the column, press (Format), 8, # of bytes
Use -1 for auto sizing
(not available)
Number format (number of decimal places)
Select cells, (Format), 1.  Number Format.  Select 8 to select the number of decimal places
(not available)
Conditional Formatting
(not available)
[ F6 ] ( > ), [ F5 ] (CONDIT), complete the prompt
Filling a formula
Select the source cell and copy it ([ Shift ], [ View ]).  Select target cells and paste the formula ( [ Shift ], [ Menu ], [ → ], select Formula)
Select the target cell range, [ F2 ]  (EDIT), [ F6 ] ( > ), [ F1 ] (FILL)
Plotting a scatter plot
(not available)
Select range, [ F6 ] ( > ), [ F1 ] (Graph), [ F1 ] or [ F2 ] or [ F3 ] for Graph1, Graph2, or Graph3, respectively
Trend line analysis – Linear Regression
Go to an output cell, [ Shift ], [ . ] (=),[Toolbox], (App), Spreadsheet, REGRS
Syntax: REGRS(range, 1)
Select range, [ F6 ] ( > ), [ F2 ] (CALC), [ F3 ] (REG), [ F1 ] (X), [ F1 ] (ax+b).  Results are shown.  Recall separate variables through VARS-STAT-GRAPH

Do you use the spreadsheet mode on your calculator?  Check it out if you have not done so. 

Happy First Days of Summer (Northern Hemisphere)/Winter (Southern Hemisphere)!

Eddie



This blog is property of Edward Shore, 2017

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues The programs are listed for the Swiss Micros DM42 an...