Chapter 2. Descriptive Statistics: Organizing, Displaying and Summarizing Data

Similar documents
Chapter 2 Describing, Exploring, and Comparing Data

Vocabulary. 5-number summary Rule. Area principle. Bar chart. Boxplot. Categorical data condition. Categorical variable.

Chapter 3 - Displaying and Summarizing Quantitative Data

Prepare a stem-and-leaf graph for the following data. In your final display, you should arrange the leaves for each stem in increasing order.

CHAPTER 2: SAMPLING AND DATA

Averages and Variation

UNIT 1A EXPLORING UNIVARIATE DATA

STP 226 ELEMENTARY STATISTICS NOTES PART 2 - DESCRIPTIVE STATISTICS CHAPTER 3 DESCRIPTIVE MEASURES

STA Rev. F Learning Objectives. Learning Objectives (Cont.) Module 3 Descriptive Measures

15 Wyner Statistics Fall 2013

Chapter 6: DESCRIPTIVE STATISTICS

Math 120 Introduction to Statistics Mr. Toner s Lecture Notes 3.1 Measures of Central Tendency

2.1: Frequency Distributions and Their Graphs

2.1 Objectives. Math Chapter 2. Chapter 2. Variable. Categorical Variable EXPLORING DATA WITH GRAPHS AND NUMERICAL SUMMARIES

STA Module 2B Organizing Data and Comparing Distributions (Part II)

STA Learning Objectives. Learning Objectives (cont.) Module 2B Organizing Data and Comparing Distributions (Part II)

Table of Contents (As covered from textbook)

Unit 7 Statistics. AFM Mrs. Valentine. 7.1 Samples and Surveys

CHAPTER 1. Introduction. Statistics: Statistics is the science of collecting, organizing, analyzing, presenting and interpreting data.

Measures of Central Tendency

AND NUMERICAL SUMMARIES. Chapter 2

Descriptive Statistics

CHAPTER 3: Data Description

To calculate the arithmetic mean, sum all the values and divide by n (equivalently, multiple 1/n): 1 n. = 29 years.

a. divided by the. 1) Always round!! a) Even if class width comes out to a, go up one.

Name Date Types of Graphs and Creating Graphs Notes

No. of blue jelly beans No. of bags

TMTH 3360 NOTES ON COMMON GRAPHS AND CHARTS

Measures of Central Tendency

Univariate Statistics Summary

CHAPTER 2 DESCRIPTIVE STATISTICS

AP Statistics Summer Assignment:

Measures of Central Tendency. A measure of central tendency is a value used to represent the typical or average value in a data set.

Data can be in the form of numbers, words, measurements, observations or even just descriptions of things.

Exploratory Data Analysis

Frequency Distributions

Chpt 3. Data Description. 3-2 Measures of Central Tendency /40

Section 2-2 Frequency Distributions. Copyright 2010, 2007, 2004 Pearson Education, Inc

Chapter 2 Modeling Distributions of Data

Chapter 2: Descriptive Statistics

Chapter 3: Describing, Exploring & Comparing Data

1.2. Pictorial and Tabular Methods in Descriptive Statistics

September 11, Unit 2 Day 1 Notes Measures of Central Tendency.notebook

Chapter 2 - Graphical Summaries of Data

+ Statistical Methods in

Basic Statistical Terms and Definitions

Slide Copyright 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION. Chapter 13. Statistics Sampling Techniques

Organizing and Summarizing Data

AP Statistics Prerequisite Packet

CHAPTER 2: DESCRIPTIVE STATISTICS Lecture Notes for Introductory Statistics 1. Daphne Skipper, Augusta University (2016)

Measures of Position. 1. Determine which student did better

Measures of Dispersion

Understanding and Comparing Distributions. Chapter 4

MAT 142 College Mathematics. Module ST. Statistics. Terri Miller revised July 14, 2015

Chapter2 Description of samples and populations. 2.1 Introduction.

Name: Date: Period: Chapter 2. Section 1: Describing Location in a Distribution

This chapter will show how to organize data and then construct appropriate graphs to represent the data in a concise, easy-to-understand form.

1 Overview of Statistics; Essential Vocabulary

Statistical Methods. Instructor: Lingsong Zhang. Any questions, ask me during the office hour, or me, I will answer promptly.

CHAPTER-13. Mining Class Comparisons: Discrimination between DifferentClasses: 13.4 Class Description: Presentation of Both Characterization and

STA 570 Spring Lecture 5 Tuesday, Feb 1

LESSON 3: CENTRAL TENDENCY

Overview. Frequency Distributions. Chapter 2 Summarizing & Graphing Data. Descriptive Statistics. Inferential Statistics. Frequency Distribution

Lecture Slides. Elementary Statistics Twelfth Edition. by Mario F. Triola. and the Triola Statistics Series. Section 2.1- #

Chapter 1. Looking at Data-Distribution

STP 226 ELEMENTARY STATISTICS NOTES

Things you ll know (or know better to watch out for!) when you leave in December: 1. What you can and cannot infer from graphs.

