Introduction to Probability Introduction to Probability
and Statisticsand Statistics
Describing Data with
Graphs
DefinitionDefinition
•Statistics transforms raw data into meaningful results.
•It is the science behind the identification, collection,
organization, interpretation, and presentation of data.
• Data could be qualitative or quantitative.
•Statistics makes information-based decision-making
easier.
•(Science of transforming large volume of data into a
form suitable for decision-making)
Application of StatisticsApplication of Statistics
•Statistics is indispensable for decision-making in various sectors
and verticals. It is applied in marketing, e-commerce, banking,
finance, human resource, production, and information
technology. In addition, this discipline has been a prominent part
of research and is widely used in data mining, medicine,
aerospace, robotics, psychology, and machine learning.
•Not to forget the economics, government, and public sectors
where statistical data is a significant part of decision-making.
For example, it is used for public surveys, weather forecasts,
sports scoring, and budgeting.
•Laying down the fundamentals of
statistics
Variables and DataVariables and Data
•A variablevariable is a characteristic that
changes or varies over time and/or
for different individuals or objects
under consideration.
•Examples:Examples: Hair color, white blood
cell count, time to failure of a
computer component.
DefinitionsDefinitions
•An experimental unitexperimental unit is the individual
or object on which a variable is
measured.
•A measurementmeasurement results when a
variable is actually measured on an
experimental unit.
•A set of measurements, called datadata,,
can be either a samplesample or a
populationpopulation..
Example
•Variable
–Hair color
•Experimental unit
–Person
•Typical Measurements
–Brown, black, blonde, etc.
ExampleExample
•Variable
–Time until a
light bulb burns out
•Experimental unit
–Light bulb
•Typical Measurements
–1500 hours, 1535.5 hours,
etc.
How many variables How many variables
have you measured?have you measured?
•Univariate dataUnivariate data:: One variable is
measured on a single experimental unit.
•Bivariate dataBivariate data:: Two variables are
measured on a single experimental unit.
•Multivariate dataMultivariate data:: More than two
variables are measured on a single
experimental unit.
Types of VariablesTypes of Variables
Qualitative
DiscreteContinuous
Quantitative
Types of VariablesTypes of Variables
•Qualitative variablesQualitative variables measure a quality
or characteristic on each experimental
unit.
•Examples:Examples:
•Hair color (black, brown, blonde…)
•Make of car (Dodge, Honda, Ford…)
•Gender (male, female)
•State of birth (California, Arizona,….)
Types of VariablesTypes of Variables
•Quantitative variablesQuantitative variables measure a
numerical quantity on each
experimental unit.
DiscreteDiscrete if it can assume only a
finite or countable number of values.
ContinuousContinuous if it can assume the
infinitely many values corresponding
to the points on a line interval.
ExamplesExamples
•For each orange tree in a grove, the
number of oranges is measured.
–Quantitative discrete
•For a particular day, the number of cars
entering a college campus is measured.
–Quantitative discrete
•Time until a light bulb burns out
–Quantitative continuous
Graphing Qualitative VariablesGraphing Qualitative Variables
•Use a data distributiondata distribution to describe:
–What valuesWhat values of the variable have
been measured
–How oftenHow often each value has occurred
•“How often” can be measured 3 ways:
–Frequency
–Relative frequency = Frequency/n
–Percent = 100 x Relative frequency
ExampleExample
•A bag of M&Ms contains 25
candies:
•Raw Data:Raw Data:
•Statistical Table:Statistical Table:
Color Tally FrequencyRelative
Frequency
Percent
Red 3 3/25 = .1212%
Blue 6 6/25 = .2424%
Green 4 4/25 = .1616%
Orange 5 5/25 = .2020%
Brown 3 3/25 = .1212%
Yellow 4 4/25 = .1616%
m
m
mm
m
m
m m
m
m
m
m
m
m
m
m
m
m
m
m
m
m
m
mmm
mm
m
mm
mm
mmm
mmm
mm
mm
m
m
m
m
m m
m
GraphsGraphs
Bar Chart
Pie Chart
Color
F
r
e
q
u
e
n
c
y
GreenOrangeBlueRedYellowBrown
6
5
4
3
2
1
0
16.0%
Green
20.0%
Orange
24.0%
Blue
12.0%
Red
16.0%
Yellow
12.0%
Brown
Graphing Quantitative Graphing Quantitative
VariablesVariables
•A single quantitative variable measured for
different population segments or for different
categories of classification can be graphed
using a pie pie or bar chartbar chart.
A Big Mac
hamburger costs
$4.90 in Switzerland,
$2.90 in the U.S. and
$1.86 in South
Africa.
Country
C
o
s
t
o
f
a
B
i
g
M
a
c
(
$
)
South AfricaU.S.Switzerland
5
4
3
2
1
0
•A single quantitative variable measured
over time is called a time seriestime series. It can
be graphed using a lineline or bar chartbar chart.
Sept Oct Nov Dec Jan Feb Mar
178.10 177.60177.50177.30 177.60178.00 178.60
CPI: All Urban Consumers-Seasonally Adjusted
DotplotsDotplots
•The simplest graph for quantitative data
•Plots the measurements as points on a horizontal axis,
stacking the points that duplicate existing points.
•Example:Example: The set 4, 5, 5, 7, 6
4 5 6 7
Stem and Leaf PlotsStem and Leaf Plots
•A simple graph for quantitative data
•Uses the actual numerical values of each
data point.
–Divide each measurement into two parts: the
stem and the leaf.
–List the stems in a column, with a vertical line
to their right.
–For each measurement, record the leaf
portion in the same row as its matching stem.
–Order the leaves from lowest to highest in
each stem.
–Provide a key to your coding.
Interpreting Graphs:Interpreting Graphs:
Location and SpreadLocation and Spread
•Where is the data centered on the
horizontal axis, and how does it
spread out from the center?
Interpreting Graphs: ShapesInterpreting Graphs: Shapes
Mound shaped and
symmetric (mirror
images)
Skewed right: a few
unusually large
measurements
Skewed left: a few
unusually small
measurements
Bimodal: two local peaks
Interpreting Graphs: Interpreting Graphs:
OutliersOutliers
•Are there any strange or
unusual measurements that
stand out in the data set?
OutlierNo Outliers
ExampleExample
•A quality control process measures the diameter
of a gear being made by a machine (cm). The
technician records 15 diameters, but inadvertently
makes a typing mistake on the second entry.
1.9911.8911.9911.9881.993 1.9891.9901.988
1.9881.9931.9911.9891.9891.9931.9901.994
Relative Frequency Relative Frequency
HistogramsHistograms
•A relative frequency histogramrelative frequency histogram for a
quantitative data set is a bar graph in which the
height of the bar shows “how often” (measured
as a proportion or relative frequency)
measurements fall in a particular class or
subinterval.
Create
intervals
Stack and draw bars
Relative Frequency HistogramsRelative Frequency Histograms
•Divide the range of the data into 5-125-12
subintervalssubintervals of equal length.
•Calculate the approximate widthapproximate width of the
subinterval as Range/number of subintervals.
•Round the approximate width up to a
convenient value.
•Use the method of left inclusionleft inclusion, including the
left endpoint, but not the right in your tally.
•Create a statistical tablestatistical table including the
subintervals, their frequencies and relative
frequencies.
Relative Frequency HistogramsRelative Frequency Histograms
•Draw the relative frequency relative frequency
histogramhistogram, plotting the subintervals on
the horizontal axis and the relative
frequencies on the vertical axis.
•The height of the bar represents
–The proportionproportion of measurements falling in
that class or subinterval.
–The probabilityprobability that a single
measurement, drawn at random from the
set, will belong to that class or subinterval.
ExampleExample
The ages of 50 tenured faculty at a
state university.
•34 48 70 63 52 52 35 50 37 43 53 43 52 44
•42 31 36 48 43 26 58 62 49 34 48 53 3945
•34 59 34 66 40 59 36 41 35 36 62 34 38 28
•43 50 30 43 32 44 58 53
•We choose to use 6 6 intervals.
•Minimum class width == (70 – 26)/6 = 7.33(70 – 26)/6 = 7.33
•Convenient class width = 8= 8
•Use 66 classes of length 88, starting at 25.25.
Age Tally FrequencyRelative
Frequency
Percent
25 to < 331111 5 5/50 = .1010%
33 to < 411111 1111 111114 14/50 = .2828%
41 to < 491111 1111 11113 13/50 = .2626%
49 to < 571111 1111 9 9/50 = .1818%
57 to < 651111 11 7 7/50 = .1414%
65 to < 7311 2 2/50 = .044%
Ages
R
e
l
a
t
i
v
e
f
r
e
q
u
e
n
c
y
73655749413325
14/50
12/50
10/50
8/50
6/50
4/50
2/50
0
Shape?
Outliers?
What proportion of the
tenured faculty are
younger than 41?
What is the probability that
a randomly selected
faculty member is 49 or
older?
Skewed right
No.
(14 + 5)/50 = 19/50 = .38
(8 + 7 + 2)/50 = 17/50 = .34
Describing
the
Distribution
Ages
R
e
l
a
t
i
v
e
f
r
e
q
u
e
n
c
y
73655749413325
14/50
12/50
10/50
8/50
6/50
4/50
2/50
0
Key ConceptsKey Concepts
I. How Data Are GeneratedI. How Data Are Generated
1. Experimental units, variables, measurements
2. Samples and populations
3. Univariate, bivariate, and multivariate data
II. Types of VariablesII. Types of Variables
1. Qualitative or categorical
2. Quantitative
a. Discrete
b. Continuous
III. Graphs for Univariate Data DistributionsIII. Graphs for Univariate Data Distributions
1. Qualitative or categorical data
a. Pie charts
b. Bar charts
Key ConceptsKey Concepts
2. Quantitative data
a. Pie and bar charts
b. Line charts
c. Dotplots
d. Stem and leaf plots
e. Relative frequency histograms
3. Describing data distributions
a. Shapes—symmetric, skewed left, skewed right,
unimodal, bimodal
b. Proportion of measurements in certain intervals
c. Outliers