Docsity

Numerical Summaries for Data: Measuring the Center and Spread, Study notes of Statistics

Toggle sidebar
bg1
Stat 528 (Autumn 2008)
Numerical summaries for data
(Describing distributions with numbers)
Reading: Section 1.2
•Measures of the center
–the mean, median, mode, trimmed mean
–What do we use – the mean or the median?
•Quartiles
–A five number summary
–Boxplots
–Outliers
•Measures of spread/variability
–Standard deviation, variance, IQR and range
•Numerical Summaries in MINITAB
•Changing the units of measurement
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download Numerical Summaries for Data: Measuring the Center and Spread and more Study notes Statistics in PDF only on Docsity!

Stat 528 (Autumn 2008) Numerical summaries for data (Describing distributions with numbers)

Reading: Section 1.

  • Measures of the center
    • the mean, median, mode, trimmed mean
    • What do we use – the mean or the median?
  • Quartiles
    • A five number summary
    • Boxplots
    • Outliers
  • Measures of spread/variability
    • Standard deviation, variance, IQR and range
  • Numerical Summaries in MINITAB
  • Changing the units of measurement

The sheep weights revisited

  • Here is the dataset of the weights (in pounds) of 23 sheep. 180 160 157 185 159 165 168 165 175 186 155 169 168 170 173 181 189 179 182 177 157 169 166
  • Here is the stemplot Stem-and-leaf of sheep N = 23 Leaf Unit = 1.

4 15 5779 5 16 0 (7) 16 5568899 11 17 03 9 17 579 6 18 012 3 18 569

  • Can you summarize the features of this dataset?

The median

  • The median, M , is the “exact midpoint” of the data.
    1. Sort the data in increasing order. 2a. If the number of data points, n, is odd, the median M is the center value of the sorted data. i.e., the n+1 2 th largest value. OR 2b. If n is even, the median M is the average of the two center values. i.e., the average of the n 2 th and n+1 2 th largest values.
  • For the sheep dataset the sorted weights are 155 157 157 159 160 165 165 166 168 168 169 169 170 173 175 177 179 180 181 182 185 186 189

Other measures of the center

  • The mode(s) of a set of observations is the value (or values) which occurs most frequently. - The mode(s) of the sheep weights is
  • Suppose we remove the bottom α% and top α% of the values from a set of observations. - The α% trimmed mean is the mean of the remaining values. - As α increases the mean is less affected by outliers. Ex: What are the 10% and 20% trimmed means of the sheep weights?

The order statistics

  • Suppose we have n data values x 1 , x 2 ,... , xn.
  • Define the order statistics, x(1), x(2),... , x(n) as the data sorted from smallest to largest: x(1) = smallest value; x(2) = 2nd smallest value; ... x(n) = largest value.
  • Ex: What are x(1) and x(3) for the sheep weight data?

Quartiles

  • The sample median, M , denotes the half way point of the sorted observations (the 50% point). Half of the data is below the median, and half is above.
  • The first quartile (Q 1 ) is the 25% point. 25% of the data lies below Q 1 and 75% lies above.
  • The third quartile (Q 3 ) is the 75% point.
  • The interquartile range (IQR) is given by IQR = Q 3 − Q 1.
  • To calculate quartiles:
    1. Calculate the sample median. Split the sorted data in half. If n is odd, leave the median out of both halves.
    2. Q 1 is the median of the lower half of the data.
    3. Q 3 is the median of the upper half of the data.

Some example boxplots

^

egg found in nest of

Outliers

  • An observation further than 1. 5 ×IQR from the closest quar- tile is called an outlier. (Sometimes an observation further than 3 × IQR from the closest quartile is called an extreme outlier).
  • MINITAB denotes outliers on box-plot with an asterisk (*) separate from the main box-plot.
  • Sometimes outliers are not included in the numeric sum- maries of data (such as in calculating the mean, median, etc.).
  • Important question in practice: should we really leave data out?

Measures of spread/variability – the variance

  • The variance, s^2 , of a set of observations is s^2 =

∑n i=1(xi^ −^ x¯)^2 n − 1

  • measures the “average” of the squared deviations of the ob- servations from the mean. - Why squared? - Why n − 1?
  • When s^2 = 0 we have no spread.
  • As s^2 increases above 0, observations spread out further about the mean.
  • BUT, variance has squared units compared to the original data.

The standard deviation

  • The standard deviation, s, of a set of observations is the square root of the variance, i.e.,

s =

s^2 =

√∑n i=1(xi^ −^ x¯)^2 n − 1.

  • Has the same units as the observations.
  • s = 0 corresponds to no spread.
  • As s increases above 0, observations spread out further about the mean.
  • s (and s^2 ) are sensitive to outliers and skewness.

Calculating numerical summaries in MINITAB

To summarize our sheep dataset

  • Select Stat → Basic Statistics → Display Descrip- tive Statistics.
  • A dialog box now appears.
  • In variable you select the variable you want to summarize. Either - type the variable number (e.g. C1) into the box, OR - in the right hand panel click on C1 sheep and choose Select.
  • To produce the summaries click OK in the dialog. (You can also produce plots of the data by clicking on Graphs).

Numerical summaries in MINITAB (cont.)

  • The summaries are presented in the Session window: Descriptive Statistics: sheep Variable N N* Mean SE Mean StDev Minimum Q1 Median Q sheep 23 0 171.09 2.09 10.01 155.00 165.00 169.00 180. Variable Maximum sheep 189.
  • Some headings you might not know:
  • N: number of observations.
  • N*: number of missing observations.
  • StDev: standard deviation.
  • SE Mean: standard error for the mean (ignore for just now!)

Changing units of measurement – transformations

  • When we collect data, what is the effect of changing the units of measurement? - Is the distribution affected? - Do the measures of center and spread change?
  • Example: Suppose in a clinical setting we measure the body temperature of 10 patients. How are summaries of the data altered by our choice of the units of measurement? e.g., degrees Fahrenheit or degrees Celsius.

Linear transformations

  • Let x 1 , x 2 ,... , xn be our data, and let our transformed data be y 1 , y 2 ,... , yn.
  • A linear transform is defined by yi = a + b xi, i = 1,... , n. where a and b are constants. Some examples of linear trans- formations include: xi yi formula a b cents dollars yi = xi/ 100 kilometers miles yi = 0. 62 xi Fahrenheit Celsius yi = 59 (xi − 32) pounds kilograms yi = 2. 2 xi
  • A linear transformation shifts and scales the x-axis.
  • Thus the shape of a distribution is not affected by a linear transform.