MATH 1070 Introductory Statistics Lecture notes Descriptive Statistics and Graphical Representation

1.3 Graphical Summaries of Data

The basic arrangement of numeric data is called an ARRAY. Array is the derived data from fundamental data Example :- To store marks of 50 student

Chapter Two: Descriptive Methods 1/50

Unit I Supplement OpenIntro Statistics 3rd ed., Ch. 1

CHAPTER 2 Modeling Distributions of Data

MATH& 146 Lesson 10. Section 1.6 Graphing Numerical Data

Chapter 3: Data Description - Part 3. Homework: Exercises 1-21 odd, odd, odd, 107, 109, 118, 119, 120, odd

Downloaded from

Numerical Summaries of Data Section 14.3

DAY 52 BOX-AND-WHISKER

MATH NATION SECTION 9 H.M.H. RESOURCES

Raw Data is data before it has been arranged in a useful manner or analyzed using statistical techniques.

Lecture Notes 3: Data summarization

10.4 Measures of Central Tendency and Variation

10.4 Measures of Central Tendency and Variation

Math 214 Introductory Statistics Summer Class Notes Sections 3.2, : 1-21 odd 3.3: 7-13, Measures of Central Tendency

Descriptive Statistics

Acquisition Description Exploration Examination Understanding what data is collected. Characterizing properties of data.

Measures of Central Tendency:

Section 1.2. Displaying Quantitative Data with Graphs. Mrs. Daniel AP Stats 8/22/2013. Dotplots. How to Make a Dotplot. Mrs. Daniel AP Statistics

Chapter 3 Analyzing Normal Quantitative Data

Basic Commands. Consider the data set: {15, 22, 32, 31, 52, 41, 11}

3. Data Analysis and Statistics

Maths Revision Worksheet: Algebra I Week 1 Revision 5 Problems per night

Lecture 6: Chapter 6 Summary

Section 6.3: Measures of Position

2.1: Frequency Distributions

3.2-Measures of Center

Probability and Statistics. Copyright Cengage Learning. All rights reserved.

Lecture Slides. Elementary Statistics Tenth Edition. by Mario F. Triola. and the Triola Statistics Series. Slide 1

Learning Log Title: CHAPTER 7: PROPORTIONS AND PERCENTS. Date: Lesson: Chapter 7: Proportions and Percents

Chapter 2 Organizing and Graphing Data. 2.1 Organizing and Graphing Qualitative Data

Transcription:

Chapter 2 Descriptive Statistics: Organizing, Displaying and Summarizing Data

Objectives Student should be able to Organize data Tabulate data into frequency/relative frequency tables Display data graphically Qualitative data pie charts, bar charts, Pareto Charts. Quantitative data Histograms, Stemplots, Dot plots and Boxplots. Describe the shape of the plot. Summarize data numerically Quantitative data only Measure of center mean, median, midrange, and mode. Measure of position quartiles and percentiles. Measure of spread/variation range, variance, standard deviation, and inter-quartile range. Use TI graphing calculator to obtain statistics.

Organize Data Tabulate data into frequency and relative frequency Tables

Tabulate Qualitative Data Qualitative data values can be organized by a frequency distribution A frequency distribution lists Each of the categories The frequency/counts for each category

Frequency Table A simple data set is blue, blue, green, red, red, blue, red, blue A frequency table for this qualitative data is Color Frequency Blue 4 Green 1 Red 3 The most commonly occurring color is blue

What Is A Relative Frequency? The relative frequencies are the proportions (or percents) of the observations out of the total A relative frequency distribution lists Each of the categories The relative frequency for each category Relative frequency = Frequency Total

Relative Frequency Table A relative frequency table for this qualitative data is Color Relative Frequency Blue.500 (= 4/8) Green.125 (= 1/8) Red.375 (= 3/8) A relative frequency table can also be constructed with percents (50%, 12.5%, and 37.5% for the above table)

Tabulate Quantitative Data Suppose we recorded number of customers served each day for total of 40 days as below: We would like to compute the frequencies and the relative frequencies

Frequency/Relative Frequency Table The resulting frequencies and the relative frequencies:

Display Data graphically Qualitative data Bar, Pareto, Pie Charts Quantitative data Histograms, Stemplots, Dot plots

Graphic Display for Qualitative Data Bar Charts, Pareto Charts, Pie Charts

Bar and Pie Charts for Qualitative Data Bar charts for our simple data (generated with Chart command in Excel) Frequency bar chart Relative frequency bar chart Note: Always label the axes, provide category and numeric scales, and title when you present graphs. Relative Frequency Bar Chart Frequency Bar Chart Relative Frequency 0.6 0.5 0.4 0.3 0.2 0.1 0 Blue Green Red Frequency 4.5 4 3.5 3 2.5 2 1.5 1 0.5 0 Blue Green Red Color Color

Pareto Charts A Pareto chart is a particular type of bar graph A Pareto differs from a bar chart only in that the categories are arranged in order The category with the highest frequency is placed first (on the extreme left) The second highest category is placed second Etc. Pareto charts are often used when there are many categories but only the top few are of interest

