Lecture 13 Statistical Functions
Lecture 13 Statistical Functions
Statistical Formulas
Statistical Functions
Function Parameters Description
Returns the k-thlargest value in a data set. For example the third largest
LARGE (array, k)
number.
Returns the k-thsmallest value in a data set. For example the third
SMALL (array, k)
smallest number.
SUMIF (range, criteria, sum-range) Adds the cells specified by a given criteria
SUMIFS (sum-range, criteria-range, criteria, …) Adds the cells in a range that meet multiple criteria
SUMPRODUCT (array1, array2,array3, …) Returns the sum of the products of corresponding array components
COUNT (number1,number2, …) Counts how many numbers are in the list of arguments
COUNTA (value1,value2, …) Counts how many values are in the list of arguments
COUNTIF (range, criteria) Counts the number of cells within a range that meet the given criteria
COUNTIFS (criteria-range, criteria, …) Counts the number of cells within a range that meet multiple criteria
Conditions
Using Conditional Math and Statistical
Functions
• COUNTIF—similar to COUNT function
• Calculates the number of cells in a range only for data meeting a specific condition
• Has two arguments: range and criteria
• Example: =COUNTIF(C2:C13,“Sphomore”)
• SUMIF—similar to SUM function
• Calculates a sum of values in a range only for data meeting a specific condition
• Has three arguments: range, criteria, and sum_range
• Example: =SUMIF(C2:C13,“Sphomore”,D2:D13)
• AVERAGEIF—similar to AVERAGE function
• Calculates the average of cells in a range only for data meeting a specific condition
• Has three arguments: range, criteria, and average_range
• Example: =AVERAGEIF(C2:C13,“Sphomore”,D2:D13)
Using Conditional Math and Statistical
Functions
• Statistical functions (suffixed with an S) perform calculations based on
multiple conditions
• COUNTIFS—similar to COUNTIF function
• =COUNTIFS(cr_range1,criteria1,cr_range2, criteria2, …)
• SUMIFS—similar to SUMIF function
• =SUMIFS(sum_range,cr-range1,criteria1,cr_ range2,criteria2, …)
• AVERAGEIFS—similar to AVERAGEIF function
• =AVERAGEIFS(average_range,cr_range1,criteria1,cr_range2,criteria2, …)
Order of the IF and the IFS
COUNT(Range)
COUNTIF(Search Range, Search Value)
COUNTIFS(Search Range1, Search Value1, Search Range2, Search Value2,...)
SUM(Range)
SUMIF(Search Range, Search Value,Calculation Range)
SUMIFS(Calculation Range,Search Range1, Search Value1, Search Range2, Search Value2,...)
AVERAGE(Range)
AVERAGEIF(Search Range, Search Value,Calculation Range)
AVERAGEIFS(Calculation Range,Search Range1, Search Value1, Search Range2, Search Value2,...)
Wild Cards
• Wild Cards in excel are two symbols the (*) asterisk and the (?)
question mark
• Asterisk (*):
• It means 0 to ∞ characters as in letters numbers or symbols
• Question mark (?):
• Exactly 1 character as in a letter, a number, or a symbol
Asterisk (*) Example
• G* represent all words starting with the letter G (Ex: Gloria)
• *g represents all words ending with the letter g (Ex: Dog)
• *a* represents all words containing an a (Ex: Gloria, Cat, Apple)
• 4* represents all texts starting with a 5 (Ex: 400, 4026, 4G)
• *b* represents all words containing a letter b (Ex: BoB, BoB, ABBA,
ABBA) – because a star can mean zero characters.
Question mark (?) Example
• G? represent all two lettered words starting with the letter G (Ex: Go)
• ?t represents all words ending with the letter t (Ex: it)
• ?a? represents all 3 letter words containing an a in the middle
(Ex: Fat, Pat, Cat)
• 5? represents all texts starting with a 5 and one other character
(Ex: 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 5G)
• ???? Represents all 4 lettered words (EX: John, Jane, Rick, 1984)
Wild Cards In Excel
• Wildcards can be used in the criteria in excel
• Ex: Countif(A1:A23, “K*”)
• In this example the function will count the values in the range A1:A23
that have a value starting with the letter K
• K* = K∞ = K--------
The A at the end of a function
• The functions that end with the letter A
• CountA
• AverageA
• MinA
• MaxA
• These functions consider anything that has text to be of value zero
and then they apply the function normally
• Unlike other functions which completely ignore the texts
The Ampersand (&)
• The & sign concatenates values together
• Ex:
• =ABC & 123 => ABC123
• =23 & 4 => 234
• =“two + three = ” & SUM(2,3) => ‘two + three = 5’
Practice
• Open the Excel Sheet Statistical Example
• Solve the questions on cell A23 to Cell A47