M303 Data Editing, Coding, and Descriptive Analysis

FALL 2026 · LECTURE 13
M303
Data Editing, Coding, and Descriptive Analysis
Transform raw responses into analysis-ready evidence.

Where we are

Fundamentals of Data Analysis

Preparation of data for analysis

Descriptive stats, simple and cross-tabs

Hypothesis testing

Correlation and regression analysis

Secondary data

Primary data

Observational and Qualitative Methods

Surveys

Sampling

Sampling schemes

Sample size

Problem

Formulation

Research

Design

Data

Collection

Data Analysis &

Recommendation

Preliminary stages of MR

Problem  actionable management problem  research objectives  research questions  hypotheses

Decide on the type of research

Exploratory, descriptive, and causal

Learning Objectives

You should be able to

Explain what data editing is

Learn how to code open- and closed-ended questions

Learn some useful tips in data coding

Learn the tools used in basic data analysis: descriptive stats, simple and cross tabulations

Learn the Web Tools implementation of each

Previous-class review

01

A confidence interval gives a plausible range for an unknown population parameter.

T
02

Reducing the allowable sampling error generally requires a larger sample.

T
03

Bar charts are useful for comparing frequencies across categories.

T
04

A line chart is usually the clearest choice for showing change over time.

T

What is data editing?

Data editing corresponds to identifying problems in the data such as

Interviewer errors

Omissions

Inconsistencies

Examples:

Omission of some unclear questions by most respondents

Some respondents might choose more than one alternative even though the question specifically asks them to choose only one.

How should we code the data?

How to code a response depends on whether the corresponding question is open or closed-ended:

Coding closed-ended questions involves specifying how to enter responses into the analysis software. We will use the instructor-designed Web Tools; Excel, SPSS, SAS, and R are other possible environments.

Generally, we assign numerical values to the response categories

Open-ended questions are relatively more difficult to code since every respondent might respond differently

A lengthy list of possible responses might be generated

How should open-ended responses be coded? Example 1

You show an email to your respondent first, and then ask the following question:

Please think back to the email you just read and answer the following questions:

What was the email about?

What was the main message?

How to code?

Correct answer?

No answer?

Wrong answer?

Kind of correct answer?

How should open-ended responses be coded? Example 2

How should we code consumers’ written reviews of a bookcase?
First ThoughtEnter 1 when the first classifiable thought is positive/pro, −1 when it is negative/con, and 0 when no thought can be classified either way.
# of Pro ThoughtsCount the positive or pro-oriented thoughts.
# of Con ThoughtsCount the negative or con-oriented thoughts.
# of Other ThoughtsCount all other types of thoughts.
Positive or NegativeClassify the overall write-up: enter 1 for positive/pro and −1 for negative/con.
Relative ValenceRate the write-up from 1 = very negative to 9 = very positive.
ThoughtfulnessRate the writer’s reasoning from 1 = not thoughtful at all to 9 = very thoughtful.
OptimismRate how optimistic the writer appears about the outcome of the consumption decision: 1 = not at all optimistic; 9 = very optimistic.
# of Retailer ThoughtsCount thoughts about the retailer in question (Retailer A).
# of Product ThoughtsCount thoughts about the product (the bookcase).

How should closed-ended responses be coded? Likert scales

I think that Amazon.com provides better prices than BN.com.

Strongly Disagree · Disagree · Neutral · Agree · Strongly Agree

Subject Circled Coded as
#1 Disagree 2
#2 Strongly Agree 5
#3 Strongly Disagree 1

Coding key: Strongly Disagree = 1 · Disagree = 2 · Neutral = 3 · Agree = 4 · Strongly Agree = 5

How should closed-ended responses be coded? Semantic differential scales

Please evaluate Amazon.com on the following dimensions.

Subject #1 marks: Modern 7 · Reliable 5 · Quality 4 · Price 5

Scale positions: 1 · 2 · 3 · 4 · 5 · 6 · 7

Index-variable coding

Subject · Modern · Reliable · Quality · Price

#1 · 7 · 5 · 4 · 5

#2 · 4 · 1 · 6 · 2

Subject #2 marks: Modern 4 · Reliable 1 · Quality 6 · Price 2

Example: coding rank-order responses

Please rank the importance of the following factors when you are choosing a restaurant.