Pareto Charts Here shows a Pareto chart for the simple data set: Pareto Chart Color Relative Frequency Blue 0.5 Red 0.375 Green 0.125 Relative Frequency 60% 50% 40% 30% 20% 10% 0% Blue Red Green Color

Side-by-Side Bar Charts Use it to compare multiple bar charts. An example side-by-side bar chart comparing educational attainment in 1990 versus 2003

Pie Charts Pie Charts are used to display qualitative data. It shows the amount of data that belong to each category as a proportional part of a circle. Pie Chart Green, 13% Blue, 50% Red, 38% Notice that Bar charts show the amount of data that belong to each category as a proportionally sized rectangular area.

Pie Charts Another example of a pie chart

Summary Qualitative data can be organized in several ways Tables are useful for listing the data, its frequencies, and its relative frequencies Charts such as bar charts, Pareto charts, and pie charts are useful visual methods for organizing data Side-by-side bar charts are useful for comparing multiple sets of qualitative data

Graphic Display Quantitative Data Histograms, Stemplots, Dot Plots

Histogram Histogram is a bar graph which represents a frequency distribution of a quantitative variable. It is a term used only for a bar graph of quantitative data. A histogram is made up of the following components: 1. A title, which identifies the population of interest 2. A vertical scale, which identifies the frequencies or relative frequency in the various classes 3. A horizontal scale, which identifies the variable x. Values or ranges of values may be labeled along the x-axis. Use whichever method of labeling the axis best presents the variable. When you make a graph, make sure you label (give descriptions to) both axes clearly, and give a title for the graph too.

Histogram for discrete Quantitative data Example of histograms for discrete data Frequencies Relative frequencies Note: The term histogram is used only for a bar graph to summarize quantitative data. The bar chart for qualitative data can not be called a histogram. Also, there are no gaps between bars in a histogram.

Categorize/Group Continuous Quantitative Data Continuous type of quantitative data cannot be put directly into frequency tables since they do not have any obvious categories Categories are created using classes, or intervals/ranges of numbers The continuous data is then put into the classes

Categorize/Group Continuous Quantitative Data For ages of adults, a possible set of classes is 20 29 30 39 40 49 50 59 60 and older For the class 30 39 30 is the lower class limit 39 is the upper class limit The class width is the difference between the upper class limit and the lower class limit For the class 30 39, the class width is 40 30 = 10 (The difference between two adjacent lower class limits) The class midpoint = Average of the lower limits for the two adjacent classes

Categorize/Group Continuous Quantitative Data All the classes should have the same widths, except for the last class The class 60 and above is an openended class because it has no upper limit Classes with no lower limits are also called open-ended classes

Categorize/Group Continuous Quantitative Data The classes and the number of values in each can be put into a frequency table Age Number (frequency) 20 29 533 30 39 1147 40 49 1090 50 59 493 60 and older 110 In this table, there are 1147 subjects between 30 and 39 years old

Categorize/Group Continuous Quantitative Data Good practices for constructing tables for continuous variables The classes should not overlap The classes should not have any gaps between them The classes should have the same width (except for possible open-ended classes at the extreme low or extreme high ends) The class boundaries should be reasonable numbers The class width should be a reasonable number

Histogram for continuous Quantitative data Just as for discrete data, a histogram can be created from the frequency table Instead of individual data values, the categories are the classes the intervals of data You can label/scale the bars with the lower class limits or class midpoints.

Stemplots A stem-and-leaf plot ( or simply Stemplot) is a different way to represent data that is similar to a histogram To draw a stem-and-leaf plot, each data value must be broken up into two components The stem consists of all the digits except for the right most one The leaf consists of the right most digit For the number 173, for example, the stem would be 17 and the leaf would be 3

Example of a Stemplot In the stem-and-leaf plot below The smallest value is 56 The largest value is 180 The second largest value is 178

Stemplots Construction To draw a stem-and-leaf plot Write all the values in ascending order Find the stems and write them vertically in ascending order For each data value, write its leaf in the row next to its stem The resulting leaves will also be in ascending order The list of stems with their corresponding leaves is the stem-and-leaf plot

Modification to Stemplots Modifications to stem-and-leaf plots Sometimes there are too many values with the same stem we would need to split the stems (such as having 10-14 in one stem and 15-19 in another) If we wanted to compare two sets of data, we could draw two stem-and-leaf plots using the same stem, with leaves going left (for one set of data) and right (for the other set) a sideby-side stem plot

Dot Plots A dot plot is a graph where a dot is placed over the observation each time it is observed The following is an example of a dot plot

Shapes of Plots for Quantiative Data The pattern of variability displayed by the data of a variable is called distribution. The distribution displays how frequent each value of the variable occurs. A useful way to describe a quantitative variable is by the shape of its distribution Some common distribution shapes are Uniform Bell-shaped (or normal) Skewed right Skewed left Bimodal Note: We are not concerned about the shapes of the plots for qualitative data, because there is no particular order arrangement for the categories of the nominal data. Once we change the order, the shape of the graph will be changed.

Uniform Distribution A variable has a uniform distribution when Each of the values tends to occur with the same frequency The histogram looks flat

Normal Distribution A variable has a bell-shaped (normal) distribution when Most of the values fall in the middle The frequencies tail off to the left and to the right It is symmetric

Right-skewed Distribution A variable has a skewed right distribution when The distribution is not symmetric The tail to the right is longer than the tail to the left The arrow from the middle to the long tail points right In Other words: The direction of skewness is determined by the side of distribution with a longer tail. That is, if a distribution has a longer tail on its right side, it is called a right-skewed distribution. Right

Left-skewed Distribution A variable has a skewed left distribution when The distribution is not symmetric The tail to the left is longer than the tail to the right The arrow from the middle to the long tail points left Left

Bimodal Distribution There are two peaks/humps or highest points in the distribution. Often implies two populations are sampled. The graph below shows a bimodal distribution for body mass. It implies that data come from two populations, each with its own separate average. Here, one group has an average body mass of 147 grams and the other has a average body mass of 178 grams.

Summary Quantitative data can be organized in several ways Histogram is the most used graphical tool. Histograms based on data values are good for discrete data Histograms based on classes (intervals) are good for continuous data The shape of a distribution describes a variable histograms are useful for identifying the shapes

Summarize data numerically Measure of Center, Spread, and Position

Measure of Center Mean, Median, Mode, Midrange

Measures of Center Numerical values used to locate the middle of a set of data, or where the data is most clustered The term mean/average is often associated with the measure of center of a distribution.

Mean An arithmetic mean For a population the population mean Is computed using all the observations in a population Is denoted by a Greek letter µ ( called mu) Is a parameter For a sample the sample mean Is computed using only the observations in a sample Is denoted (called x bar) Is a statistic x Note: We usually cannot measure µ (due to the size of the population) but would like to estimate its value with a sample mean x

Formula for Means The sample mean is the sum of all the values divided by the size of the sample, n: 1 1 x = xi = ( x + x2 +... + x n n 1 n ) The population mean is the sum of all the values divided by the size of the population, N: 1 µ = x N i = 1 N ( x + x +... + x 1 2 N Note: is called summation, means summing all values. It is a short-cut notation for adding a set of numbers. )

Example Example:The following sample data represents the number of accidents in each of the last 6 years at a dangerous intersection. Find the mean number of accidents: 8, 9, 3, 5, 2, 6, 4, 5: Solution: 1 x = + + + + + + + = 8 ( 8 9 3 5 2 6 4 5) 525. In the data above, change 6 to 26: Solution: 1 x = 8+ 9+ 3+ 5+ 2+ 26+ 4+ 5 = 775 8 ( ). Note: The mean can be greatly influenced by outliers (extremely large or small values)

Median The median denoted by M of a variable is the center. The median splits the data into halves When the data is sorted in order, the median is the middle value The calculation of the median of a variable is slightly different depending on If there are an odd number of points, or If there are an even number of points

How to Obtain a Median? To calculate the median of a data set Arrange the data in order Count the number of observations, n If n is odd There is a value that s exactly in the middle That value is the median If n is even There are two values on either side of the exact middle Take their mean to be the median

Example An example with an odd number of observations (5 observations) Compute the median of Sort them in order 6, 1, 11, 2, 11 1, 2, 6, 11, 11 The middle number is 6, so the median is 6

Example An example with an even number of observations (4 observations) Compute the median of 6, 1, 11, 2 Sort them in order 1, 2, 6, 11 Take the mean of the two middle values (2 + 6) / 2 = 4 The median is 4

Quick Way to Locate Median 1. Rank the data (Suppose, the sample size is n.) 2. Find the position of the median (counting from either end) using the formula: i = n +1 2 Then, the median is the ith smallest value.

Example 1 Suppose we want to find the median of the data set 4, 8, 3, 8, 2, 9, 2, 11, 3, 1. Rank the data: 2, 2, 3, 3, 4, 8, 8, 9, 11 2. Find the position of the median using the formula: n +1 2 For the data given, n is 9 (because the size of the sample is 9, that is, there are 9 data values given), so the median position is 9 + 1 = 5 The median is the 5 th smallest or 5 th largest value, which is 4. 2

Example 2 Consider this data set 4, 8, 3, 8, 2, 9, 2, 11, 3, 15 1. Rank the data: 2, 2, 3, 3, 4, 8, 8, 9, 11, 15 2. Find the position of the median using the formula: n +1 2 For the data given, n is 10 (because the size of the sample is 10, that is, there are 10 data values given), so the median position is 10 + 1 = 5.5 2 The median is the 5.5 th smallest or largest value. In other words, it is in the middle of the 5 th and 6 th smallest or largest values. Since the 5 th value is 4 and the 6 th value is 8. We average out 4 and 8, so the median is 6.

Mode The mode of a variable is the most frequently occurring value. For instance, Find the mode of the data 6, 1, 2, 6, 11, 7, 3 Since the data contain 6 distinct values: 1, 2, 3, 6, 7, 11 and, the value 6 occurs twice, all the other values occur only once, so the mode is 6 Note: If two or more values in a sample are tied for the highest frequency (number of occurrences), there is no mode

