Lecture Notes
Chapters 1-2
Part III
Turning Data Into Information
Stat 7 – Armstrong
Chapters 1-2 Part 3
1
Displaying the
distribution of a
quantitative
variable
Large Datasets Small Datasets
Histograms Boxplots Stemplots
X axis:
Variable of Interest 5 Number Similar to a
Summary histogram, but
instead of bars we
have the actual
values
Y axis: Minimum
Frequency or Q1
Relative Frequency Median
Q3
Maximum
When we consider two variables at once we will look at a SCATTERPLOT:
The X axis plots the explanatory variable (independent variable)
The Y axis plots the response variable (dependent variable)
Stat 7 – Armstrong
Chapters 1-2 Part 3
2
Describing the
Distribution of a
QUANTITATIVE
VARIABLE
SHAPE CENTER SPREAD
SHAPE
SYMMETRIC SKEWED
or has OUTLIERS
POSITIVELY NEGATIVELY
UNIFORM NORMAL SKEWED SKEWED
RIGHT SKEWED LEFT SKEWED
Other features to consider:
o Gaps: Spaces separating data
o Outliers: Data values that are set far apart from the rest of the body of the distribution
Stat 7 – Armstrong
Chapters 1-2 Part 3
3
APPROPRIATE
MEASURES OF
CENTER
SYMMETRIC DISTRIBUTION SKEWED DISTRIBUTION
OR
DISTN WITH OUTLIERS
MEAN MEDIAN
(average) (middle number)
Not Resistant Resistant
APPROPRIATE
MEASURES OF
SPREAD
SYMMETRIC DISTRIBUTION SKEWED DISTRIBUTION
OR
DISTN WITH OUTLIERS
Standard Deviation Inter Quartile Range
(typical deviation from the mean) (the middle 50% of your data)
Not Resistant Resistant
Stat 7 – Armstrong
Chapters 1-2 Part 3
4
MEDIAN
Appropriate measure
of CENTER for
SKEWED
DISTRIBUTIONS
and
DISTRIBUTIONS
WITH OUTLIERS
The median is
not influenced
Find the Find the by outliers.
MEDIAN MEDIAN
by hand by calculator
1st: 2nd: 1st: 2nd:
It is a
Put all the data Find the middle Put all the data Calculate RESISTANT
in order from position into a list in your measure of
smallest to calculator 1 VAR STATS
center.
largest n1
2
Note: For an odd number of values: Single middle value is the median
Ex: 10, 11, 15, 19, 20
Note: For an even number of values we take the average of the two middle values
Ex: 10, 11, 15, 19, 20, 80
Stat 7 – Armstrong
Chapters 1-2 Part 3
5
QUARTILES
The range is quick &
easy, but not very
informative.
Split up the IQR
distribution into
Inter Quartile Range
quarters
25th percentile 50th percentile 75th percentile Q3 – Q1
First Second Third Measures
Quartile Quartile Quartile Spread for
Skewed Dist
Q1 Q2 Q3
25 % of data 50 % of data 75 % of data
below this below this below this
observation observation observation
___% of data ___% of data ___% of data
above this above this above this
observation observation observation
Stat 7 – Armstrong
Chapters 1-2 Part 3
6
Ex:
Below are the numbers of deaths from tornadoes in the U.S. from 1990 through 2000.
53 39 39 33 69 30 25 67 130 94 40
a) Calculate the median.
b) Calculate the Interquartile range (IQR)
Stat 7 – Armstrong
Chapters 1-2 Part 3
7
Ex: French Exams
The Modern Language Association provides listening tests that measure understanding of spoken
French. The range of scores is 0 to 46. Here are the scores of 21 high school French teachers at
the beginning of an intensive summer course in French (in order).
9 15 20 20 22 23 23 30 30 31 31 32 34 34 35 39 40 42 42 45 46
Create a histogram:
Create a stemplot:
Create a boxplot:
What is the shape of the distribution?
What is the best measure of center for this distribution? WHY?
What is the best measure of spread for this distribution? WHY?
Stat 7 – Armstrong
Chapters 1-2 Part 3
8
Outliers:
Step 1: Determine Quartile 1 and Quartile 3 from the data set.
Step 2: Compute the Interquartile Range (IQR) IQR= Q3-Q1
Step 3: Determine the Fences. Fences serve as cutoff points for determining outliers
Mild Lower Fence = Q1- 1.5(IQR) Extreme Lower Fence = Q1- 2*1.5(IQR)
Mild Upper Fence= Q3 + 1.5(IQR) Extreme Upper Fence= Q3 + 2*1.5(IQR)
Step 4:
If observation < lower fence then it is an OUTLIER
If observation > upper fence then it is an OUTLIER
If lower fence < observation < upper fence it is NOT an OUTLIER
Outliers
What should be done with outliers? First try to understand them in the context of the data. A
histogram can show how the outlier fits with the rest of the data:
Is there a large gap between the outlier and the rest of the data?
Is the outlier a value at the end of a stretched out tail?
Could the outlier be an error?
What you should NOT do:
Leave an outlier in place without comment, and proceed as if nothing were unusual.
Drop an outlier without comment just because it is unusual.
Stat 7 – Armstrong
Chapters 1-2 Part 3
9
Ex: The data set below is the case prices (in dollars) of wines produced by a vineyard in
Napa Valley.
150 135 90 122 128 67 142 140 128 132 127 140 129
Stat 7 – Armstrong
Chapters 1-2 Part 3
10
MEAN
Measures
CENTER
for
SYMMETRIC
Distributions
The mean is
Find the Find the
SAMPLE MEAN SAMPLE influenced
MEAN
X by outliers.
by hand X
by calculator
1st: 2nd: 1st: 2nd:
It is a
Add up all of the Divide Put all the data Calculate NON-
data values the sum by the
sample size
X 1 ... X n into a list in your
calculator 1 VAR STATS
RESISTANT
measure of
n center.
The true mean of a population uses the notation
Stat 7 – Armstrong
Chapters 1-2 Part 3
11
Comparing the Mean and the Median:
When we look at distributions, where is the mean and where is the median?
NORMAL “SYMMETRIC” CURVE SKEWED DISTRIBUTIONS
The mean will be pulled towards the tail of the skewed data.
For Normal Bell Shaped Distributions, the mean is the more appropriate measure of the
center.
For Skewed Distributions, the median is the more appropriate measure of the center.
Why use the mean then?
It is easy to do calculations on the mean.
The mean has nice properties that we will use later in this course.
Stat 7 – Armstrong
Chapters 1-2 Part 3
12
STANDARD
DEVIATION
Measures
SPREAD
for
SYMMETRIC
Distributions
Find the Find the The standard
SAMPLE POPULATION deviation is
STANDARD STANDARD influenced
DEVIATION DEVIATION by outliers.
s
By hand By Calculator By hand By Calculator It is a
NON-
RESISTANT
measure of
spread.
Will not be 1st: Not possible. Not Possible.
asked to find Put all the If you need Do not let the
by hand. data into a , it should calculator
Formula in list in your be given to fool you.
text. calculator you.
2nd:
Calculate
1 VAR
STATS
Stat 7 – Armstrong
Chapters 1-2 Part 3
13
Variance is the standard deviation squared.
Standard Deviation is the positive square root of the variance
It is a distance measure so it has to be positive
It is the “typical” distance of the datapoints to the mean.
A standard deviation of zero means ________________________.
Values that are very close together have a small standard deviation.
Values that are very far apart have a large standard deviation.
Ex: 1, 2, 3, 4, 5 Calculate the standard deviation
Ex: 1, 1, 1, 1, 1 Calculate the standard deviation
NOTATION:
Sample Mean X
Population Mean
Sample Standard deviation s
Sample Variance s2
Population Standard deviation
Population Variance
Stat 7 – Armstrong
Chapters 1-2 Part 3
14
Suppose we have that a single observation (X) comes from a normal distribution with
(population mean) and (population standard deviation) both given.
We write that the distribution of X is:
X ~ Normal ( , )
We say: “X is normally distributed with mean = and standard deviation = ”
X
Z
Z-Score calculation:
The Z SCORE is unitless.
The Z SCORE tells us how far our observation is from the mean in terms of standard deviations.
Ex: Two friends are training for the Boston marathon. James is training on a hilly jogging loop. For
the general population of runners, the time to complete this loop follows a normal distribution with a
mean of 167 minutes and standard deviation 25 minutes. Rob is training on a flat jogging route. The
time to complete this flat route follows a normal distribution with a mean of 143 minutes and
standard deviation 20 minutes. If it takes James 91 minutes to complete his loop, and it takes Rob 86
minutes to complete his loop, who is in better condition?
Draw a picture for each of the distributions.
What is the Z-Score for each runner?
Who is in better condition?
Stat 7 – Armstrong
Chapters 1-2 Part 3
15