Mathematics Mean and Mode
Mathematics Mean and Mode
Statistics
Lecture Objectives :
Review approaches to visually displaying Data.
Graphics that display key statistical features of measurements from a
sample.
Define the distribution of a set of data.
Review common basic statistics.
• Extremes (Minimum and Maximum)
• Central Tendency ( Mean, Median)
• Spread (Range, Variance, Standard Deviation)
Review not so common basic statistics.
• Extremes (upper and lower quartiles)
• Central Tendency (Mode, Winsorized Mean)
• Spread (Interquartile Range)
Graphics
“A picture is worth a
thousand words…”
Objectives
As you create graphics keep the following in mind.
STA6166-2-5
Candy data as Excel spreadsheet
Af
te
rD
in
ne
0
50
100
150
200
250
rM
C in
an t
d y
C C
he or
w n
in
G g
um Gu
m m
y
Column chart
Li Be
co ar
ric s
M e Tw
ilk is
Ch ts
M o co
ilk la
C ...
ho
M co
la
ilk
C ...
ho
co
Sl
ic
So es
ur
Ba
lls
Ta
ff y
Display the data table
C
he
w
50
100
150
200
250
0
in
g
G
Bu um
t te
rs
co
tc
h
the data.
Lo
l li
po
So p
ur
B
St al
ar ls
l ig
Se ht
m M
iS in
w ts
ee
tC T of
ho fe
co e
la
te
G C
hi
um ps
m
y
Li Be
co ar
Alternate Display
ric s
eT
w
is
Pe ts
ct
in
Af Sl
te ic
rD es
in
ne
rM
C in
an t
dy
C
or
n
M C
i lk a ra
C m
ho el
co Je s
la ll y
te
C B ea
ov ns
er
M ed
R
i lk
C ai
si
ho ns
Calories in Common Candies
co
la
te Ta
M ffy
al
te
dM
i lk
Pe Ba
an l ls
D
M a rk
ut
Br
i lk C itt
C ho le
ho co
co la
la te
te Ba
M A r
lm
i lk M on
C i lkC d
ho Ba
co ho
la co r
te la
Sorting and expanding the scale of the graph allows all
C t e
ov B
er ar
labels to be seen as well as displaying a characteristic of
ed
Pe
an
ut
s
Vertical Display of Data
Calories in Common Candies
MilkChocolate Bar
DarkChocolateBar
MilkChocolateMaltedMilkBalls
MilkChocolateCoveredRaisins
Caramels
AfterDinnerMint
LicoriceTwists
SemiSweetChocolateChips
StarlightMints
Lollipop
Chewing Gum
3 ( 3, 13.6%)
1 ( 3, 13.6%)
6 ( 1, 4.5%)
4 ( 1, 4.5%)
SatFat ( 9, 40.9%)
0 (14, 63.6%)
10 60 60 60 60 60 70 130 140 140 160 160 160 160 160 160 180 180 200 210 210 210
Range
Extremes
•Minimum(calories) = 10 Range = 210-10 = 200
•Maximum(calories) = 210
Trimmed mean = mean of data where some fraction of the smallest and
largest data values are not considered. Usually the
smallest 5% and largest 5% values (rounded to nearest
integer) of data are removed for this computation.
= 136.0 (with 10% trimmed, 5% each tail).
Here n=22, (n+1)/4=23/4=5.75, hence Q1 is three quarters between the 5th and 6th
observations in the sorted list. The 5th value is 60 and the 6th
value is 60, thus
60 + .75(60-60)=60.
For Q2, (n+1)/2 = 23/2 = 11.5, e.g. half way between the 11th and 12th obs.
Q2 = 160 + .5(160-160) = 160.
For Q3, 3(n+1)/4 = 3(23)/4 = 69/4 = 17.25, e.g a quarter of the way between the 17th
and 18th observations.
Q3 = 180 + .25(180-180) = 180
10 60 60 60 60 60 70 130 140 140 160 160 160 160 160 160 180 180 200 210 210 210
Percentiles
100pth Percentile: that value in a sorted list of the data that
has approx p100% of the measurements below it
and approx (1-p)100% above it. (The p quantile.)
Distribution
function 0<p<1
Examples:
Q1 = 25th percentile
Q2 = 50th percentile
Q3 = 75th percentile
Ex: For the candy data we still get Q1=60 and Q3=180.
Quartiles:
Q1 = 25th = 60
Q2 = 50th = median = 160
Q3 = 75th = 180
n n
iy y 2
s2 i 1
n 1
Pull down
menus
Session
worksheet
with script
commands
Spreadsheet
like data area
Computing Descriptive
Stats
Descriptive Statistics
Histogram of calories N = 22
• A printer graph of the Midpoint Count
20 1 *
frequency table. 40 0
• Easy to do by hand. 60 5 *****
• Quick visualization of 80
100
1 *
0
the data. 120 0
140 3 ***
160 6 ******
180 2 **
200 1 *
220 3 ***
Box Plot for Calories
Maximum
100
Minimum
Box Plot
(SAS Proc Insight)
Examples:
Q1 = 25th percentile
Q2 = 50th percentile
Q3 = 75th percentile
Frequency 9
6
F re q u e n c y
calories
Bin width
Density Histogram
Histograms have
important ties to
probability.
100
0 5 10 15
lengths of the axes can
totfat
change how the relationship is
perceived.
200
calories
100
0 5 10 15
totfat
Matrix Plot
Displaying
multiple variables
symbolically.