Midrange Another useful measure of the center of the distribution is Midrange, which is the number exactly midway between a lowest value data L and a highest value data H. It is found by averaging the low and the high values: midrange= L+ H 2

Comparing mean and Median The mean and the median are often different This difference gives us clues about the shape of the distribution Is it symmetric? Is it skewed left? Is it skewed right? Are there any extreme values?

Mean and Median Symmetric the mean will usually be close to the median Skewed left the mean will usually be smaller than the median Skewed right the mean will usually be larger than the median

Symmetric Distribution If a distribution is symmetric, the data values above and below the mean will balance The mean will be in the middle The median will be in the middle Thus the mean will be close to the median, in general, for a distribution that is symmetric

Left-skewed Distribution If a distribution is skewed left, there will be some data values that are larger than the others The mean will decrease The median will not decrease as much Thus the mean will be smaller than the median, in general, for a distribution that is skewed left

Right-skewed Distribution If a distribution is skewed right, there will be some data values that are larger than the others The mean will increase The median will not increase as much Thus the mean will be larger than the median, in general, for a distribution that is skewed right

Mean and Median If one value in a data set is extremely different from the others? For instance, if we made a mistake and 6, 1, 2 was recorded as 6000, 1, 2 The mean is now ( 6000 + 1 + 2 ) / 3 = 2001 The median is still 2 The median is resistant to extreme values than the mean.

Round-off Rule When rounding off an answer, a common rule-of-thumb is to keep one more decimal place in the answer than was present in the original data To avoid round-off buildup, round off only the final answer, not intermediate steps

Measure of Spread Range, Variance, Standard Deviation

Measures of Spread/Dispersion Measures of central tendency alone cannot completely characterize a set of data. Two very different data sets may have similar measures of central tendency. Measures of dispersion are used to describe the spread, or variability, of a distribution Common measures of dispersion: range, variance, and standard deviation

Range The range of a variable is the largest data value minus the smallest data value Compute the range of The largest value is 11 The smallest value is 1 6, 1, 2, 6, 11, 7, 3, 3 Subtracting the two 11 1 = 10 the range is 10 Note: Please do not confused the range with the midrange which is a measure for the center of data distribution

Range The range only uses two values in the data set the largest value and the smallest value The range is affected easily by extreme values in the data. (i.e., not resistant to outliers) If we made a mistake and 6, 1, 2 was recorded as 6000, 1, 2 The range is now ( 6000 1 ) = 5999

Deviations From The Mean The variance is based on the deviation from the mean ( x i µ) for populations x ( x i ) for samples Deviation may be positive or negative depending on if value is above the mean or below the mean. So, the sum of all deviations will be zero. To avoid the cancellation of the positive deviations and the negative deviations when we add them up, we square the deviations first: ( x i µ) 2 for populations x ( x i ) 2 for samples

Population Variance The population variance of a variable is the average of these squared deviations, i.e. is the sum of these squared deviations divided by the number in the population 2 2 2 ( xi µ ) ( x1 µ ) + ( x2 µ ) +... + ( xn µ ) = N N 2 The population variance is represented by σ 2 (namely sigma square) Note: For accuracy, use as many decimal places as allowed by your calculator during the calculation of the squared deviations, if the average is not a whole number.

Example Compute the population variance of 6, 1, 2, 11 Compute the population mean first µ = (6 + 1 + 2 + 11) / 4 = 5 Now compute the squared deviations (1 5) 2 = 16, (2 5) 2 = 9, (6 5) 2 = 1, (11 5) 2 = 36 Average the squared deviations (16 + 9 + 1 + 36) / 4 = 15.5 The population variance σ 2 is 15.5