Factor Subject #1 Subject #2 Subject #3
Quality of the food 1 1 2
Atmosphere 2 4 5
Price 4 2 1
Proximity of the location 5 3 3
Reviews 3 5 4
Subject Food Atmosphere Price Location Reviews
#1 1 2 4 5 3
#2 1 4 2 3 5
#3 2 5 1 3 4

How to interpret data from rank order scales?

Calculate the sum of frequency × rank for every option and compare

Ex: Please rank the importance of following factors in your choice of hospitals

Location _________ (1st - 15, 2nd – 20, 3rd – 35)

Reputation _________ (1st - 25, 2nd – 20, 3rd – 25)

Cleanliness _________ (1st - 30, 2nd – 30, 3rd – 10)

Location: (1 x 15) + (2 x 20) + (3 x 35) = 155

Reputation: (1 x 25) + (2 x 20) + (3 x 25) = 140

Cleanliness: (1 x 30) + (2 x 30) + (3 x 10) = 120

How should a check-all-that-apply response be coded?

Which ways do you prefer to get information about course offerings?Check all that apply: 1 Email · 2 Snail mail · 3 Word of mouth · 4 Advisor · 5 Course catalog
Subject Circled Index variables
Email Snail WoM Advisor Catalog
#1 2, 3, 4 0 1 1 1 0
#2 5 0 0 0 0 1
#3 1, 3, 4, 5 1 0 1 1 1

Example: coding a categorical response

Which is your favorite online bookstore? (circle one)

1. Amazon.com (A) · 2. BarnesAndNoble.com (B) · 3. Other (O)

ColumnsChoice · Choice code · Index variables A/B/O · Dummy variables A/B
#1B · 2 · 0/1/0 · 0/1
#2A · 1 · 1/0/0 · 1/0
#3O · 3 · 0/0/1 · 0/0

When should you use each coding scheme?

Choice – if you want to calculate frequencies

ANOVA: Compare the mean of another variable (let’s say satisfaction) for the three groups (A, B, and O).

Index Variables – if you want to use the choice of A versus other choices (i.e., B and O are combined as choices other than A) in a regression.

Dummy Variables – if you want to use the three-fold choice (A, B, and O) in a regression.

When, how, and why should we use dummy coding?

When?

Nominal (categorical) variables with one possible answer (Ex: “check only one of the following”, “dichotomous”)

How?

For M categories, we need to create M − 1 dummy variables

Ex: Gender - Female & Male → one dummy

Ex: Race - White, Black, Hispanic, Asian & Other → four dummies

Why?

The only way to use nominal (categorical) variables in regression analyses

Dummy Coding Example

Race has five levels: Asian, Black, Hispanic, Other, and White. Create M − 1 = 4 dummy variables.

Original categories

Subject Race
John White
William Black
Michele White
Jesus Hispanic
Ali Other
Yanwen Asian
Taylor Black

Dummy-coded variables

Subject Asian Black Hispanic White
John 0 0 0 1
William 0 1 0 0
Michele 0 0 0 1
Jesus 0 0 1 0
Ali 0 0 0 0
Yanwen 1 0 0 0
Taylor 0 1 0 0

Other is the reference category: all four dummy variables equal 0.

What are some useful tips in data coding?

Create variables that are consistent with your study objectives.

Combine variables when necessary.

Example: Average responses to similar questions.

Please indicate how much you like Brand X (1–7).

I think Brand X is a good brand (1–7).

I enjoy what Brand X has to offer me (1–7).

Example: If very few respondents select −2 (very unsatisfied), it may be appropriate to combine −2 and −1 (unsatisfied) into a single −1 category.

Data Coding Exercise

Microsoft’s “I am a PC” ad:

http://www.youtube.com/watch?v=HrmF-mPLybw

Review the survey I distributed, then take 3 minutes to respond.

For the next 3–5 minutes, examine each question individually and write down how you would code your response.

Next, discuss how to code each question in groups of 3–4 for another 3–5 minutes. Agree on a coding approach for each response.

What are the tools used in basic data analysis? Descriptive Statistics

Descriptive statistics: statistics used to summarize the variables of interest

Includes:

Measures of central tendency such as mean, median and mode

Measures of dispersion such as range, standard deviation, and variance

Measures of shape such as skewness and kurtosis

What are the tools used in basic data analysis? Simple Tabulations

