Measures of Variability - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Measures of Variability

Description:

Measures of Variability. MATH 224. Page 2. Last Class. Mean ... Labs will be for Q&A about assignments, help with MATLAB. No lab Thursday; both labs on Friday ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 23
Provided by: alanab2
Category:

less

Transcript and Presenter's Notes

Title: Measures of Variability


1
Measures of Variability
  • MATH 224

2
Last Class
  • Mean and Median
  • Both are statistics
  • Called Measures of Central Tendency
  • report something about the middle of the data

3
This class
  • Measures of Variability (or Spread)
  • e.g.

4
Dataset
  • Model dataset is one of the assignment datasets,
    FinalGrades2007.xls

5
Mean The Formula
  • Formula for the mean is

6
Variance The Formula
  • Spread can be measured as either
  • distance between data points
  • distance from data to center

7
Variance The Formula
8
Variance The Formula
9
Variance and Standard Deviation
  • Variance is in units of
  • can be hard to interpret
  • If we take square root of variance, we get the
    datas standard deviation
  • Units of standard deviation are same as data (x)
  • Guarantee 75 of the data will lie within 2
    standard deviations of the mean
  • Usually most (up to 95) will lie in that range

10
Example - Marks
  • In MATLAB,
  • Variance
  • var( ltdata columngt)
  • Standard deviation
  • sqrt(var( ltdatagt )), or
  • std( ltdatagt )

11
Computing mean 2 std. devs
  • m mean( ltdatagt )
  • stdev std( ltdatagt )
  • upper m 2 stdev
  • lower m 2 stdev

12
On Histogram
13
In reports
  • Mean 2 standard deviations often reported
  • e.g. Marks were distributed as 69 37
  • Breaking strength of a beam was 1598 N 350 N
  • It is understood that a small fraction values
    will lie outside the given range

14
Determining Percentage Inside 2 standard
deviations
  • Consider a vector of values, v, and single
    threshold values
  • Count number of values
  • length(v)
  • Match of values above a threshold
  • v gt threshold
  • Count of values above a threshold
  • sum( v gt threshold)
  • logical AND
  • (v gt threshold1) (v lt threshold2)
  • Count matching both conditions
  • sum( (v gt threshold1) (v lt threshold2))
  • Percent matching both conditions
  • N length(v)
  • perc (sum( (v gt threshold1) (v lt
    threshold2)))/N

15
Example Marks
  • Percentage within 2 standard deviations of mean
    is

16
Problems with variance, standard deviation
  • As with mean, both variance and standard
    deviation are sensitive to exceptional values
  • variance even worse than mean, because of squared
    difference in formula

17
Interquartile Range (IQR)
  • Quartiles are points which divide sorted data
    into quarters
  • Also known as 25th, 50th, 75th percentiles
  • prctile(v, 25, 50, 75)
  • 50th percentile median
  • 75th 25th percentile interquartile range
  • IQR is in same units as data
  • We expect roughly half the data to lie within the
    IQR

18
Interquartile Example
19
Interquartile Range
  • This range is called a robust statistic because
    small sets of extreme values have little effect
    on it
  • Median is a robust statistic for measuring the
    center of data
  • Mean, variance, standard deviation are not robust
  • Why trimmed mean is sometimes used instead of
    mean

20
Boxplots
  • Measures of spread are often not interesting on
    their own
  • Typically used with mean to compare datasets
  • lower variance usually better in manufactured
    goods
  • high variability makes predictions difficult in
    environmental data
  • Graphical approach to this uses boxplots

21
Boxplots
  • More challenging to format in MATLAB than
    histograms
  • Will cover how to generate them in tutorials next
    week

22
Administration
  • Assignment Format
  • Labs will be for QA about assignments, help with
    MATLAB
  • No lab Thursday both labs on Friday
  • Tutorials will cover more advanced MATLAB
  • summaries will be posted
  • MATLAB purchasing
  • Have put late order in with bookstore, let you
    know what I hear back
  • Can order directly from MathWorks see course web
    site
Write a Comment
User Comments (0)
About PowerShow.com