Sample Variance The sample variance of a variable is the average deviations for the sample data, i.e., is the sum of these squared deviations divided by one less than the number in the sample The sample variance is represented by s 2 Note: we use n 1 as the devisor. 1 ) (... ) ( ) ( 1 ) ( 2 2 2 2 1 2 + + + = n x x x x x x n x x N i

Example Compute the sample variance of 6, 1, 2, 11 Compute the sample mean first = (6 + 1 + 2 + 11) / 4 = 5 Now compute the squared deviations (1 5) 2 = 16, (2 5) 2 = 9, (6 5) 2 = 1, (11 5) 2 = 36 Average the squared deviations (16 + 9 + 1 + 36) / 3 = 20.7 The sample variance s 2 is 20.7

Computational Formulas for the Sample Variance A shortcut (a quick way to compute) formula for the sample variance: ( because you do not need to compute all the deviations from the mean.) s 2 = x 2 n 1 ( x) x 2 is the sum of the squars of each data value. x is the square of the sum of all data values. ( ) 2 2 2 2 2 2 For the above example, = 6 + 1 + 2 + 11 = 162, S 2 400 162 = 4 4 1 n 2 2 2 x ( x) = (6 + 1+ 2 + 11) = 400 = 20.7

Compare Population and Sample Variances Why are the population variance (15.5) and the sample variance (20.7) different for the same set of numbers? In the first case, { 6, 1, 2, 11 } was the entire population (divide by N) In the second case, { 6, 1, 2, 11 } was just a sample from the population (divide by n 1) These are two different situations

Why Population and Sample Variances are different? Why do we use different formulas? The reason is that using the sample mean is not quite as accurate as using the population mean If we used n in the denominator for the sample variance calculation, we would get a biased result Bias here means that we would tend to underestimate the true variance

Standard Deviation The standard deviation is the square root of the variance The population standard deviation Is the square root of the population variance (σ 2 ) Is represented by σ The sample standard deviation Is the square root of the sample variance (s 2 ) Is represented by s Note: Standard deviation can be interpreted as the average deviation of the data. It has the same measuring unit as the original data ( e.g. inches). The variance has a squared unit (e.g. inches 2 ).

Example If the population is { 6, 1, 2, 11 } The population variance σ 2 = 15.5 The population standard deviation σ = If the sample is { 6, 1, 2, 11 } The sample variance s 2 = 20.7 The sample standard deviation s = 20.7 = 15.5 = The population standard deviation and the sample standard deviation apply in different situations 4.5 3.9

Compute mean and Variance for A Frequency Distribution To calculate the mean, variance for a set of sample data: In a grouped frequency distribution, we use the frequency of occurrence associated with each class midpoint In an ungrouped frequency distribution, use the frequency of occurrence, f, of each observation x xf = f s 2 = 2 x f f ( xf ) 1 f 2

Grouped Data To compute the mean, variance, and standard deviation for grouped data Assume that, within each class, the mean of the data is equal to the class midpoint (which is an average of two adjacent lower lass limits.) Use the class midpoint as an approximated value for all data in the same class, since their actual values are not provided. The number of times the class midpoint value is used is equal to the frequency of the class For instance, if 6 values are in the interval [ 8, 10 ], then we assume that all 6 values are equal to 9 (the midpoint of [ 8, 10 ]

Example of Grouped Data As an example, for the following frequency table, Class 0 1.9 2 3.9 4 5.9 6 7.9 Midpoint 1 3 5 7 Frequency 3 7 6 1 we calculate the mean as if The value 1 occurred 3 times The value 3 occurred 7 times The value 5 occurred 6 times The value 7 occurred 1 time

Example of Grouped Data Class 0 1.9 2 3.9 4 5.9 6 7.9 Midpoint 1 3 5 7 Frequency 3 7 6 1 The calculation for the mean would be Or 1 + 1+ 1+ 3 + 3 + 3 + 3 + 3 + 3 + 3 + 5 + 5 + 5 + 5 + 5 + 5 + 17 ( 1 3) + (3 7) + (5 6) + (7 1) 17 xf X = f Which follows the formula = 3.6 7

Example of Grouped Data Since the sample size = f = 3 + 7 + 6 + 1 = 17 the Sum of squared values = x 2 f = 1 2 3 + 3 2 7 + 5 2 6 + 7 2 1 = 265 the square of the sum = 2 2 2 ( x ) = (1 3 + 3 7 + 5 6 + 7 1) = 61 = 3721 f Follow the short-cut formula for the sample variance, we obtain the sample variance S 2 = 3721 265 17 = 17 1 265 218.88235 16 = 2.882 the sample standard deviation S = 2.882 = 1.7

Summary The mean for grouped data Use the class midpoints Obtain an approximation for the mean The variance and standard deviation for grouped data Use the class midpoints Obtain an approximation for the variance and standard deviation

Example of Ungrouped Data Example: A survey of students in the first grade at a local school asked for the number of brothers and/or sisters for each child. The results are summarized in the table below. Here, we see 15 students responded o sibling, 17 students responded 1 sibling, etc. Total number of students in this survey is 62, which is n = f. Find 1) the mean, 2) the variance, and 3) the standard deviation: Solutions: First: Sum: x f x f x 2 f 0 0 1 2 4 5 15 0 17 17 23 46 52 20 10 62 93 17 92 80 50 239 1) x = 93/ 62= 15. 2 239 ( 93) 2) s 2 = 62 62 1 = 163. 3) s= 163. = 128.

Measure of Position Percentiles, Quartiles

Measures of Position Measures of position are used to describe the relative location of an observation within a data set. Quartiles and percentiles are two of the most popular measures of position Quartiles are part of the 5-number summary

Percentile The median divides the lower 50% of the data from the upper 50% The median is the 50 th percentile If a number divides the lower 34% of the data from the upper 66%, that number is the 34 th percentile

Quartiles Quartiles divide the data set into four equal parts The quartiles are the 25 th, 50 th, and 75 th percentiles Q 1 = 25 th percentile Q 2 = 50 th percentile = median Q 3 = 75 th percentile Quartiles are the most commonly used percentiles The 50 th percentile and the second quartile Q 2 are both other ways of defining the median

How to Find Quartiles? 1. Order the data from smallest to largest. 2. Find the median Q 2. 3. The first quartile (Q 1 ) is then the median of the lower half of the data; that is, it is the median of the data falling below the median (Q 2 ) position (and not including Q 2 ). 4. The third quartile (Q 3 ) is the median of the upper half of the data; that is, it is the median of the data falling above the Q 2 position (not including Q 2 ). Note: Excel has a set of different rules to compute these quartiles than the TI graphing calculator which will follow the rules stated above. So, different software may give different quartiles, particularly if the sample size is an odd-numbed. However, for a large data set, the values are often not much different. In our class, we will only follow the rules stated here.

Example The following data represents the ph levels of a random sample of swimming pools in a California town. Find the three quartiles. Solutions: 5.6 5.6 5.8 5.9 6.0 6.0 6.1 6.2 6.3 6.4 6.7 6.8 6.8 6.8 6.9 7.0 7.3 7.4 7.4 7.5 1) Median= Q 2 = the average of the 10 th and 11 th smallest values = (6.4+6.7)/2 =6.55 2) The first quartile = Q 1 = the median of the 10 values below the median = the average of the 5 th and 6 th smallest values = (6.0+6.0)/2 = 6.0 3) The third quartile =Q 3 = the median of the 10 values above the median = the average of the 15 th and 16 th smallest values = (6.9+7.0)/2 = 6.95

Outliers Extreme observations in the data are referred to as outliers Outliers should be investigated Outliers could be Chance occurrences Measurement errors Data entry errors Sampling errors Outliers are not necessarily invalid data

How To Detect Outliers? One way to check for outliers uses the quartiles Outliers can be detected as values that are significantly too high or too low, based on the known spread The fences used to identify outliers are Lower fence = LF = Q 1 1.5 IQR Upper fence = UF = Q 3 + 1.5 IQR Values less than the lower fence or more than the upper fence could be considered outliers

Example Is the value 54 an outlier? 1, 3, 4, 7, 8, 15, 16, 19, 23, 24, 27, 31, 33, 54 Calculations Q 1 = (4 + 7) / 2 = 5.5 Q 3 = (27 + 31) / 2 = 29 IQR = 29 5.5 = 23.5 UF = Q 3 + 1.5 IQR = 29 + 1.5 23.5 = 64 Using the fence rule, the value 54 is not an outlier

Another Measure of the Spread Inter-quartile range (IQR)

Inter-quartile Range (IQR) The inter-quartile range (IQR) is the difference between the third and first quartiles IQR = Q 3 Q 1 The IQR is a resistant measurement of spread. Its value will not be affected easily by extremely large or small values in a data set, since IQR covers only the middle 50% of values.)

Another Graphical Tool to Summarize Data Five-number Summary & Boxplot

Five-number Summary The five-number summary is the collection of The smallest value The first quartile (Q 1 or P 25 ) The median (M or Q 2 or P 50 ) The third quartile (Q 3 or P 75 ) The largest value These five numbers give a concise description of the distribution of a variable

Why These Five Numbers? The median Information about the center of the data Resistant measure of a center The first quartile and the third quartile Information about the spread of the data Resistant measure of a spread The smallest value and the largest value Information about the tails of the data

Example Compute the five-number summary for the ordered data: 1, 3, 4, 7, 8, 15, 16, 19, 23, 24, 27, 31, 33, 54 Calculations The minimum = 1 Q 1 = P 25, Q 1 = 7 M = Q 2 = P 50 = (16 + 19) / 2 = 17.5 Q 3 = P 75 = 27 The maximum = 54 The five-number summary is 1, 7, 17.5, 27, 54

Boxplot The five-number summary can be illustrated using a graph called the boxplot An example of a (basic) boxplot is The middle box shows Q 1, Q 2, and Q 3 The horizontal lines (sometimes called whiskers ) show the minimum and maximum

How to draw A Boxplot? To draw a (basic) boxplot: 1. Calculate the five-number summary 2. Draw & scale a horizontal number line which will cover all the data from the minimum to the maximum 3. Mark the 5 numbers on the number line according to the scale. 4. Superimpose these five marked points on some distance above the lines. 5. Draw a box with the left edge at Q 1 and the right edge at Q 3 6. Draw a line inside the box at M = Q 2 7. Draw a horizontal line from the Q 1 edge of the box to the minimum and one from the Q 3 edge of the box to the maximum

Example To draw a (basic) boxplot Draw the middle box Draw in the median Draw the minimum and maximum Voila!

A Modified Boxplot An example of a more sophisticated boxplot is The middle box shows Q 1, Q 2, and Q 3 The horizontal lines (sometimes called whiskers ) show the minimum and maximum The asterisk on the right shows an outlier (determined by using the upper fence)

How To Draw A Modified Boxplot? To draw a modified boxplot 1. Draw the center box and mark the median, as before 2. Compute the upper fence and the lower fence 3. Temporarily remove the outliers as identified by the upper fence and the lower fence (but we will add them back later with asterisks) 4. Draw the horizontal lines to the new minimum and new maximum (These are the minimum and maximum within the fence) 5. Mark each of the outliers with an asterisk Note: Sometimes, data contain no outliers. You will obtain a basic boxplot.

