Presentation on theme: "1 Laugh, and the world laughs with you. Weep and you weep alone.~Shakespeare~"— Presentation transcript:
1 Laugh, and the world laughs with you. Weep and you weep alone.~Shakespeare~
2 Chapter 3: Data Description Types of data Graphical/Numerical summaries
3 What are Data? Any set of data contains information about some group of individuals. The information is organized in variables.
4 Terms A population is a collection of all individuals about which information is desired. A sample is a subset of a population. A variable is a characteristic of an individual. The distribution of a variable tells us what values/categories it takes and how often it takes those values/categories in the population.
5 Data Analysis Goal: to study how variables relate to one another in a population Method: estimating the distributions of variables (in the whole population) by summarizing the distributions of data on those variables
6 Example: A College’s Student Dataset The data set includes data about all currently enrolled students such as their ages, genders, heights, grades, and choices of major. Who? What individuals do the data describe? Population/sample of study? What? How many variables do the data describe? Give an example of variables.
7 Types of Variables A categorical variable places an individual into one of several groups or categories. A quantitative variable takes numerical values for which arithmetic operations such as adding and averaging make sense. Q. Which variable is categorical ? Quantitative?
A variable Categorical/ Qualitative Nominal variable Ordinal variable Numerical/ Quantitative Discrete variable Continuous variable 8 Q: Does “average” make sense? Yes No Yes Q: Is there any natural ordering among categories?Q: Can all possible values be listed down?
9 Two Basic Strategies to Explore Data Begin by examining each variable by itself. Then move on to study the relationship among the variables. Begin with a graph or graphs. Then add numerical summaries of specific aspects of the data.
10 A Dataset of CSUEB Students GenderHeight (inches) Weight (pounds) College M68.5155Bsns F61.299Sci F63.0115Bsns M70.0205Sci M68.6170Bsns F65.1125Arts M72.4220Arts M--188Sci
11 Summarizing Data We will start from summarizing data on a variable to on several variables by: Displaying the distribution of data with graphs Describing the distribution of data with numbers
12 Terms Frequency = the # of individuals in a category or at a value. Relative frequency = the % of individuals in a category or at a value. They both can be used to display the distribution of data.
13 Graphical Tools for One Variable For a categorical variable: – Pie charts – Bar graphs For a quantitative variable: – Histograms – Stem-and-leaf plots (read on your own) – Boxplots
14 How to Make a Pie Chart 1. Calculate the % for each category 2. Draw a pie and slice it accordingly.
16 How to Make a Bar Chart 1. Label frequencies on one axis and categories of the variable on the other axis. 2. Construct a rectangle at each category of the variable with a height equal to the frequency in the category. 3. Leave a space between categories
18 Displaying Distributions of Quantitative Variables Stem-and-leaf plots: good for small to medium datasets Histograms: Similar to bar charts; good for medium to large datasets
19 How to Make a Histogram 1. Divide the range of data by the approximate # of intervals desired (usually 5-20). Round the resulting number to a convenient number (the common width for the intervals). 2. Construct intervals with the common width so that the first interval contains the smallest data value and the last interval contains the largest data value. 3. Draw the histogram: the variable on the horizontal axis and the count (or %) on the vertical axis.
BPS - 5th Ed.Chapter 1 20 Histograms: Class Intervals How many intervals? – One rule is to calculate the square root of the sample size, and round up. Size of intervals? – Divide range of data (max min) by number of intervals desired, and round to convenient number Pick intervals so each observation can only fall in exactly one interval (no overlap)
21 What do We See from Histograms? Important features we should look for: Overall pattern – Shape – Center – Spread Outliers, the values that fall far outside the overall pattern
22 How to Make a Stemplot 1. Separate each observation into a stem consisting of all but the final (rightmost) digit and a leaf, the final digit. Stems may have as many digits as needed, but each leaf contains only a single digit. Example: height of 68.5 leaf = “5” and the other digit “68” will be the stem
23 How to Make a Stemplot 2. Write the stems in a vertical column with the smallest at the top, and draw a vertical line at the right of this column. 3. Write each leaf in the row to the right of its stem, in increasing order out from the stem.
25 Overall Pattern—Shape How many peaks, called modes? A distribution with one peak is called unimodal. Symmetric or skewed? – Symmetric if the large values are mirror images of small values – Skewed to the right if the right tail (large values) is much longer than the left tail (small values) – Skewed to the left if the left tail (small values) is much longer than the right tail (large values)
26 Describing Data on a Quantitative Variable (Sec 3.4) To measure center: Mode, Mean and Median (Sec 3.5) To measure variability: Range, Interquartile Range (IQR) and Standard Deviation (SD) Outliers (Sec 3.6) Five-number summary and boxplot
BPS - 5th Ed.Chapter 2 27 Quartiles Three numbers which divide the ordered data into four equal sized groups. Q 1 has 25% of the data below it. Q 2 has 50% of the data below it. (Median) Q 3 has 75% of the data below it.
BPS - 5th Ed.Chapter 2 28 Obtaining the Quartiles Order the data. For Q 2, just find the median. For Q 1, look at the lower half of the data values, those to the left of the median location; find the median of this lower half. For Q 3, look at the upper half of the data values, those to the right of the median location; find the median of this upper half.
33 Identifying Outliers The central box of a boxplot spans Q 1 and Q 3 ; recall that this distance is the Interquartile Range (IQR). We call an observation a mild (or extreme) outlier if it falls more than 1.5 (or 3.0) IQR above the third quartile or below the first quartile.
34 Summarizing Data from 2 Variables 2 categorical var’sContingency table (Cluster or stacked) bar chart 2 quantitative var’sRegression equation Scatterplot 1 categorical + 1 quantitative var Side-by-side boxplot
BPS - 5th Ed.Chapter 1 35 Time Plots A time plot shows behavior over time. Time is always on the horizontal axis, and the variable being measured is on the vertical axis. Look for an overall pattern (trend), and deviations from this trend. Connecting the data points by lines may emphasize this trend. Look for patterns that repeat at known regular intervals (seasonal variations).
Empirical Rule (68-95-99.7 rule) If a variable X follows normal distribution, that is, all X values (the whole population) show bell-shaped, then: Mean(X) + 1*SD(X) covers 68% of possible X values Mean(X) + 2*SD(X) covers 95% of possible X values Mean(X) + 3*SD(X) covers 99.7% of possible X values 37