Upload
mabel-scott
View
218
Download
1
Embed Size (px)
Citation preview
Objectives (BPS chapter 1)Picturing Distributions with Graphs
What is Statistics ?
Individuals and variables
Two types of data: categorical and quantitative
Ways to chart categorical data: bar graphs and pie charts
Ways to chart quantitative data: histograms and stemplots
Interpreting histograms
Time plots
Statistics ? Statistics is the science of data
Individuals and Variables Individuals are the objects described by a set of
data. Individuals may be people, but they may also be animals or things.
A variable is any characteristic of an individual. A variable can take different values for different individuals.
Example: A data set layout
Two types of variables
A variable can be either
A categorical variable places an individual into one of several groups or categories. What can be counted is the count or proportion of individuals in each category.
or A quantitative variable takes numerical values for
which arithmetic operations such as adding and averaging make sense.
The distribution of a variable tells us what values it takes and how often it takes these values.
Example Data from a medical study contain values of
many variables for each of the people who were the subjects of the study. Which of the following variables are categorical and which are quantitative?
a) Gender (female or male) --- Categoricalb) Age (years) --- Quantitativec) Race (black, white or other) --- Categoricald) Smoker (yes or no) --- Categoricale) Systolic blood pressure --- Quantitativef) Level of calcium in the blood --- Quantitative
Ways to chart categorical dataBecause the variable is categorical, the data in the graph can be ordered any way we want (alphabetical, by increasing value, by year, by personal preference, etc.).
Bar graphsEach category isrepresented by a bar.
Pie chartsPeculiarity: The slices must represent the parts of one whole.
Example: Top 10 causes of death in the United States, 2001
Rank Causes of death CountsPercent of
top 10s
Percent of total
deaths
1 Heart disease 700,142 37% 29%
2 Cancer 553,768 29% 23%
3 Cerebrovascular 163,538 9% 7%
4 Chronic respiratory 123,013 6% 5%
5 Accidents 101,537 5% 4%
6 Diabetes mellitus 71,372 4% 3%
7 Flu and pneumonia 62,034 3% 3%
8 Alzheimer’s disease 53,852 3% 2%
9 Kidney disorders 39,480 2% 2%
10 Septicemia 32,238 2% 1%
All other causes 629,967 26%
For each individual who died in the United States in 2001, we record what was
the cause of death. The table above is a summary of that information.
Top 10 causes of death in the U.S., 2001
Bar graphsEach category is represented by one bar. The bar’s height shows the count (or
sometimes the percentage) for that particular category.
The number of individuals who died of an accident in 2001 is
approximately 100,000.
Percent of people dying fromtop 10 causes of death in the U.S., 2000
Pie chartsEach slice represents a piece of one whole.
The size of a slice depends on what percent of the whole this category represents.
Ways to chart quantitative data
Histograms and stemplots
These are summary graphs for a single variable. They are very useful to
understand the pattern of variability in the data.
Line graphs: time plots
Use when there is a meaningful sequence, like time. The line connecting the
points helps emphasize any change over time.
Other graphs to reflect numerical summaries (see chapter 2)
Example
Histograms
The range of values that a variable can take is divided into equal-size intervals.
The histogram shows the number of individual data points that fall in each interval.
The first column represents all states with a percent Hispanic in their
population between 0% and 4.99%. The height of the column shows how
many states (27) have a percent Hispanic in this range.
The last column represents all states with a percent Hispanic between 40%
and 44.99%. There is only one such state: New Mexico, at 42.1% Hispanic.
Interpreting histograms
When describing a quantitative variable, we look for the overall pattern and for
striking deviations from that pattern. We can describe the overall pattern of a
histogram by its shape, center, and spread.
Histogram with a line connecting
each column too detailed
Histogram with a smoothed curve
highlighting the overall pattern of
the distribution
Most common distribution shapes
A distribution is symmetric if the right and left sides
of the histogram are approximately mirror images of
each other.
Symmetric distribution
Complex, multimodal distribution
Not all distributions have a simple overall shape,
especially when there are few observations.
Skewed distribution
A distribution is skewed to the right if the right
side of the histogram (side with larger values)
extends much farther out than the left side. It is
skewed to the left if the left side of the histogram
extends much farther out than the right side.
Alaska Florida
Outliers
An important kind of deviation is an outlier. Outliers are observations
that lie outside the overall pattern of a distribution. Always look for
outliers and try to explain them.
The overall pattern is fairly
symmetrical except for two
states clearly not belonging
to the main trend. Alaska
and Florida have unusual
representation of the
elderly in their population.
A large gap in the
distribution is typically a
sign of an outlier.
Stem plots
How to make a stem plots:
1) Separate each observation into a stem,
consisting of all but the final (rightmost) digit,
and a leaf, which is that remaining final digit.
Stems may have as many digits as needed, but
each leaf contains only a single digit.
2) Write the stems in a vertical column with the
smallest value 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.
Original data: 9, 9, 22, 32, 33, 39, 39, 42, 49, 52, 58, 70
STEM LEAVES
State PercentAlabama 1.5Alaska 4.1Arizona 25.3Arkansas 2.8California 32.4Colorado 17.1Connecticut 9.4Delaware 4.8Florida 16.8Georgia 5.3Hawaii 7.2Idaho 7.9Illinois 10.7Indiana 3.5Iowa 2.8Kansas 7Kentucky 1.5Louisiana 2.4Maine 0.7Maryland 4.3Massachusetts 6.8Michigan 3.3Minnesota 2.9Mississippi 1.3Missouri 2.1Montana 2Nebraska 5.5Nevada 19.7NewHampshire 1.7NewJ ersey 13.3NewMexico 42.1NewYork 15.1NorthCarolina 4.7NorthDakota 1.2Ohio 1.9Oklahoma 5.2Oregon 8Pennsylvania 3.2RhodeIsland 8.7SouthCarolina 2.4SouthDakota 1.4Tennessee 2Texas 32Utah 9Vermont 0.9Virginia 4.7Washington 7.2WestVirginia 0.7Wisconsin 3.6Wyoming 6.4
Percent of Hispanic residents
in each of the 50 states
Step 2:
Assign the values to
stems and leaves
Step 1:
Sort the data
State PercentMaine 0.7WestVirginia 0.7Vermont 0.9NorthDakota 1.2Mississippi 1.3SouthDakota 1.4Alabama 1.5Kentucky 1.5NewHampshire 1.7Ohio 1.9Montana 2Tennessee 2Missouri 2.1Louisiana 2.4SouthCarolina 2.4Arkansas 2.8Iowa 2.8Minnesota 2.9Pennsylvania 3.2Michigan 3.3Indiana 3.5Wisconsin 3.6Alaska 4.1Maryland 4.3NorthCarolina 4.7Virginia 4.7Delaware 4.8Oklahoma 5.2Georgia 5.3Nebraska 5.5Wyoming 6.4Massachusetts 6.8Kansas 7Hawaii 7.2Washington 7.2Idaho 7.9Oregon 8RhodeIsland 8.7Utah 9Connecticut 9.4Illinois 10.7NewJ ersey 13.3NewYork 15.1Florida 16.8Colorado 17.1Nevada 19.7Arizona 25.3Texas 32California 32.4NewMexico 42.1
Time Plots
Time plots are for variables measured over time and it is all about changes over time.
A time plot of a variable plots each observation against the time at which it was measured. Always put time on the horizontal scale of your plot and the variable you are measuring on the vertical scale. Connecting the data points by line helps emphasize any change over time
Example
How have college tuition and fees changed over time?
Time Plot
Time plot of the average tuition paid by students at public and private college foe academic year 1970-1971 to 2001-2002