Example To draw this boxplot Draw the middle box and the median Draw in the fences, remove the outliers (temporarily) Draw the minimum and maximum Draw the outliers as asterisks

Interpret a Boxplot The distribution shape and boxplot are related Symmetry (or lack of symmetry) Quartiles Maximum and minimum Relate the distribution shape to the boxplot for Symmetric distributions Skewed left distributions Skewed right distributions

Symmetric Distribution Distribution Q 1 is equally far from the median as Q 3 is The min is equally far from the median as the max is Boxplot The median line is in the center of the box The left whisker is equal to the right whisker Q 1 M Q 3 Min Q 1 M Q 3 Max

Left-skewed Distribution Distribution Q 1 is further from the median than Q 3 is The min is further from the median than the max is Boxplot The median line is to the right of center in the box The left whisker is longer than the right whisker Min Q 1 MQ 3 Max Min Q 1 MQ 3 Max

Right-skewed Distribution Distribution Q 1 is closer to the median than Q 3 is The min is closer to the median than the max is Boxplot The median line is to the left of center in the box The left whisker is shorter than the right whisker Min Q 1 M Q 3 Max Min Q 1 M Q 3 Max

Side-by-side Boxplot We can compare two distributions by examining their boxplots We draw the boxplots on the same horizontal scale We can visually compare the centers We can visually compare the spreads We can visually compare the extremes

Example Comparing the flight with the control samples Center Spread

Summary 5-number summary Minimum, first quartile, median, third quartile maximum Resistant measures of center (median) and spread (interquartile range) Boxplots Visual representation of the 5-number summary Related to the shape of the distribution Can be used to compare multiple distributions

Using Technology for Statistics Instruction for TI Graphing Calculator

Entering Data into TI Calculator Enter data in lists: Press STAT then choose EDIT menu. (We ll denote the sequence of the key strokes by STAT EDIT). Entering data one by one (press Return after each entry) under a blank column which represents a variable (a list). Note: 1. Clear a list: on EDIT screen, use the up arrow to place the cursor on the list name, press CLEAR, then ENTER (that is, CLEAR ENTER). You need to always clear a list before entering a new set of data into the list. Warning! Pressing the DEL key instead of CLEAR will delete the list from the calculator. You can get it back with the INS key. See Insert a new list below. 2. List name: there are six built-in lists, L1 through L6, and you can add more with your own names. You can get the L1 symbol by pressing the 2 ND key, then 1 key [ 2nd 1 ].(The instruction in the brackets shows the sequence of keys you need to press, here, you press 2ND key, then 1 key to have a L1 symbol.) 3. Insert a new list (optional): STAT EDIT, use the up arrow to place the cursor on a list name, then press INS [ 2nd DEL ]. Type the name of a list using the alpha character keys. The ALPHA key is locked down for you. Press ENTER. The new list is placed just before the point where the cursor was. To obtain a quick statistics, just use one of the build-in list L1 through L6 to enter the data, you do not need to create a new list with a name.

Obtain Numeric Measures from TI Calculator 1. After entering data, return to home screen by pressing QUIT[2 nd MODE]. 2. Press STAT Key, select CALC menu, then choose the number 1 operation : 1-Var Stats, then ENTER. Enter the name of the list, say L 1. That is, STAT CALC 1 ENTER L 1 Note: L 1 is the default list. You do not need to enter it, if the data is on L 1

Obtain Statistics from a Frequency Distribution Enter the values in one list, say L 1, and their corresponding frequencies in another list, say L 2. Then, STAT CALC 1 ENTER L 1, L 2 Note: Need to enter comma L 2 after L 1. The calculator will use the second list as the frequency for the values entered on its list before to calculate the appropriate statistics.

Example 1 Example: A random sample of students in a sixth grade class was selected. Their weights are given in the table below. Find the mean and variance, standard deviation, 5-number summary for this data using the TI calculator: 63 64 76 76 81 83 85 86 88 89 90 91 92 93 93 93 94 97 99 99 99 101 108 109 112 The output shows: x = 90.44 S x = 2261 = 12.244... σ = 11.996... n = 25 min X = 63 1 Med = 92 Q x x 3 x 2 Q = 84 = 99 = 208083 max X = 112 Note: 1. Since this a sample data, we take S x as the standard deviation. 2. You may need to press the arrow key on the calculator several times to view these many statistics.

Example 2 Consider the grouped data we considered previously: Class 0 1.9 2 3.9 4 5.9 6 7.9 Midpoint 1 3 5 7 Frequency 3 7 6 1 Use TI calculator to obtain the statistics: The output shows: Note: Here, the notations used in the x = 3.588.. S x x = 61 = 265 = 1.697.. σ = 1.647.. x n = 17 min X = 1 1 x 2 Q = 3 Med = 3 Q3 = 5 max X = 7 calculator correspond to the notations used in the formula for computing mean, variance and standard deviation of a frequency distribution: n = f = 2 = x x x f x 2 f