Preface
About the authors
Report an error
0. Introduction
0.1 Touring Lobster Land: The Rides
0.2 Touring Lobster Land: The Gold Zone
0.3 Touring Lobster Land: Places to Eat
0.4 Touring Lobster Land: The Merchandise Store
0.5 What is Marketing?
0.6 The Marketing Mix: From 4Ps to 7Ps
0.7 What is Analytics?
0.8 Analytics Supports the Main Effort
0.9 Python Code Examples
1. Exploring Data
1.1 Introduction: Types of Analytics
1.2 Using Google Colab to Run Python Code
1.3 Lobsterland’s 2021 Data
1.4 Data Types: Numeric and Categorical
1.5 Numeric Data Types: Continuous and Discrete
1.6 Numeric Data: Binning
1.7 Categorical Data Types: Ordered and Unordered
1.8 Assessing Categorical Data
1.9 Categorical Data: Collapsing the Levels
1.10 Original Variables and Derived Variables
1.11 Summary Stats: Establishing a Baseline
1.12 Grouping Data To Take Description to a Deeper Level
1.13 Percentages and Absolutes
1.14 Does Domain Knowledge Matter? YES!
1.15 Summary Stats: Mean, Median, Mode, and Range
1.16 Other Types of Means: Trimmed, Geometric, and Harmonic
1.17 Identifying Outliers
1.18 Summary Stats: Concentration and Dispersion
1.19 Relationships Between Variables: Covariance and Correlation
1.20 Another Type of Correlation: Spearman
1.21 Missing Values: Overview
1.22 Removing Missing Values: The Sledgehammer and the Scalpel
1.23 Imputing Missing Values
1.24 Impossible Values & Inconsistent Values
1.25 Filtering, Sorting, Renaming, and Removing
1.26 Models: What They Are & Why They Matter
1.27 Demystifying the term “Machine Learning”
1.28 Supervised Learning vs. Unsupervised Learning
1.29 Metrics: What They Are & Why They Matter
1.30 Choose and Monitor Your KPIs Wisely!
1.31 A KPI Disaster Story: Wells Fargo
1.32 Frameworks for Analysis
2. Visualizing Data
2.1 Why Visualize Data?
2.2 Exploratory Plots vs. Expository Plots
2.3 What is Matplotlib? And What is Seaborn?
2.4 The Basic Plot Types
2.5 Scatter Plots
2.6 Line Plots
2.7 Bar Plots
2.8 Getting Fancier with Bar Plots: Adding Another Variable
2.9 Histograms
2.10 Box Plots
2.11 Color Adjustments
2.12 Hexadecimal Values: Where Do They Come From, and What Do They Mean?
2.13 Palettes in Seaborn
2.14 Plot Size Adjustments
2.15 Titles, Labels, and Tick Marks
2.16 Additional Seaborn Plot Types
2.17 Style Adjustments
2.18 Other Plotting Libraries
2.19 Visualization Best Practices
3. Consumer Segmentation
3.1 Common Methods of Segmentation: Behavioral, Demographic, Psychographic
3.2 Euclidean Distance
3.3 Overview: k-means Clustering
3.4 How Many Clusters?
3.5 Variable Selection
3.6 What About Categorical Variables?
3.7 Scaling the Variables
3.8 Implementing k-means in Python with scikit-learn
3.9 Okay, So Once Again, How Many Clusters?
3.10 Describing and Labeling Clusters
3.11 Visualizing Clusters
3.12 Another Approach: Hierarchical Clustering
3.13 Hierarchical Clustering with Variable Reweighting
3.14 K-Means vs. Hierarchical Clustering
3.15 Targeting
3.16 Positioning
3.17 Mass Marketing
4. Product Portfolio, Survey Data & Metric-Based Conjoint Modeling
4.1 The Product Portfolio
4.2 Gathering Marketing Data
4.3 Survey Sampling Methods
4.4 Probability sampling methods: Simple Random Sampling
4.5 Probability sampling methods: Sampling with and without Replacement
4.6 Probability sampling methods: Stratified Random Sample
4.7 Non-probability sampling methods: Convenience sampling
4.8 Non-probability sampling methods: Snowball sampling
4.9 The Major Types of Survey Errors
4.10 Survey Biases
4.11 Survey ‘hall of shame’
4.12 How big should my survey sample be?
4.13 Conjoint Analysis: An Overview
4.14 Building the Ferris Bueller
4.15 Metrics-Based Conjoint Modeling: Analyzing the Coefficients
4.16 Net Promoter Score
5. Customer Lifetime Value, Brand Metrics, and Email Campaign Metrics
5.1 Brand Awareness: Depth and Breadth
5.2 The customer journey
5.3 The key stages of the B2C customer journey map
5.4 Measuring performance
5.5 Key differences between the B2B & B2C customer journey
6. Experiment Design, A/B Testing, and Statistical Distributions
6.1 Observational vs. Experimental Data
6.2 Treatment and Control Groups
6.3 Subjects and Groups: The Importance of Randomness
6.4 Internal Validity
6.5 External Validity
6.6 Assessing the Results: Statistical Tests
6.7 Starting with a Null Hypothesis
6.8 The Alpha Threshold
6.9 Rejecting, or Failing to Reject the Null
6.10 Type I and Type II Errors
6.11 Chi-Square Goodness of Fit
6.12 Independent Sample t-Test
6.13 A/B Testing
6.14 A/B/N Testing
6.15 A/B Testing Pitfalls
6.16 Statistical significance and practical significance aka effect size
6.17 Calculating Cohen’s d
6.18 Sample size
7. Understanding Classification Models and Assessing their Performance
7.1 Building a Confusion Matrix
7.2 Accuracy and Error
7.3 Positive and Negative Outcome Classes
7.4 More Model Metrics: Sensitivity, Specificity, Precision, Balanced Accuracy, and F1 Score
7.5 Visualizing model performance: cumulative gains chart, AUC, and ROC
8. Logistic Regression
8.1 Background
8.2 The differences between logistic and linear regression
8.3 Why do we use logistic regression instead of linear regression?
8.4 How does logistic regression work?
8.5 Bringing it all together: implementing logistic regression in Python
8.6 Assessing the model’s performance
8.7 Concentrating our marketing efforts
8.8 A word of caution regarding extrapolation
9. From Single Trees to Random Forests
9.1 Building and Assessing a Single Tree Model
9.2 What is a Random Forest?
9.3 Parameters and Hyperparameters
9.4 Using GridSearch to Determine Optimal Hyperparameters
9.5 Feature Importance
9.6 Assessing a Random Forest Model
9.7 Ensemble Modeling and the Wisdom of Crowds
9.8 Random Forests vs. Logistic Regression Models
10. Pricing Analytics
10.1 Strategies for Setting Prices
10.2 Price Discrimination
10.3 Versioning
10.4 Bundling
10.5 Summary of Pricing Strategies
10.6 Dynamic vs. Static Pricing
10.7 So What Should be Optimized: Revenue or Profit?
10.8 Building and Viewing a Demand Curve in Python
10.9 Price Elasticity of Demand
10.10 The Revenue-Maximizing Price
10.11 Pricing: Iterate, Experiment, and Explore
11. Forecasting
11.1
Limitations of Forecasting
11.2 Time Series Data Overview
11.3 Time Series Components: Trend, Seasonality, and Error
11.4
Working with Dates and Times in Python
11.5 Converting a “Regular” pandas Dataframe into a Time Series
11.6 The ISO Standard for Dates
11.7 Shifting a Time Series
11.8
Resampling a Time Series
11.9 Simple Forecasting Method #1: Naive Method
11.10 Simple Forecasting Method #2: Mean Method
11.11 Simple Forecasting Method #3: Trend Method
11.12 Exponential Smoothing Methods
11.13 ARIMA Methods for Forecasting
12. Extracting Data from the Web
12.1 Scraping with Beautiful Soup
12.2 Google Trends: Overview
12.3 How Marketers can use Google Trends
13. Text Analysis
13.1 What is text analysis?
13.2 How is text analysis done?
13.3 In summary
14. Recommender Systems
14.1 Ride Popularity at Lobster Land
14.2 Cosine Similarity
14.3 Collaborative Filtering
14.4 Content-Based Filtering
14.5 Collaborative vs. Content-Based Filtering: A Summary
15. Data Analytics in the Cloud
15.1 Cloud Computing Business Models
15.2 Cloud Computing and Security
15.3 Analytics Solutions in the Cloud
16. Advanced Modeling Techniques – Interaction terms
16.1 Variable Transformations
16.2 Polynomial Regression
17. Entering the Field of Marketing Analytics
17.1 Your Skill Set: Hard Skills & Soft Skills
17.2 Your Resume
17.3 Your Project Portfolio
17.4 “Take this Dataset and…Do Something!”
17.5 Behavioral Event Interviews
17.6 Research the Company
17.7 The Most Direct Networking
17.8 Using LinkedIn Wisely
17.9 Job Scams
17.10 Presenting Analytics Results
18. Conclusions
18.1 Slow is Smooth, and Smooth is Fast: So Take it Slow!
18.2 No One is Above the Basics
18.3 All-Source Fusion
18.4 Don’t be a Donkey!
18.5 Syntax is Temporary, Concepts are Forever
18.6 Being More Quantitative
18.7 Always be a Data Skeptic — But not a Data Cynic
18.8 Go Beyond the Dashboard
18.9 Garbage In, Garbage Out
18.10 And Now, a Message from Our Proprietors
19. Datasets
20. Dataset descriptions
21. Videos
Select Page
Preface
About the authors
Report an error
0. Introduction
0.1 Touring Lobster Land: The Rides
0.2 Touring Lobster Land: The Gold Zone
0.3 Touring Lobster Land: Places to Eat
0.4 Touring Lobster Land: The Merchandise Store
0.5 What is Marketing?
0.6 The Marketing Mix: From 4Ps to 7Ps
0.7 What is Analytics?
0.8 Analytics Supports the Main Effort
0.9 Python Code Examples
1. Exploring Data
1.1 Introduction: Types of Analytics
1.2 Using Google Colab to Run Python Code
1.3 Lobsterland’s 2021 Data
1.4 Data Types: Numeric and Categorical
1.5 Numeric Data Types: Continuous and Discrete
1.6 Numeric Data: Binning
1.7 Categorical Data Types: Ordered and Unordered
1.8 Assessing Categorical Data
1.9 Categorical Data: Collapsing the Levels
1.10 Original Variables and Derived Variables
1.11 Summary Stats: Establishing a Baseline
1.12 Grouping Data To Take Description to a Deeper Level
1.13 Percentages and Absolutes
1.14 Does Domain Knowledge Matter? YES!
1.15 Summary Stats: Mean, Median, Mode, and Range
1.16 Other Types of Means: Trimmed, Geometric, and Harmonic
1.17 Identifying Outliers
1.18 Summary Stats: Concentration and Dispersion
1.19 Relationships Between Variables: Covariance and Correlation
1.20 Another Type of Correlation: Spearman
1.21 Missing Values: Overview
1.22 Removing Missing Values: The Sledgehammer and the Scalpel
1.23 Imputing Missing Values
1.24 Impossible Values & Inconsistent Values
1.25 Filtering, Sorting, Renaming, and Removing
1.26 Models: What They Are & Why They Matter
1.27 Demystifying the term “Machine Learning”
1.28 Supervised Learning vs. Unsupervised Learning
1.29 Metrics: What They Are & Why They Matter
1.30 Choose and Monitor Your KPIs Wisely!
1.31 A KPI Disaster Story: Wells Fargo
1.32 Frameworks for Analysis
2. Visualizing Data
2.1 Why Visualize Data?
2.2 Exploratory Plots vs. Expository Plots
2.3 What is Matplotlib? And What is Seaborn?
2.4 The Basic Plot Types
2.5 Scatter Plots
2.6 Line Plots
2.7 Bar Plots
2.8 Getting Fancier with Bar Plots: Adding Another Variable
2.9 Histograms
2.10 Box Plots
2.11 Color Adjustments
2.12 Hexadecimal Values: Where Do They Come From, and What Do They Mean?
2.13 Palettes in Seaborn
2.14 Plot Size Adjustments
2.15 Titles, Labels, and Tick Marks
2.16 Additional Seaborn Plot Types
2.17 Style Adjustments
2.18 Other Plotting Libraries
2.19 Visualization Best Practices
3. Consumer Segmentation
3.1 Common Methods of Segmentation: Behavioral, Demographic, Psychographic
3.2 Euclidean Distance
3.3 Overview: k-means Clustering
3.4 How Many Clusters?
3.5 Variable Selection
3.6 What About Categorical Variables?
3.7 Scaling the Variables
3.8 Implementing k-means in Python with scikit-learn
3.9 Okay, So Once Again, How Many Clusters?
3.10 Describing and Labeling Clusters
3.11 Visualizing Clusters
3.12 Another Approach: Hierarchical Clustering
3.13 Hierarchical Clustering with Variable Reweighting
3.14 K-Means vs. Hierarchical Clustering
3.15 Targeting
3.16 Positioning
3.17 Mass Marketing
4. Product Portfolio, Survey Data & Metric-Based Conjoint Modeling
4.1 The Product Portfolio
4.2 Gathering Marketing Data
4.3 Survey Sampling Methods
4.4 Probability sampling methods: Simple Random Sampling
4.5 Probability sampling methods: Sampling with and without Replacement
4.6 Probability sampling methods: Stratified Random Sample
4.7 Non-probability sampling methods: Convenience sampling
4.8 Non-probability sampling methods: Snowball sampling
4.9 The Major Types of Survey Errors
4.10 Survey Biases
4.11 Survey ‘hall of shame’
4.12 How big should my survey sample be?
4.13 Conjoint Analysis: An Overview
4.14 Building the Ferris Bueller
4.15 Metrics-Based Conjoint Modeling: Analyzing the Coefficients
4.16 Net Promoter Score
5. Customer Lifetime Value, Brand Metrics, and Email Campaign Metrics
5.1 Brand Awareness: Depth and Breadth
5.2 The customer journey
5.3 The key stages of the B2C customer journey map
5.4 Measuring performance
5.5 Key differences between the B2B & B2C customer journey
6. Experiment Design, A/B Testing, and Statistical Distributions
6.1 Observational vs. Experimental Data
6.2 Treatment and Control Groups
6.3 Subjects and Groups: The Importance of Randomness
6.4 Internal Validity
6.5 External Validity
6.6 Assessing the Results: Statistical Tests
6.7 Starting with a Null Hypothesis
6.8 The Alpha Threshold
6.9 Rejecting, or Failing to Reject the Null
6.10 Type I and Type II Errors
6.11 Chi-Square Goodness of Fit
6.12 Independent Sample t-Test
6.13 A/B Testing
6.14 A/B/N Testing
6.15 A/B Testing Pitfalls
6.16 Statistical significance and practical significance aka effect size
6.17 Calculating Cohen’s d
6.18 Sample size
7. Understanding Classification Models and Assessing their Performance
7.1 Building a Confusion Matrix
7.2 Accuracy and Error
7.3 Positive and Negative Outcome Classes
7.4 More Model Metrics: Sensitivity, Specificity, Precision, Balanced Accuracy, and F1 Score
7.5 Visualizing model performance: cumulative gains chart, AUC, and ROC
8. Logistic Regression
8.1 Background
8.2 The differences between logistic and linear regression
8.3 Why do we use logistic regression instead of linear regression?
8.4 How does logistic regression work?
8.5 Bringing it all together: implementing logistic regression in Python
8.6 Assessing the model’s performance
8.7 Concentrating our marketing efforts
8.8 A word of caution regarding extrapolation
9. From Single Trees to Random Forests
9.1 Building and Assessing a Single Tree Model
9.2 What is a Random Forest?
9.3 Parameters and Hyperparameters
9.4 Using GridSearch to Determine Optimal Hyperparameters
9.5 Feature Importance
9.6 Assessing a Random Forest Model
9.7 Ensemble Modeling and the Wisdom of Crowds
9.8 Random Forests vs. Logistic Regression Models
10. Pricing Analytics
10.1 Strategies for Setting Prices
10.2 Price Discrimination
10.3 Versioning
10.4 Bundling
10.5 Summary of Pricing Strategies
10.6 Dynamic vs. Static Pricing
10.7 So What Should be Optimized: Revenue or Profit?
10.8 Building and Viewing a Demand Curve in Python
10.9 Price Elasticity of Demand
10.10 The Revenue-Maximizing Price
10.11 Pricing: Iterate, Experiment, and Explore
11. Forecasting
11.1
Limitations of Forecasting
11.2 Time Series Data Overview
11.3 Time Series Components: Trend, Seasonality, and Error
11.4
Working with Dates and Times in Python
11.5 Converting a “Regular” pandas Dataframe into a Time Series
11.6 The ISO Standard for Dates
11.7 Shifting a Time Series
11.8
Resampling a Time Series
11.9 Simple Forecasting Method #1: Naive Method
11.10 Simple Forecasting Method #2: Mean Method
11.11 Simple Forecasting Method #3: Trend Method
11.12 Exponential Smoothing Methods
11.13 ARIMA Methods for Forecasting
12. Extracting Data from the Web
12.1 Scraping with Beautiful Soup
12.2 Google Trends: Overview
12.3 How Marketers can use Google Trends
13. Text Analysis
13.1 What is text analysis?
13.2 How is text analysis done?
13.3 In summary
14. Recommender Systems
14.1 Ride Popularity at Lobster Land
14.2 Cosine Similarity
14.3 Collaborative Filtering
14.4 Content-Based Filtering
14.5 Collaborative vs. Content-Based Filtering: A Summary
15. Data Analytics in the Cloud
15.1 Cloud Computing Business Models
15.2 Cloud Computing and Security
15.3 Analytics Solutions in the Cloud
16. Advanced Modeling Techniques – Interaction terms
16.1 Variable Transformations
16.2 Polynomial Regression
17. Entering the Field of Marketing Analytics
17.1 Your Skill Set: Hard Skills & Soft Skills
17.2 Your Resume
17.3 Your Project Portfolio
17.4 “Take this Dataset and…Do Something!”
17.5 Behavioral Event Interviews
17.6 Research the Company
17.7 The Most Direct Networking
17.8 Using LinkedIn Wisely
17.9 Job Scams
17.10 Presenting Analytics Results
18. Conclusions
18.1 Slow is Smooth, and Smooth is Fast: So Take it Slow!
18.2 No One is Above the Basics
18.3 All-Source Fusion
18.4 Don’t be a Donkey!
18.5 Syntax is Temporary, Concepts are Forever
18.6 Being More Quantitative
18.7 Always be a Data Skeptic — But not a Data Cynic
18.8 Go Beyond the Dashboard
18.9 Garbage In, Garbage Out
18.10 And Now, a Message from Our Proprietors
19. Datasets
20. Dataset descriptions
21. Videos
☰
Follow
Follow
Follow
Report an error
19. Datasets
cold_lemonade_sales
Download
ferris_bueller
Download
lobsterland_2020
Download
lobsterland_2021
Download
market_spend_rev
Download
nyc_historical
Download
parkperceptions
Download
portland_families
Download
ride_ratings
Download
strongman
Download
stuffed_animal_sales_data
Download
super_frappe_sales
Download