The levels of a categorical variable appear in the rows; frequencies, percentages, or descriptive statistics for another variable appear in the columns.
Race Frequency
White 102
Black 89
Hispanic 75
Asian 26
Other 12
Platform Percentage used to check social media
Tablet 39%
Desktop/Laptop 20%
Smartphone 41%
Diamond cut level Average price ($)
Fair 2,125
Good 2,752
Ideal 2,958
Signature Ideal 3,015
Very Good 3,450
Gender Average satisfaction (1–7)
Female 4.8
Male 4.5

Simple tabulation tables — Example: Frequency Distributions

Reports the number of responses that each question received (or number of times each response category is chosen)

Organizes data into groups

Shows number of observations that fall into each group

Can be illustrated simply as a number or as a percentage

Response categories may be combined for many questions

Should result in categories with worthwhile number of responses

Simple tabulation tables — Example: Frequency Distributions

Enrollment plans Number %
Yes, I would enroll 124 11.1
I would probably enroll 211 18.9
I am not sure now 376 33.7
I would probably not enroll 204 18.3
No, I would not enroll 200 17.9
Total 1,115 99.9
Combined categories Number %
Yes, I would enroll 124 11.1
I would probably enroll 211 18.9
Uncertain or uninterested 780 69.9
Total 1,115 99.9
Income Number %
Below $4,000 64 6.0
$4,000–$6,999 122 11.4
$7,000–$9,999 161 15.1
$10,000–$12,999 110 10.3
$13,000–$15,999 160 15.0
$16,000–$20,000 327 30.7
More than $20,000 123 11.5
Total 1,067 100.0
Combined categories Number %
Less than $7,000 186 17.4
$7,000–$15,999 431 40.4
$16,000 and above 450 42.2
Total 1,067 100.0

What are the tools used in basic data analysis? Cross Tabulations

Statistical analysis technique to study the relationships between variables

Sample is divided to learn how the variable of interest (also called the dependent variable) varies across different groups of another variable (also called the independent variable)

Ex: How income level (high versus low) affects the purchase likelihood (purchase versus no purchase) → DV: Purchase, IV: Income

The two variables (row and column, i.e., DV and IV) that are analyzed must be nominally scaled

In-Class Exercise

A diamond is forever

http://www.youtube.com/watch?v=8pU6WQXkiOU

http://www.youtube.com/watch?v=plg7Uw9NeDY

Near Monopoly: De Beers

Market share was 90% in early 1990s

"A Diamond is Forever"

Named the "Best advertising slogan in the twentieth century" by Advertising Age

In-Class Exercise (Continued)

"A Diamond is Forever"

Creates an emotional attachment

Relationship ↔ Diamond

Creates a highly durable good image (forever)

Life-long consumption → Higher willingness to pay

Prevents an effective secondary market (forever)

In-Class Exercise (Continued)

Online market

Blue Nile

Founded in 1999, Seattle

Largest online diamond retailer in the U.S.

4Cs

Carat

Cut

Color

Clarity

http://www.youtube.com/embed/qDNMkeWoYRI

In-class exercise: Web Tools illustration

Open diamondanalysis.xlsx in the instructor-designed Web Tools

9244 unique SKUs

Characteristics for each diamond 4Cs

Daily prices of each diamond

Calculate descriptive stats (such as mean, median, variance etc.) for the price

Create a frequency table for cut (cut levels versus count of diamonds in the corresponding cut level)

Create a simple tabulation of color versus average prices

Create a cross tabulation of color versus cut frequencies

Live analysis

Use the instructor-designed Web Tools to reproduce the descriptive statistics, frequency table, and cross-tabulation.

koraycosguner.github.io/tools.html ↗

Use the instructor-designed Web Tools

WEB
COURSE DATA-ANALYSIS ENVIRONMENT

Open the M303 Web Tools

Use the browser-based tools for descriptive statistics, frequency tables, cross-tabulations, hypothesis testing, regression, and conjoint analysis. Required data files and instructions will be posted on Canvas.

koraycosguner.github.io/tools.html ↗

To sum up

Data editing

Data coding

Open-ended, closed-ended questions

Some tips in data coding

Tools that are used in basic data analysis and their Web Tools implementations

Descriptive stats

Simple tabulations

Cross tabulations

Next class

LOOKING AHEAD
Hypothesis Testing
Practice assignmentsCheck Canvas for the four second-half practice assignments and their current due dates.
Term projectMilestones will be announced as reminders; they are not separate graded project parts.