Professional Documents
Culture Documents
Lecture 1
Lecture 1
Lecture 1
These materials are altered ones from copyrighted lecture slides ( 2009 W.H.
Freeman and Company) from the homepage of the book:
The Practice of Business Statistics Using Data for Decisions :Second Edition
by Moore, McCabe, Duckworth and Alwan.
Introduction
What is statistics? Use of data
Population and sample
Types of variables
Graphical display of data
Numerical summeries of data
Obtaining data
Sample
A parameter is a number
describing a characteristic of
the population.
A statistic is a number
describing a characteristic of a
sample.
Variables
In a study, we collect informationdatafrom individuals/items. They
can be people, animals, plants, or any object of interest.
A variable is any characteristic of an individual/item.
A variable usually varies among individuals/items.
Example: age, height, blood pressure, ethnicity, leaf length, first language
Example: How tall you are, your age, your blood cholesterol level, the
number of credit cards you own
or categorical (qualitative).
Something that falls into one of several categories. What can be counted
is the count or proportion of individuals/items in each category.
Example: Your blood type (A, B, AB, O), your hair color, your ethnicity,
whether you paid income tax last tax year or not
Quantitative
Each individual is
assigned to one of
several categories.
Each individual is
attributed a
numerical value.
Individuals
in sample
DIAGNOSIS
AGE AT DEATH
Patient A
Heart disease
56
Patient B
Stroke
70
Patient C
Stroke
75
Patient D
Lung cancer
60
Patient E
Heart disease
80
Patient F
Accident
73
Patient G
Diabetes
69
Displaying distributions/data
with graphs
Ways to chart categorical
data
(Graphical
summary
of data)
Bar graphs
Pie charts
Histograms
Interpreting histograms
Stemplots
Time plots
Bar graphs
Each category is
represented by
a bar.
Pie charts
The slices must
represent the parts of one whole.
Bar graphs
Each category is represented by one bar. The bars height shows the count (or
sometimes the percentage) for that particular category.
Sorted alphabetically
Much less useful
Pie charts
Each slice represents a piece of one whole. The size of a slice depends on what
percent of the whole this category represents.
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.
Example: Histogram of the
December 2004 unemployment
rates in the 50 states and
Puerto Rico.
Interpreting histograms
When describing the distribution of 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.
Symmetric
distribution
Skewed
distribution
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.
Alaska
Florida
IMPORTANT NOTE:
Your data are the way they are.
Do not try to force them into a
particular shape.
It is a common misconception
that if you have a large enough
data set, the data will eventually
turn out nice and symmetrical.
2)
3)
STEM
LEAVES
Stemplot
When the observed values have too many digits, trim the numbers
before making a stemplot.
This time plot shows a regular pattern of yearly variations. These are seasonal
variations in fresh orange pricing most likely due to similar seasonal variations in
the production of fresh oranges.
There is also an overall upward trend in pricing over time. It could simply be
reflecting inflation trends or a more fundamental change in this industry.
0
0
130
552
738
414
198
90
56
50
71
137
178
194
290
310
149
10000
9000
10000
8000
9000
7000
8000
6000
7000
5000
6000
4000
5000
3000
4000
2000
3000
2000
1000
1000 0
800
800 700
700 600
600 500
500 400
400 300
300 200
200 100
100 0
0
# Cases
# deaths reported
36
531
4233
8682
7164
2229
600
164
57
722
1517
1828
1539
2416
3148
3465
1440
# cases diagnosed
week 1
week 2
week 3
week 4
week 5
week 6
week 7
week 8
week 9
week 10
week 11
week 12
week 13
week 14
week 15
week 16
week 17
# Deaths
The pattern over time for the number of flu diagnoses closely resembles that for the
number of deaths from the flu, indicating that about 8% to 10% of the people
diagnosed that year died shortly afterward from complications of the flu.
Scales matter
1950
1960
1970
1980
1990
250
Death rate (per thousand)
200
150
100
50
0
1940
2000
1960
1980
2000
Years
Years
200
150
100
50
0
1940
1960
Years
1980
2000
A picture is worth a
thousand words,
200
BUT
180
160
140
120
1940
1960
1980
Years
2000
Describing distributions/data
with numbers (Numerical
summary
of
data)
Measures of center
(central
location): mean, median, mode
58.2
59.5
60.7
60.9
61.9
61.9
62.2
62.2
62.4
62.9
63.9
63.1
63.9
64.0
64.5
64.1
64.8
65.2
65.7
66.2
66.7
67.1
67.8
68.9
69.6
x1 x2 ... xn
x
n
Example: Mean earnings
of Black females
1 n
x xi
n i 1
262,934
x
$17,528.93
15
Mean
Median
Mode
Left skew
Mean
Median
Mode
Mean
Median
Mode
Right skew
x 3.4
x 4 .2
Without the outliers
With the outliers
Disease X:
x 3.4
M 3 .4
x 3.4
M 2 .5
M = median = 3.4
Maximum = 6.1
M = median = 3.4
6
5
4
3
2
1
0
Disease X
Five-number summary:
min Q1 M Q3 max
Calculating quartiles
Here the sample size is n=25
Boxplots remain
true to the data and
depict clearly
symmetry or skew.
Side-by-side boxplots
Suspected outliers
Outliers are troublesome data points, and it is important to be able to
identify them.
One way to raise the flag for a suspected outlier is to compare the
distance from the suspicious data point to the nearest quartile (Q 1 or
Q3). We then compare this distance to the interquartile range
(distance between Q1 and Q3).
We call an observation a suspected outlier if it falls more than 1.5
times the size of the interquartile range (IQR) above the first quartile or
below the third quartile. This is called the 1.5 * IQR rule for outliers.
8
7
Q3 = 4.35
Distance to Q3
7.9 4.35 = 3.55
6
5
Interquartile range
Q3 Q 1
4.35 2.2 = 2.15
4
3
2
1
Q1 = 2.2
0
Disease X
Individual #25 has a value of 7.9 years, which is 3.55 years above the
third quartile. This is more than 3.225 years, 1.5 * IQR. Thus,
individual #25 is a suspected outlier.
x
)
i
n 1 1
Mean
1 s.d.
1 n
2
s
(
x
x
)
i
n 1 1
Calculations
1
df
(x
x)
Mean = 63.4
Sum of squared deviations from mean = 85.2
Degrees freedom (df) = (n 1) = 13
s2 = variance = 85.2/13 = 6.55 inches squared
s = standard deviation = 6.55 = 2.56 inches
Properties of standard
deviation
s measures spread about the mean and should be used only when
s = 0 only when all observations have the same value and there is
no spread. Otherwise, s > 0.
- From Menu:
Tools/Data Analysis/
Descriptive Statistics
Give common
statistics of your
sample data.
Minitab
Boxplot
Mean SD
Obtaining data
Sampling methods
Stratified samples
Probelms in sampling
Data
Available data are data that were produced in the past for some other
purpose but that may help answer a present question inexpensively.
The library and the Internet are sources of available data.
Government statistical offices are the primary source for demographic,
economic, and social data (visit the Fed-Stats site at www.fedstats.gov).
Association or causeeffect
If early retirement and early death are found to be related (associative or
causative or both)?
That is,
3.
4.
Simple random sampling: subjects are selected with equal chances (n/N)
Systematic random sampling: selected the first one from first k subjects in the
population with equal chances and then select every kth subject until the
sample is completed
Stratified random sampling: divide population into several groups (strata) and
then select a random sample from each of them (Can be either proportional or
disproportional)
Cluster random sampling: divide the population into a large numebr of clusters
and then select a random sample of clusters. Use all the subjects in them
Sampling variability
Each time we take a random sample from a population, we are likely to
get a different set of individuals and a calculate a different statistic. This
is called sampling variability.
The good news is that, if we take lots of random samples of the same
size from a given population, the variation from sample to samplethe
sampling distributionwill follow a predictable pattern. All of
statistical inference is based on this knowledge.
Bias
The study design is biased if it systematically favors certain outcomes
There are many types of biases: sampling bias, response bias, etc.
Practical note
Large samples are not always attainable.
Opinion polls have a limited sample size due to time and cost of
operation. During election times though, sample sizes are increased
for better accuracy.
Response bias: Fancy term for lying when you think you should not
tell the truth, or forgetting. This is particularly important when the
questions are very personal (e.g., How much do you drink?) or
related to the past.