ECON 1280
Analysis of Economics Data
Topic 1. Describing Data I
(Chapters 1 and 2)
Xinyao Qiu
HKU Faculty of Business and Economics
The University of Hong Kong
Course Overview and Logistics
Course Overview
• This course studies the measurement and interpretation of economic
variables, and how to model their relationships using appropriate
empirical methods. Topics include interpretation of headline statistics,
describing economic aggregates, modeling of economic relationships
and drawing conclusions from observations.
Course Information
• Instructor:
• Dr. Xinyao Qiu(xinyaoq@hku.hk)
• Consultation time: Friday 15:00-17:00 @ KK 513
Please book an appointment in advance: https://calendly.com/xyqiu18/econ-1280-2026
• Course tutors:
• Haojie Chen(haojie24@hku.hk); Consultation time: Wednesday 15:00-16:00 @ KK1026
• Ulrich Jonk (ulrichjo@hku.hk); Consultation time: Tuesday 13:00-15:50 KK1026
• Any issues on administration: enrolment, Moodle, time clash, absence from exams, HW
and grading, (clarification of materials): contact the tutors
Course Information
Tutorials:
There are 12 tutorial sessions per week, please book your desired slot. Tutorials will start in the
third week of class.
• Monday 12:00 - 12:50 KK1211 (Ulrich Jonk)
• Monday 13:00 - 13:50 KK1211 (Ulrich Jonk)
• Monday 15:00 - 15:50 KK1327 (Ulrich Jonk)
• Monday 16:00 - 16:50 KK201 (Ulrich Jonk)
• Tuesday 11:00 - 11:50 KK1010 (Ulrich Jonk)
• Tuesday 12:00 - 12:50 KK1010 (Ulrich Jonk)
• Wednesday 11:00 - 11:50 LE5 (Ulrich Jonk)
• Wednesday 12:00 - 12:50 LE6 (Ulrich Jonk)
• Wednesday 14:00 - 14:50 EH102 (Ulrich Jonk)
• Wednesday 15:00 - 15:50 EH101 (Ulrich Jonk)
• Wednesday 16:00-16:50 KK926 (Haojie Chen)
• Wednesday 19:00-19:50 KK1211 (Haojie Chen)
Required Textbook: SBE
• Newbold, Carlson and Thorne,
Statistics for Business and
Economics, Global edition, 10th
edition, Pearson 2022
• Purchase links for the print
version and the digital book are
included in the syllabus.
Prerequisite
• This is a very math intensive course.
• It is strongly recommended to achieve Level 2 or above in
HKDSE Mathematics Module 1 or 2, or pass MATH1009 or
MATH1011 or MATH1013.
e.g., Topics 4 and 8 involve calculus.
• Please consider seriously whether you would take this course
before taking necessary mathematics.
• Late drop is not allowed.
Evaluation:
50% on Attendance and Assignments
• Attendance (10%)
• Taken every class by the HKU Mobile App.
• See syllabus for the instructions.
• We count number of classes you attend out of 10 to be your participation grade.
• If you attend 8, you get 8%, etc.
• There are a total of 12 classes but attendance grade is capped at 10.
• This means you can miss two classes without any excuse but still get full
attendance grade of 10%.
• If you attend 11 classes, you get 10% of attendance grade.
• If you have a valid excuse to miss a class (such as medical reason or you represent
HKU to compete as an athlete) --- email the tutors
Evaluation:
50% on Attendance and Assignments
• Four assignments (40%)
• The assignment can be typed or handwritten. Scan everything into one single PDF (including
graphs output from Excel) and turn in your HW on Moodle on the due date (usually before
midnight, 11:59PM on a Wednesday).
• Write your name and UID on the first page of your submission. Name your PDF last name_first
name_Assignment_Number (e.g. Qiu_Xinyao_Assignment_II)
• First assignment has been posted on Moodle. You should start as soon as I finish Topic 1 in the
first two lectures. Don’t wait till the first tutorial to start.
• No late HWs will be accepted. To avoid any risk, start it early.
• Tutorials: help you do assignments by going through key concepts and practice questions. They
will start in week 3
• Plagiarism is a serious offense. You could discuss your HWs but you must write your
assignments on your own.
Tutorials and Assignments
• Late assignments will NOT be accepted since we will post answers after
deadline.
• Each assignment is worth 10% of your grade. Don’t lose this because you
submit late.
• The deadlines are (all Wednesdays, 11:59pm)
• Assignment I: 23 September
• Assignment II: 7 October
• Assignment III: 11 November
• Assignment IV: 2 December
• Please mark your calendars NOW and set REMINDERS to yourselves.
Evaluation:
Another 50% on Midterm and Final
• Exams (50% total): closed book and closed note. A formula sheet will be provided.
Excel formulae will not be tested. Most of the exam questions will be coming from the
question bank with minor modifications. Best way to prepare: slides, tutorials,
question bank, and assignments.
• One Midterm Test (20%)
• Covers materials up till Topic 4, continuous random variables.
• Past exam paper has been uploaded to Moodle.
• One Final Exam (30%)
• Cumulative but heavier weight on materials after the midterm
Exam Policy
• No supplementary midterm examination will be given.
• The midterm date and time is Sunday, 11 October, 10am to 12pm
• I suggest marking your calendar now to avoid time conflicts.
• If you have a legitimate reason for missing the midterm, such as
illness (must provide doctor’s medical certificate), please inform the
tutors via email BEFORE the exam starts.
• In case of having a legitimate reason for missing the midterm, the
weight (20%) will be shifted to the final exam (so your final accounts
for 50% of your grade).
Software
• We will use Excel for assignments in this course.
• Assignment: Excel commands need not be submitted, just submit the
graphs/tables/results generated using Excel.
• Midterm and Final Exams: no Excel commands will be tested.
Email/Questions Policy
• Expect 24-48 hours response time.
• Before you email about anything, check the slides/syllabus/Moodle
announcements to see if it is already answered there.
• Any issues on administration: enrolment, Moodle, time clash, absence from
exams, HW and grading, (clarification of materials): contact the tutors
• Minimize emailing your content questions to the instructor/tutor since it is
difficult to answer via emails. Come to office hours.
UG Econometric Courses at HKU Business School
• Econ 1280: This course is the first course in the sequence/introduction to statistics. Prerequisite for
other courses.
• Offered both spring and fall. You should enroll in Econ 1280 in the fall if you want to enroll in
Econ 2280 in the spring.
• Econ 2280 Introductory Econometrics (both fall and spring): linear regression
• Econ 3225 Big Data Economics (spring only): machine learning
• Econ 3283 Economic Forecasting (fall only): time series
• Econ 3284 Introduction to Causal Inference and Statistical Learning (spring only): policy evaluation
• Econ 1280 is about statistical concepts and their empirical applications
• Chapter 12-13 are on linear regression (Econ 2280), and Chapter 16: time series and forecasting
(Econ 3283). The remaining chapters will be covered in this course.
Semester Outline: 12 Classes
• [1 Sep] Topic 1: Describing Data: Graphical (Chapters 1)
• [8 Sep] Topic 1: Describing Data: Numerical (Chapter 2)
• [15 Sep] Topic 2: Probability: Random Variables (Chapter 3)
[Assignment 1 is due Wednesday, 23 September, Topics 1 & 2]
• [22 Sep] Topic 3: Discrete Random Variables (Chapter 4)
• [29 Sep] Topic 4: Continuous Random Variables (Chapter 5)
[Assignment 2 is due Wednesday, 7 October, Topics 2, 3 & 4]
• [6 Oct] Topic 5: Sampling Distribution Theory (Chapter 6) + Midterm Review
Midterm on Sunday Oct 11 : covers materials till Topic 4 Continuous R.V.
• [13 Oct]: Reading week break
Semester Outline: 12 Classes (cont’d)
• [Oct 20] Topic 6: Hypothesis Testing: One Population (Chapters 9 and 10)
• [Oct 27] Topic 6: Hypothesis Testing: One Population (Chapters 9 and 10)
• [Nov 3] Topic 6: Hypothesis Testing: Two Population (Chapters 9 and 10)
[Assignment 3 is due Wednesday, 11 November, Topics 5 & 6]
• [Nov 10] Topic 7: Confidence Interval Estimation (Chapters 7 and 8)
• [Nov 17] Topic 8: Simple Linear Regression (Chapter 15)
• [Nov 24] Topic 8: Simple Linear Regression (Chapter 15)
[Assignment 4 is due Wednesday, 2 December, Topics 7 & 8]
Final: will be arranged centrally by the Examination Office, covers materials till Topic 8
Anything marked with an asterisk (*) is not testable material.
How to Succeed in this Class
• Come to lectures, tutorials and do all assignments diligently, start early.
• Optional but highly recommended: more self-practice using Test Bank
• There will be a Test Bank for every topic with some questions for practice.
• You are recommended to do all questions in the question bank.
• Answers to these questions will be uploaded for you to check against your own.
• The midterm and final exams will take questions from this question bank.
• There are ~200 questions (practice questions in the lecture slides +
assignment and tutorial questions + test bank questions) totaling all 8 topics.
Start early.
• Bonuses for excellent (A) students:
• Extra credits on assignments
• One challenging question in the exams
QUESTIONS?
Plan of this Lecture
What is statistics?
1. Why do we study it?
2. Some key definitions in statistics
3. Classification of Variables
How do we describe data?
1. Graphical (Chapter 1 of SBE)
2. Numerical (Chapter 2 of SBE)
Plan of this Lecture
What is statistics?
1. Why do we study it?
2. Some key definitions in statistics
3. Classification of Variables
How do we describe data?
1. Graphical (Chapter 1 of SBE)
2. Numerical (Chapter 2 of SBE)
What is Statistics?
What is Statistics?
Assume
• You must take ECON1280
• You have two instructors to choose from: Dr. Anna and Dr. Ben
• All you care about is the grade you will receive
Question:
• Which instructor would you choose?
Dr. Anna
Dr. Ben
What is Statistics?
• Everyday decisions are based on information
• Complete information versus limited information
• Data are used to assist decision making
• Statistics is a tool to help process, summarize, analyze, and interpret data
• Use statistics to make informed decisions
• Raw data are usually not easy to interpret
• We need statistical tools to make raw data understandable
• Tables and graphs can provide visual support for decision making
• Use numerical measures for more rigorous analysis
Why Study Statistics?
• On a personal level: to become better decision-makers and make
informed decisions about your lives
• What courses to take
• Which sector to work in after graduation
• Whether you should do a master’s/PhD program
• ….and because statistics is everywhere!
• Suppose I want to know the average salary of HKU UG graduates in 2025.
What do you do? [4k graduates]
• Suppose I want to know the average salary of everyone between age 15
and 64 in the United States. What do you do? [200 million people]
Plan of this Lecture
• What is statistics?
1. Why do we study it?
2. Key Definitions
- Population vs. Sample, Random Sampling
- Parameter vs. Statistic
- Descriptive and Inferential Statistics
3. Classification of Variables
• How do we describe data?
1. Describing Data: Graphical
2. Describing Data: Numerical
Population vs. Sample
Random Sampling
Key Definitions
• A population is the complete set of all items of interest or under
investigation
• N represents the population size
• Can be very large or infinite
• E.g. working-age population in the U.S.
• A sample is an observed subset/portion of the population with a fixed
given sample size n
• n represents the sample size
• The tradeoff: complete information on the population, VS costly data
collection process on the entire population
• The hope: the sample can represent the population.
Population
Sample
Sampling
Simple random sampling is a sampling scheme in which
• each member of the population is chosen strictly by chance
• the selection of one member is independent of the selection of any
other member
• every possible sample of a given size, n, is equally likely to be chosen
(has the same probability of selection)
• although random sampling is too ideal in practice (due to reasons like
cost concerns), it serves as a benchmark for other sampling schemes
Sampling
Systematic sampling
• Assure that the population is arranged in a way that is not related to
the subject of interest
• Select every jth item from the population
• where j=N/n
• The first item is randomly selected from 1 to j
• Suppose n = 400 and N = 4000. So j = 10. Randomly assign first item
to be 3rd, then you choose 3rd, 13th, 23th, … to be in the sample.
• It provides a good representation of the population if there is no
cyclical variation in the population.
Practice Question
Suppose there are 9 adults whose heights are
(1.61, 1.62, 1.60, 1.55, 1.68, 1.75, 1.55, 1.67, 1.58)
We need to sample 3 adults and get the average.
Q1: What are N and n in this example?
Q2: How does simple sampling scheme work?
Practice Question
Suppose there are 9 adults whose heights are
(1.61, 1.62, 1.60, 1.55, 1.68, 1.75, 1.55, 1.67, 1.58)
We need to sample 3 adults and get the average.
Q1: What are N and n in this example?
N = 9, n=3
Q2: How does simple sampling scheme work?
One e.g. create 9 identical pieces of paper with these nine numbers written on
each piece respectively, randomly select 3.
Practice Question
Identify the type of sampling used in each of the following scenarios.
1. The quality control department at a cereal manufacturer measures
the weight of every 10th box off of the assembly line.
2. A student walks down the halls in her dorm asking students how
much money they would spend in a food court in the dorm lobby in
an effort to persuade the administration to offer such an option
Practice Question
Identify the type of sampling used in each of the following scenarios.
1. The quality control department at a cereal manufacturer measures
the weight of every 10th box off of the assembly line.
•
Systematic sampling
2. A student walks down the halls in her dorm asking students how
much money they would spend in a food court in the dorm lobby in
an effort to persuade the administration to offer such an option.
•
Random sampling
Parameter vs. Statistic
Definitions
A parameter is a numerical
measure that describes a
specific characteristic of a
population
•
•
A statistic is a numerical
measure that describes a
specific characteristic of a
sample
In other words: a parameter is a function of the population and a statistic if a function of the sample
This course will study ways to make decisions on a population parameter, based on a sample statistic.
Practice Question
After an airplane security scare on Christmas day, 2009, the Gallup
organization interviewed 542 American air travelers about increased
security measures at airports. The report stated that 78% of American
air travelers are in favor of United States airports using full-body-scan
imaging on airline passengers.
1. Identify the population
2. Identify the sample
3. Determine whether the highlighted value is a parameter or statistic
Source: Hawkes Learning
Practice Question
After an airplane security scare on Christmas day, 2009, the Gallup
organization interviewed 542 American air travelers about increased security
measures at airports. The report stated that 78% of American air travelers
are in favor of United States airports using full-body-scan imaging on airline
passengers.
1. Identify the population
All American air travelers
2. Identify the sample
542 travelers that are surveyed
3. Determine whether the highlighted value is a parameter or statistic
Statistic
Source: Hawkes Learning
A Note on Sampling Error
The goal of statistics is to make decisions on a population parameter based on a sample
statistic.
• Because n < N, there must be some uncertainty in the decision making based on the statistic
(about the parameter). The resulting error is called sampling error.
• Even the whole population were collected, there are still some errors called nonsampling
error.
• The population actually sampled is not the relevant one
• Survey subjects may give inaccurate or dishonest answers, e.g. voting opinion on Donald
Trump
• There may be no response to survey questions
• Read the textbook (page 28) for other examples of nonsampling errors.
• This course assumes no nonsampling error and centers on the treatment of sampling errors
Descriptive vs. Inferential Statistics
Definitions
Descriptive statistics focus on graphical and numerical procedures that
are used to summarize and process data
Inferential statistics focus on using the data to make predictions,
forecasts, and estimates to assist decision making
Usually, descriptive statistics are elementary and intuitive, and
inferential statistics are more advanced and more powerful
Descriptive Statistics
• Collect data
• e.g., Survey
• Present data
• e.g., tables and graphs
• Summarize data
• e.g., sample mean
Inferential Statistics
Inference is the process of drawing conclusions
or making decisions about a population based
on sample results
• Estimation
• e.g., Estimate the population mean
height using the sample mean height
• Hypothesis testing
• e.g., Test the claim that the population
mean height is 1.65 meters
Plan of this lecture
• What is statistics?
1. Why do we study it?
2. Key Definitions
3. Classification of Variables
- Based on the type and amount of information
- Based on the levels of measurement
• How do we describe data?
1. Describing Data: Graphical
2. Describing Data: Numerical
Classification of Variables
Based on the type and amount of information
Classification of Variables
• Correctly classifying data is an important first step to selecting the
correct statistical procedures needed to analyze and interpret data.
• Before we classify them --- what is a “variable”?
What is a “Variable”?
A variable is a specific characteristic (such as age or weight) of an
individual or object.
• A variable is any property or descriptor that can take multiple values.
• "How old are you?” "42 years old"
• Here, "age" is the variable, and "42" is its value
• Example of variables
• Eye color: black, brown, gray, hazel, green, etc.
• Age: 18, 19, 20, 21,….
• Weight (kg): 40, 45, 52, 56, 67, 75, 80,…
Two Ways of Variable Classifications
1. Based on the type and amount of information contained in the data:
categorical variables and numerical variables
• Categorical variables:
• produce responses that belong to groups or categories.
- e.g., responses to yes/no questions.
- e.g., choices from "strongly disagree" to "strongly agree".
• Numerical variables:
1. A discrete variable is a variable whose value is obtained by counting.
2. A continuous variable is a variable whose value is obtained by measuring.
- In daily life, we tend to truncate continuous variables as if they were discrete ones
due to the precision of measurement instruments or convenience.
Variable Classification 1
Based on the type and amount of information contained in the data
Categorical variables and Numerical variables
Discrete variable (counting) and Continuous variable (measuring)
Variable
Value
1
Gender
Female, Male, ….
2
Eye color
Black, Brown,….
3
Age
(year) 18,19, …
4
Weight
(kg.) 50, 60, …
5
# of students
under 19 years old
(counts)
6
# of students
under 85 kg.
(counts)
Variable
classification
Variable Classification 1
Based on the type and amount of information contained in the data
Categorical variables and Numerical variables
Discrete variable (counting) and Continuous variable (measuring)
Variable
Value
1
Gender
Female, Male, ….
2
Eye color
Black, Brown,….
3
Age
(year) 18,19, …
4
Weight
(kg.) 50, 60, …
5
# of students
under 19 years old
(counts)
6
# of students
under 85 kg.
(counts)
Variable
classification
Categorical
variables
Numerical
variables
Numerical
variables:
continuous
Numerical
variables:
discrete
Classification of Variables
Based on the levels of measurement
Two Ways of Variable Classifications
2. Based on the levels of measurement: qualitative variables and
quantitative variables.
• Qualitative data do not assign measurable meaning to the "difference" in
numbers.
• Quantitative data assign measurable meaning to the "difference" in numbers
An Example
• Eye color: Gray (3) – Black (1) = Brown (2) ??
• Weight: 60kg – 45kg = 15kg
Variable
Eye
color
Value
New Numerical
Value
Variable
Value
Black
Brown
Gray
Green
Hazel
Others
Black=1
Brown=2
Gray=3
Green=4
Hazel=5
Others=6
Weight
40
45
50
55
60
…
Variable Classification 2
Based on the levels of measurement
Qualitative data include nominal data and ordinal data.
• Nominal data are considered the lowest or weakest type of data
• e.g., gender, country of citizenship, phone number
• where numerical identification is chosen only for convenience and does
not imply ranking of responses
• Ordinal data indicate the rank of ordering
• e.g., product quality rating (1: poor; 2: average; 3: good): 1 < 2 < 3
• but the difference in numbers is meaningless.
Variable Classification 2
Based on the levels of measurement
Quantitative data include interval data and ratio data.
• Interval data indicate rank and distance from an arbitrarily determined
benchmark or zero
• e.g., Celsius and Fahrenheit degrees of temperature
• where the difference makes sense but ratio is meaningless
• Ratio data indicate both rank and distance from a natural zero
• e.g., age and weight
• where the ratios of two measures have meaning
Examples
• “Eye color 4 is twice as good as eye color 2.” – true or false? Eye color is __________ data.
• “Weight 100 kg is twice as heavy as weight 50 kg.” --- true or false? Weight is __________ data.
Variable
Eye
color
Value
New Numerical
Value
Variable
Value
Black
Brown
Gray
Green
Hazel
Others
Black=1
Brown=2
Gray=3
Green=4
Hazel=5
Others=6
Weight
40
45
50
55
60
…
Examples
• “Eye color 4 is twice as good as eye color 2.” – true or false? Eye color is qualitative (nominal) data.
• “Weight 100 kg is twice as heavy as weight 50 kg.” --- true or false? Weight is quantitative (ratio) data.
Variable
Eye
color
Value
New Numerical
Value
Variable
Value
Black
Brown
Gray
Green
Hazel
Others
Black=1
Brown=2
Gray=3
Green=4
Hazel=5
Others=6
Weight
40
45
50
55
60
…
How Do the Two Ways Compare?
Can be categorized?
Can be ranked?
Evenly space?
Has a natural zero?
Qualitative data
Quantitative data
Nominal
data
Interval
data
Ordinal
data
Ratio
data
How Do The Two Ways Compare?
Qualitative data
Quantitative data
Nominal
data
Ordinal
data
Interval
data
Ratio
data
Can be categorized?
YES
YES
YES
YES
Can be ranked?
NO
YES
YES
YES
NO
YES
YES
NO
YES
Evenly space?
Has a natural zero?
Summary of Variable Classification 1
Based on the type and amount of information
Summary of Variable Classification 2
Based on the levels of measurement
From nominal, to ordinal, to interval, and to ratio, more and more information is contained in the data.
A Note on Temperature Scales
Interval data hold no true zero and can represent values below zero
• Temperatures in Kelvin or Rankine: ratio
• Temperatures in Celsius or Fahrenheit: interval
Practice Question
1. Is the variable “Grade Point Average” discrete or continuous?
2. Suppose all students in our class were asked what pizza topping is
their favorite. These data are at the ___ level of measurement.
3. You want to know the number of students whose favorite pizza
topping is mushroom. These data are at the _____ level of
measurement.
Source: Hawkes Learning
Practice Question
1. Is the variable “Grade Point Average” discrete or continuous?
continuous
2. Suppose all students in our class were asked what pizza topping is
their favorite. These data are at the nominal level of
measurement.
3. You want to know the number of students whose favorite pizza
topping is mushroom. These data are at the ratio level of
measurement.
Source: Hawkes Learning
Practice Question
Determine the following classification for the given data sets:
qualitative or quantitative; discrete, continuous, or neither; and level of
measurement.
1. Finishing times for runners in the 10K race
2. Colors contained in a box of crayons
Source: Hawkes Learning
Practice Question
Determine the following classification for the given data sets:
qualitative or quantitative; discrete, continuous, or neither; and level of
measurement.
1. Finishing times for runners in the 10K race
•
Quantitative, continuous, ratio
2. Colors contained in a box of crayons
•
Qualitative, neither, nominal
Source: Hawkes Learning
Today’s Lecture
What is statistics?
1. Why do we study it?
2. Some key definitions in statistics
3. Classification of Variables
How do we describe data?
1. Graphical
2. Numerical
--- next set of lecture notes “Describing Data II”
Graphical Presentation of Data: an Overview
• Data in raw form are usually not easy to use for decision making
• Some type of organization is needed.
• We focus on two types: graph and table, and the conversion between them
• Graph
• For categorical data
• Bar chart
• Pie chart
• Pareto diagram
• For numerical data
• Histogram
• Ogive
• Scatter plot (two variables)
• Table (for both categorical and numerical data)
• Frequency table for one variable
• Cross-tab for two variables
• The type of graph to use depends on the variable being summarized
One Variable, Categorial Data
Graphs to Describe Categorical Data
Bar Charts
Bar charts draw attention to the frequency itself (level) of each category.
• The height of bars represents frequency
Graphs to Describe Categorical Data
Pie Charts
If the focus is the proportion of frequencies, then pie charts are
appropriate.
Graphs to Describe Categorial Data:
Pareto Diagram
A Pareto diagram is a bar chart that displays the frequency of defect causes.
• It is used to separate the "vital few" from the "trivial many".
• The bars are arranged in
the descending order of
frequencies. The bar at
the left indicates the
most frequent cause and
the bars to the right
indicate causes with
decreasing frequencies.
The Pareto Principle or “80-20 Rule”
The Pareto Principle or “80-20 Rule” states that 80% of outcomes are due to 20% of
causes.
• The first three causes contribute
about 80% of errors.
• Pareto’s result is applied to a wide
variety of behavior over many
systems. It is sometimes referred to
as the 80-20 rule.
•
•
A cereal manufacturer may find that
most of the packaging errors are due to
only a few causes.
The world’s richest 20% has 80% of all
the wealth in the world
Tables to Describe Categorical Variables:
Frequency Table (for One Variable)
• Definition: a frequency
distribution is a table used to
organize data
• Organization: three columns
1. Classes/groups
2. Number of observations
“frequencies”
3. A relative frequency distribution
Classes or
groups,
includes all
possible
responses on a
variable under
study
A list of the
frequencies, or
number of
observations,
for each class.
A relative
frequency
distribution:
frequency/n
x 100%
Converting Frequency Table to Bar Chart
Converting Frequency Table to Pie Chart
Practice Question
A department of mathematical sciences has majors in four areas. If a pie chart is constructed for these data,
what would be the percentage of the graph for each major?
Major
Mathematics
Computer Science
Actuarial Science
Statistics
Number of Majors
50
22
15
10
Practice Question
A department of mathematical sciences has majors in four areas. If a pie chart is constructed for these data,
what would be the percentage of the graph for each major?
Major
Mathematics
Computer Science
Actuarial Science
Statistics
Number of Majors
50
22
15
10
Major
Mathematics
% of Majors
51.5
Answer:
Computer Science
22.7
Actuarial Science
Statistics
15.5
10.3
Two Variables, Categorial Data
Tables to Describe Categorical Variables:
Contingency Table (for Two Variable)
• Recall the Frequency Table for One Variable: three columns
Classes/groups, number of observations, relative frequency distribution
• The Contingency Table for Two Variables: adds another way of
grouping the same data
• In this example: we divide “participants” into “male” vs “female”
Tables to Describe Categorical Data:
Contingency Table (for Two Variables)
Definition: contingency tables, or cross tables, or crosstabs, are used to describe
relationships and sub-categories between two categorical or ordinal variables.
• It lists the frequencies of all combinations of values for the two variables.
Graphs to Describe Categorical Data:
Stacked/Cluster Bar Charts (for Two Variables)
1. A component
bar chart, or
stacked bar
chart
2. A cluster bar
chart, or sideby-side bar chart
are used to picture
the information in
cross tables, and are
extensions of the bar
chart above
Practice Question
A statistics professor has developed the cross table presented below, that compares students' class standing with their
final grades.
(a). Calculate the missing values identified by asterisks.
(b). What patterns do you see in this table based on D and F grades frequencies?
(c). Convert the data to overall percentages. Does this confirm the pattern you found above?
Year
A
B
C
D
F
Total
Freshman
∗
17
28
8
3
69
Sophomore
14
23
17
10
1
∗
Junior
17
19
10
2
1
49
Senior
5
8
4
0
∗
17
Total
∗
67
59
20
5
∗
Practice Question
A statistics professor has developed the cross table presented below, that compares students' class standing with their
final grades.
(a). Calculate the missing values identified by asterisks.
(b). What patterns do you see in this table based on D and F grades frequencies?
(b). Convert the data to overall percentages. Does this confirm the pattern you found above?
Year
Freshman
Sophomore
Junior
Senior
Total
A
13
14
17
5
49
B
17
23
19
8
67
C
28
17
10
4
59
D
8
10
2
0
20
F
3
1
1
0
5
Total
69
65
49
17
200
Year
A
B
C
D
F
Total
6.5%
8.5%
14.0%
4.0%
1.5%
34.5%
Sophomore 7.0%
11.5%
8.5%
5.0%
0.5%
32.5%
Junior
8.5%
9.5%
5.0%
1.0%
0.5%
24.5%
Senior
2.5%
4.0%
2.0%
0.0%
0.0%
8.5%
Total
24.5%
33.5%
29.5%
10%
2.5%
100%
Freshman
(b). It appears that the earlier a student is in his or her college
career, the worse they will do in class.
(c). The percentages of students failing the class for
freshmen, sophomores, juniors, and seniors are 1.5%, 0.5%,
0.5% and 0.0%, respectively. Yes it confirms the pattern that
the earlier a student is in his or her college career, the worse
they will do in class.
Graphical Presentation of Data
Overview Revisited
• We focus on two types: graph and table, and the conversion between
them
• Graph
• For categorical data
• Bar chart
• Pie chart
• Pareto diagram
• For numerical data
• Histogram
• Ogive
• Scatter plot (two variables)
• Table (for both categorical and numerical data)
• Frequency table for one variable
• Cross-tab for two variables
One Variable, Numerical Data
Tables to Describe Numerical Data:
Frequency Distribution
Similar to a frequency distribution for categorical data, a frequency
distribution for numerical data is a table that summarized stat by
listing the classes in the left column , the number of observations in
each class in the middle column, and the percentages in the right.
Tables to Describe Numerical Data:
Frequency Distribution
• Different from categorical data: the classes, or intervals, for a frequency
distribution of numerical data are not as easily identifiable.
• We must construct the classes by ourselves.
• Example: The data presented below were collected on the amount of time,
in hours; it takes an employee, to process an order at a local plumbing
wholesaler. How to construct a frequency distribution of the data?
2.8
4.9
0.5
13.2 14.2
8.9
3.7
15.2 11.2 13.4
5.5
10.2
1.1
14.2
4.5
10.9
8.8
7.8
18.2 17.1
Grouping Data into Classes for Frequency Distribution
• Constructing the classes of a frequency distribution for numerical data
requires answers to certain questions:
3.5
3
Frequency
• How many classes should be used?
• How wide should each class be?
2.5
2
1.5
1
0.5
– may yield a very jagged distribution with gaps from empty classes
– Can give a poor indication of how frequency varies across classes
• Wide class intervals => too few classes
– may compress variation too much and yield a blocky distribution
– can obscure important patterns of variation.
Temperature
60
More
56
52
48
44
40
36
32
28
24
20
16
8
12
4
• Narrow class intervals => too many classes
0
Three Rules for Grouping Data into Intervals (Classes)
Three rules for preparing frequency distributions that make it easier to answer these types of
questions, to summarize data, and to communicate results.
Rule 1: Determine the number of classes, k
Rule 2: Each class grouping has the same width, w, which is determine by
!"#$%&' ()*+%# ! &*"!!%&' ()*+%#
! = ,('%#-"! .,/'0 =
()*+%# 12 /%&,#%/ ,('%#-"!&
•
w should always be rounded upward to include all observations in the frequency
distribution table
Rule 3: Classes must be inclusive and nonoverlapping
• Each observation must belong to one and only one class
• Make sure the boundary values are clearly classified
Rule of Thumb in Determining k
Use intuition in practice to guarantee that each class includes "not
too few" or "not too many" observations
Practice Question (from 4 slides ago)
• The data presented below were collected on the amount of time, in
hours; it takes an employee, to process an order at a local plumbing
wholesaler. How to construct a frequency distribution of the data?
2.8
4.9
0.5
13.2 14.2
8.9
3.7
15.2 11.2 13.4
5.5
10.2
1.1
14.2
4.5
10.9
8.8
7.8
(hint: let’s use 6 classes)
18.2 17.1
Practice Question (from 4 slides ago)
• The data presented below were collected on the amount of time, in
hours; it takes an employee, to process an order at a local plumbing
wholesaler. How to construct a frequency distribution of the data?
2.8
4.9
0.5
13.2 14.2
8.9
3.7
15.2 11.2 13.4
5.5
10.2
1.1
14.2
4.5
10.9
8.8
7.8
18.2 17.1
(hint: let’s use 6 classes)
Answer:
!".$%&.'
(
= 2.95 ≈ 3.
Time(in hours)
Frequency
>= 0.5 and < 3.5
3
>= 3.5 and < 6.5
4
>= 6.5 and < 9.5
3
>= 9.5 and < 12.5
3
>= 12.5 and < 15.5
5
>= 15.5 and < 18.5
2
Tables to Describe Numerical Data:
(Relative) Cumulative Frequency Distribution
• A cumulative frequency distribution contains the total number of
observations whose values are less than the upper limit for each
class
• constructed by adding the frequencies of all classes up to and including the
present class.
• A relative cumulative frequency distribution:
• A cumulative frequency distribution sometimes is more useful in
answering certain questions than a frequency distribution table
(see the next example)
Cumulative Frequency Distributions:
An Example
• The supervisor of a large plant obtained the time (in seconds) for a random sample of n = 110 employees
to complete a particular task. The goal is to complete the task in less than 4.5 minutes (270 seconds).
Question:
• What does the table say about completion times?
Cumulative Frequency Distributions:
An Example (cont’d)
Observation: it is very hard to make any statement about completion times with
this table of raw data. Let’s construct a frequency table first.
• Recall: the first step for creating a frequency table for numerical data is to
create the classes, or the intervals, k.
• Let’s use k=8, then what is w?
Cumulative Frequency Distributions:
An Example (cont’d)
Observation: it is very hard to make any statement about completion times with
this table of raw data. Let’s construct a frequency table first.
• Recall: the first step for creating a frequency table for numerical data is to
create the classes, or the intervals, k.
• Let’s use k=8, then what is w?
Answer:
• Here n is 110. The biggest is 299
and the smallest is 222. So
w=(299-222)/8≈10 (always round
up!)
• You could also round up the ends
a bit: use w=(300-220)/8 = 10
(same answer)
Cumulative Frequency Distributions:
An Example (cont’d)
• With k=10, we can construct our Frequency Table, as shown below.
• Recall: the supervisor’s goal is to have all employees complete the task in less than
4.5 minutes (270 seconds). So we have to know: how many employees are meeting
this expectation (less than 270 seconds)?
• Observation: it is better to
answer this question using a
Cumulative Frequency
Distribution.
Cumulative Frequency Distributions:
An Example (cont’d)
• Converting from Frequency
Table to Cumulative Frequency
Table requires simple addition.
• Table 1.8 reveals that 72.7%
employees can achieve the goal.
Practice Question
The data presented below were collected on the amount of time, in hours;
it takes an employee, to process an order at a local plumbing wholesaler.
Construct cumulative frequency and cumulative percent distributions of the
data using the same grouping you did a few slides ago.
2.8
4.9
0.5
13.2 14.2
8.9
3.7
15.2 11.2 13.4
5.5
10.2
1.1
14.2
4.5
10.9
8.8
7.8
18.2 17.1
Practice Question
• The data presented below were collected on the amount of time, in hours;
it takes an employee, to process an order at a local plumbing wholesaler.
Construct cumulative frequency and cumulative percent distributions of
the data using the same grouping you did a few slides ago.
2.8
4.9
0.5
13.2 14.2
8.9
3.7
15.2 11.2 13.4
5.5
10.2
1.1
14.2
4.5
10.9
8.8
7.8
18.2 17.1
Answer:
Time(in hours)
Frequency
>= 0.5 and < 3.5
3
>= 3.5 and < 6.5
4
>= 6.5 and < 9.5
3
>= 9.5 and < 12.5
3
>= 12.5 and < 15.5
5
>= 15.5 and < 18.5
2
Time (in hours)
< 3.5
< 6.5
< 9.5
< 12.5
< 15.5
< 18.5
Cumulative
Frequency
3
7
10
13
18
20
Cumulative %
15%
35%
50%
65%
90%
100%
Graphs to Describe Numerical Data:
Histogram and Ogive
We graph Frequency Table using a Histogram
• A histogram is a counterpart of a bar chart for
numerical variables.
We graph Cumulative Frequency Distribution
using an Ogive
• An ogive, or cumulative line graph, is a line
connecting points that are the cumulative
percent of observations below the upper limit
of each interval in a cumulative frequency
distribution.
Histogram: Shapes of Distributions
• Histogram is a very useful tool. It will keep coming up in later lectures. It tells us a lot about
the underlying distribution.
• A distribution is symmetric if the observations are balanced, or approximately evenly
distributed, about its center.
Skewed right
Symmetric
Skewed left
• A distribution is skewed, or asymmetric, if the observations are not symmetrically
distributed on either side of the center.
• A skewed-right, or positively skewed, distribution has a tail that extends farther to the right (e.g. the income distribution)
• A skewed-left, or negatively skewed, distribution has a tail that extends farther to the left
Graphs to Describe Numerical Data:
(*) Stem-and-Leaf Displays
A stem-and-leaf display is an exploratory data analysis (EDA) graph that is an alternative to the histogram.
• Data are grouped according to their leading digits (called stems), and the final digits (called leaves) are
listed separately for each member of a class.
• The leaves are displayed individually in ascending order after each of the stems.
• The stem-and-leaf display is a quick way to identify possible patterns for a small data set.
Accounting Final-Exam Grades:
88, 51, 63, 85, 79,
65, 79, 70, 73, 77
Two Variables, Numerical Data
Graphs to Describe Numerical Data:
Scatter Plots (for Two Variables)
A scatter plot locates one point for each
observation of two variables. It can
provide a picture of the data, including
1. the range of each variable
2. the pattern of values over the range
3. a suggestion as to a possible
relationship between the two
variables
4. an indication of outliers
•
i.e., data values that are much larger
or smaller than other values
Figure: GPA at College Graduation vs. Entrance SAT Math Scores
What does the scatter plot say about the GPA at College
Graduation vs. SAT Math Scores at College Entrance?
Practice Question
An investment advisor recently reviewed the account activity of a sample of 10 of his clients and calculated the
average number of stock trades per month over the past year for each client. He obtained the following data values:
10.2, 2.5, 11.4, 3.2, 1.1, 3.4, 8.4, 9.7, 11.2, and 2.4.
a)
Construct a frequency distribution of the data.
b)
Construct a relative frequency and percent distributions of the data.
c)
Construct a cumulative frequency distribution of the data.
d)
Construct a cumulative relative frequency and cumulative percent distributions of the data.
(can be in the same table)
Practice Question
• An investment advisor recently reviewed the account activity of a sample of 10 of his clients and calculated the
average number of stock trades per month over the past year for each client. He obtained the following data
values: 10.2, 2.5, 11.4, 3.2, 1.1, 3.4, 8.4, 9.7, 11.2, and 2.4.
a)
Construct a frequency distribution of the data.
b)
Construct a relative frequency and percent distributions of the data.
c)
Construct a cumulative frequency distribution of the data.
d)
Construct a cumulative relative frequency and cumulative percent distributions of the data.
(can be in the same table)
Average # Stock
Relative
Trades
Frequency Frequency
Cumulative Cumulative
Percent Frequency Percent
1 but < 4
5
0.5
50
5
50
4 but < 7
0
0.0
0
5
50
7 but < 10
2
0.2
20
7
70
10 but < 13
3
0.3
30
10
100
Graphical Presentation of Data:
Summary of Techniques
Source: Dr. Ping Yu
Data Presentation Errors
Reading assignment
• Section 1.6 (Textbook) Data Presentation Errors
Goals for effective data presentation:
• Present data to display essential information
• Communicate complex ideas clearly and accurately
• Avoid distortion that might convey the wrong message
Additional Materials for Fun
How to spot a misleading graph - Lea Gaslowitz
•
•
4:09
https://www.google.com/search?q=Lea+Gaslowitz+how+to+spot+a+misleading+graog&oq=Lea+Gaslowitz+how+to+spot+a+misleading+graog&a
qs=chrome..69i57.5608j0j4&sourceid=chrome&ie=UTF-8#kpvalbx=_x-UOY_ecAciF-AbSupmYDQ_20
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )