Behavioral Data Analysis with R and Python: Customer-Driven Data for Real Business Results
- Length: 360 pages
- Edition: 1
- Language: English
- Publisher: O'Reilly Media
- Publication Date: 2021-07-13
- ISBN-10: 1492061379
- ISBN-13: 9781492061373
- Sales Rank: #1416886 (See Top 100 Books)
Harness the full power of the behavioral data in your company by learning tools specifically designed for behavioral data analysis. Common data science algorithms and predictive analytics tools treat customer behavioral data, such as clicks on a website or purchases in a supermarket, the same as any other data. Instead, this practical guide introduces powerful methods specifically tailored for behavioral data analysis.
Advanced experimental design helps you get the most out of your A/B tests, while causal diagrams allow you to tease out the causes of behaviors even when you can’t run experiments. Written in an accessible style for data scientists, business analysts, and behavioral scientists, thispractical book provides complete examples and exercises in R and Python to help you gain more insight from your data–immediately.
- Understand the specifics of behavioral data
- Explore the differences between measurement and prediction
- Learn how to clean and prepare behavioral data
- Design and analyze experiments to drive optimal business decisions
- Use behavioral data to understand and measure cause and effect
- Segment customers in a transparent and insightful way
Table of contents
I. Understanding Behaviors
1. The Causal-Behavioral Framework for Data Analysis
2. Understanding Behavioral Data
II. Causal Diagrams and Deconfounding
3. Introduction to Causal Diagrams
4. Building Causal Diagrams from Scratch
5. Using Causal Diagrams to Deconfound Data Analyses
III. Robust Data Analysis
6. Handling Missing Data
7. Measuring Uncertainty with the Bootstrap
IV. Designing and Analyzing Experiments
8. Experimental Design: The Basics
9. Stratified Randomization
10. Cluster Randomization and Hierarchical Modeling
V. Advanced Tools in Behavioral Data Analysis
11. Introduction to Moderation
12. Mediation and Instrumental Variables
Preface Who This Book Is For Who This Book Is Not For R and Python Code Code Environments Code Conventions Functional-Style Programming 101 Using Code Examples Navigating This Book Conventions Used in This Book O’Reilly Online Learning How to Contact Us Acknowledgments I. Understanding Behaviors 1. The Causal-Behavioral Framework for Data Analysis Why We Need Causal Analytics to Explain Human Behavior The Different Types of Analytics Human Beings Are Complicated Confound It! The Hidden Dangers of Letting Regression Sort It Out Data Why Correlation Is Not Causation: A Confounder in Action Too Many Variables Can Spoil the Broth Conclusion 2. Understanding Behavioral Data A Basic Model of Human Behavior Personal Characteristics Collecting data and ethical considerations Cognition and Emotions Collecting data and ethical considerations Intentions Collecting data and ethical considerations Actions Collecting data and ethical considerations Business Behaviors Collecting data How to Connect Behaviors and Data Develop a Behavioral Integrity Mindset Distrust and Verify Identify the Category Refine Behavioral Variables Understand the Context Conclusion II. Causal Diagrams and Deconfounding 3. Introduction to Causal Diagrams Causal Diagrams and the Causal-Behavioral Framework Causal Diagrams Represent Behaviors Causal Diagrams Represent Data Fundamental Structures of Causal Diagrams Chains Collapsing chains Expanding chains Forks Colliders Common Transformations of Causal Diagrams Slicing/Disaggregating Variables Aggregating Variables What About Cycles? Understanding cycles: Substitution effects and feedback loops Managing cycles Paths Conclusion 4. Building Causal Diagrams from Scratch Business Problem and Data Setup Data and Packages Understanding the Relationship of Interest Identify Candidate Variables to Include Actions Intentions Cognition and Emotions Personal Characteristics Traits Demographic variables Business Behaviors Time Trends Validate Observable Variables to Include Based on Data Relationships Between Numeric Variables Relationships Between Categorical Variables Relationships Between Numeric and Categorical Variables Expand Causal Diagram Iteratively Identify Proxies for Unobserved Variables Identify Further Causes Iterate Simplify Causal Diagram Conclusion 5. Using Causal Diagrams to Deconfound Data Analyses Business Problem: Ice Cream and Bottled Water Sales The Disjunctive Cause Criterion Definition First Block Second Block The Backdoor Criterion Definitions First Block Second Block Conclusion III. Robust Data Analysis 6. Handling Missing Data Data and Packages Visualizing Missing Data Amount of Missing Data Correlation of Missingness Diagnosing Missing Data Causes of Missingness: Rubin’s Classification Diagnosing MCAR Variables Diagnosing MAR Variables Diagnosing MNAR Variables Missingness as a Spectrum Handling Missing Data Introduction to Multiple Imputation (MI) Default Imputation Method: Predictive Mean Matching From PMM to Normal Imputation (R Only) Adding Auxiliary Variables Scaling Up the Number of Imputed Data Sets Conclusion 7. Measuring Uncertainty with the Bootstrap Intro to the Bootstrap: “Polling” Oneself Up Packages The Business Problem: Small Data with an Outlier Bootstrap Confidence Interval for the Sample Mean Bootstrap Confidence Intervals for Ad Hoc Statistics The Bootstrap for Regression Analysis When to Use the Bootstrap Conditions for the Traditional Central Estimate to Be Sufficient Conditions for the Traditional CI to Be Sufficient Determining the Number of Bootstrap Samples Optimizing the Bootstrap in R and Python R: The boot Package Python Optimization Conclusion IV. Designing and Analyzing Experiments 8. Experimental Design: The Basics Planning the Experiment: Theory of Change Business Goal and Target Metric Business goal Target metric Pitfalls of poor target metrics Intervention Behavioral Logic Data and Packages Determining Random Assignment and Sample Size/Power Random Assignment Code implementation Pitfalls of random assignment Random assignment timing Random assignment level Sample Size and Power Analysis A little bit of statistics theory without math Traditional power analysis Power analysis without statistics: Bootstrap simulations Connecting simulations and statistical theory Writing our analysis code Power simulation Analyzing and Interpreting Experimental Results Conclusion 9. Stratified Randomization Planning the Experiment Business Goal and Target Metric Definition of the Intervention Behavioral Logic Data and Packages Determining Random Assignment and Sample Size/Power Random Assignment Random assignment level Standard randomization Stratified randomization Power Analysis with Bootstrap Simulations Single simulation Simulations at scale Understanding the power/significance trade-off Analyzing and Interpreting Experimental Results Intention-to-Treat Estimate for Encouragement Intervention Complier Average Causal Estimate for Mandatory Intervention Conclusion 10. Cluster Randomization and Hierarchical Modeling Planning the Experiment Business Goal and Target Metric Definition of the Intervention Behavioral Logic Data and Packages Introduction to Hierarchical Modeling R Code Python Code Determining Random Assignment and Sample Size/Power Random Assignment Power Analysis Using permutations when randomness is “limited” Code for permutations Power curve Analyzing the Experiment Conclusion V. Advanced Tools in Behavioral Data Analysis 11. Introduction to Moderation Data and Packages Behavioral Varieties of Moderation Segmentation Segmenting observational data Segmenting experimental data Interactions Nonlinearities How to Apply Moderation When to Look for Moderation? Including moderation in the experimental design stage Including moderation in the data analysis stage Nonlinearities Multiple Moderators Parallel moderators Interacting moderators Validating Moderation with Bootstrap Interpreting Individual Coefficients Setting meaningful reference points Calculating effects at the level of business decisions Conclusion 12. Mediation and Instrumental Variables Mediation Understanding Causal Mechanisms Causal Biases Identifying Mediation Measuring Mediation Total effect Mediated effect Direct effect When the mediator is a binary variable Instrumental Variables Data Packages Understanding and Applying IVs Step 1: Leftmost relationship Step 2: Total effect Step 3: Relationship of interest Measurement Python code R code Applying IVs: Frequently Asked Questions Conclusion Bibliography Index
Donate to keep this site alive
How to download source code?
1. Go to: https://www.oreilly.com/
2. Search the book title: Behavioral Data Analysis with R and Python: Customer-Driven Data for Real Business Results
, sometime you may not get the results, please search the main title
3. Click the book title in the search results
3. Publisher resources
section, click Download Example Code
.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.