You are on page 1of 96

MK5144

Digital Marketing
Metrics & Analytics

Michał Folwarczny, PhD


michal.folwarczny@universityofgalway.ie

University
ofGalway.ie
1
The quality of the previous video

University
University
ofGalway.ie
ofGalway.ie
2
Unit 3
1. The assignment Q&A
2. The fundamental statistical
concepts in digital metrics &
analytics
3. Linear regression for digital
metrics & analytics
4. Linear regression in Jamovi

University
University
ofGalway.ie
ofGalway.ie
3
University
ofGalway.ie Today University
ofGalway.ie
4
The assignment #1

University
University
ofGalway.ie
ofGalway.ie
5
Assignment #1 is a group assignment worth 40% of the final
grade.

You will present (10 minutes) on February 9th after the lunch
break.

If you are unable to attend a presentation, discuss other


contributions with the team.

At least 24h before, send me your presentation in .pdf.


University
ofGalway.ie
University
ofGalway.ie
6
Description:

In this group assignment, students are required to work in teams to


analyze a set of digital marketing data. The primary source of data
should be Google Analytics, but teams are encouraged to integrate
other relevant data sources as well (or propose only alternative data
sources). The aim is to provide a comprehensive report on the
effectiveness of a digital marketing campaign, highlighting key
metrics, trends, and insights.
University
University
ofGalway.ie
ofGalway.ie
7
Tasks:
● Form groups of 4-6 students.
● Utilize Google Analytics and any other relevant tools to gather
data.
● Analyze the data focusing on key performance indicators (KPIs)
such as traffic sources, user engagement, conversion rates, and any
other relevant metrics.
● Prepare a presentation that includes your analysis, findings, and
any recommendations for improvement.
● Present your findings in a clear, concise, and engaging manner.
University
University
ofGalway.ie
ofGalway.ie
8
Grading Criteria:
● Data Analysis (25%): Accuracy and depth of data analysis.
● Relevance of Metrics (25%): Selection and justification of
KPIs and metrics used in the analysis.
● Quality of Presentation (25%): Clarity, structure, and
visual effectiveness of the presentation.
● Team Collaboration (25%): Effectiveness of teamwork and
contribution of individual members.
University
University
ofGalway.ie
ofGalway.ie
9
Q&A
1. This is a team presentation, but if some of you feel
uncomfortable talking to public, you can, for instance, just
introduce the team.
2. You have 10 minutes maximum without Q&A. This is
usually 10-12 slides.
3. You can analyze any data, including Flood-It! & Google
Merchandise Store data (see demo GA4 account).
4. You choose the problem -> select digital metrics
addressing this problem -> propose recommendation.
University
University
ofGalway.ie
ofGalway.ie
10
The fundamental statistical
concepts in digital metrics &
analytics

University
University
ofGalway.ie
ofGalway.ie
11
Last week, you have learned about dozens of digital metrics

Is click-through-rate of 8.8% greater than 8.1%?

Does customer loyalty, measured on a scale of 1-7, increase


when it’s average changes from 4.6 to 4.7?

The “A” version of a video has 685,000 impressions, and it’s


“B” alternative has 550,000 impressions. Is “A” better than
“B” in generating impressions?
University
ofGalway.ie
University
ofGalway.ie
12
To answer these questions, we need to resort to
statistical analysis.

But, why do we use statistics in marketing metrics


& analytics in the first place?

University
University
ofGalway.ie
ofGalway.ie
13
Have you
ever flown
with
RyanAir?

University
University
ofGalway.ie
ofGalway.ie
14
150 mln. + passengers in 2023

Over 3,000 flights per day

200+ destinations

500+ aircraft

Passengers from all around the world


University
University
ofGalway.ie
ofGalway.ie
15
Can you administer surveys to
all 150 mln. passengers each
year?

University
University
ofGalway.ie
ofGalway.ie
16
Solution to this problem: Sampling some customers, and
estimating (customers’) parameters (e.g., their satisfaction,
loyalty)

Let’s introduce these key terms

University
University
ofGalway.ie
ofGalway.ie
17
Statistics: collection, analysis, interpretation &
presentation of data

Inferential statistics: Using probability to estimate the


confidence that our conclusions are correct

Again, is 4.7 customer loyalty more than 4.6?

University
University
ofGalway.ie
ofGalway.ie
18
The key marketing analytics terms

Parameter: a number corresponding to a property of the


population

Statistic: a number corresponding to a property of the


sample

University
University
ofGalway.ie
ofGalway.ie
19
When we do not need statistics?
(Very) few customers, little data

University
University
ofGalway.ie
ofGalway.ie
20
How does
RyanAir
perform
sampling?

University
University
ofGalway.ie
ofGalway.ie
21
Sampling methods:

Simple Random Sampling: Members of the population are chosen completely at


random, ensuring each individual has an equal chance of being selected. Ideal for
homogenous populations.

Stratified Sampling: The population is divided into subgroups (strata) with


common characteristics, and random samples are taken from each stratum. This
ensures representation of all key subgroups.

Cluster Sampling: The population is divided into clusters (like areas or schools),
and entire clusters are randomly selected for sampling. It's cost-effective for
large, dispersed populations.
University
University
ofGalway.ie
ofGalway.ie
22
Sampling methods:

Systematic Sampling: Selects individuals at regular intervals from a


list (e.g., every 10th person). It's simple and efficient but can have
hidden biases.

Convenience Sampling: Participants are chosen based on their


availability and ease of access. Quick and easy but often leads to
significant biases.

Snowball Sampling: Current participants recruit future participants


from their acquaintances, useful for reaching specialized or
hard-to-reach groups but not ideal for generalizing findings.
University
University
ofGalway.ie
ofGalway.ie
23
What is being sampled in digital marketing?

University
University
ofGalway.ie
ofGalway.ie
24
Source:
Google
Analytics
(Demo
account,
Merchandise
Store)

University
University
ofGalway.ie
ofGalway.ie
25
Measurement:
data recording

Dependent (outcome)

AND

Independent (predictor)

University
ofGalway.ie
Variables University
ofGalway.ie
26
How variables can be recorded: Levels of measurement*
*this refers to both, dependent and independent variables

● Nominal scale level


● Ordinal scale level
● Interval scale level
● Ratio scale level

University
University
ofGalway.ie
ofGalway.ie
27
Nominal scales

University
University
ofGalway.ie
ofGalway.ie
28
Nominal scales

Nominal scale: Nominal scales classify data into categories


without any inherent order. They are used to identify or name
objects. For example, the color of a car can be categorized as
red, blue, green, or yellow.

*We often record (for data analysis purpose) nominal variables


such as customer gender as a number, e.g., 1 = male, 2 =
female etc.

Other
ofGalway.ie examples?
University
University
ofGalway.ie
29
Ordinal scales

University
University
ofGalway.ie
ofGalway.ie
30
Ordinal scales

Ordinal scale: Ordinal scales classify data into categories


with a natural order. They allow you to rank objects from
lowest to highest. For example, the ratings of a person’s social
class on a scale from 1 = lower class to 5 = upper class are
ordinal.

*Ordinal data, similarly to nominal data, are often recorded as


numbers (see above).

Other
ofGalway.ie examples?
University
University
ofGalway.ie
31
Interval scales

University
University
ofGalway.ie
ofGalway.ie
32
Interval scales

Interval scale: Interval scales classify data into categories


with equal intervals but no true zero. This means that we
cannot make valid ratio comparisons between values. For
example, 20°C is not "twice as hot" as 10°C, because the zero
point in Celsius is not absolute.

Other examples?

University
University
ofGalway.ie
ofGalway.ie
33
Ratio scales

University
University
ofGalway.ie
ofGalway.ie
34
Ratio scales

Ratio scale: Ratio scales classify data into categories with


equal intervals and a true zero. They allow you to compare the
differences between the values and the ratio of the values. For
example, weight in kilograms. Here, 0 kg represents a
complete absence of weight, making it a true zero point. We
can meaningfully say that 10 kg is twice as much as 5 kg.

Other examples?
University
University
ofGalway.ie
ofGalway.ie
35
Let’s practise

University
University
ofGalway.ie
ofGalway.ie
36
Let’s practice

A marketer wants to know, how much an average MSc in


Marketing Practice (let’s call them MP) student spends when
eating out at Friars.

Population ?
Sample ?
Parameter ?
Statistic ?
Variable ?
Data ?
University
ofGalway.ie
University
ofGalway.ie
37
Let’s practice

Population = All MSc students in MP


Sample = E.g., 8 students surveyed on Monday and Wednesday
Parameter (population mean) = EUR spent by MP population
Statistic (sample mean) = EUR spent by MP sample
Variable (interval scale) = € value spent by one student
Data = E.g., € value spent by MP who were surveyed (sample)

University
University
ofGalway.ie
ofGalway.ie
38
Uncertainty and
decision-making
in marketing
(and daily life?)

University
University
ofGalway.ie
ofGalway.ie
39
Karl Pearson, 1857 – 1936

Would you toss a coin


24,000 times?

Source:
University https://en.wikipedia.org/wiki/Ka
rl_Pearson#/media/File:Karl_Pe University
ofGalway.ie
arson,_1912.jpg ofGalway.ie
40
Probability: the likelihood of a given event’s occurrence
(usually expressed from 0 = impossible to 1 = certain)

Karl Pearson tossed a coin 24,000 times resulting in 12,012


heads

Thus, 12,012 / 24,000 = 0.5005, approx 0.5, or 50% chance

University
University
ofGalway.ie
ofGalway.ie
41
A marketer might calculate the probability of customers
responding to an email campaign based on historical data. If
past campaigns had a 20% response rate, the probability of a
customer responding to a future email is 0.20.

Similarly, probability can help in market segmentation,


determining the likelihood of different demographic groups
purchasing a product. For example, if data shows that 60% of
women aged 20-30 bought a certain product, the probability of
aUniversity
woman in this age group making a purchase is 0.60.
ofGalway.ie
University
ofGalway.ie
42
The Bell Curve

The bell curve is simply a visual representation of the


normal distribution. It is often used to illustrate the
distribution of scores or measurements in a population,
showing the relative frequency of different values. The
curve's peak represents the most frequent value (the mean),
and the tails represent less frequent values.
University
University
ofGalway.ie
ofGalway.ie
43
Source:
University
https://en.wikipedia.org/wiki/Normal_distribution#/me University
ofGalway.ie
dia/File:Standard_deviation_diagram_micro.svg ofGalway.ie
44
Central Limit Theorem (CLT)

The central limit theorem (CLT) is a fundamental principle in


probability theory that states that as the sample size
increases, the distribution of sample means tends to
approach a normal distribution, regardless of the shape of
the original population distribution. This means that even if
the population itself is not normally distributed, we can still
use the normal distribution to make inferences about the
population
University
ofGalway.ie based on a large enough sample. University
ofGalway.ie
45
A normal distribution is a probability distribution that is
symmetric around its mean, showing that data near the
mean are more frequent in occurrence than data far from
the mean.

In the context of hypothesis testing, many variables (like test


scores, height, etc.) are assumed to follow a normal
distribution.

University
University
ofGalway.ie
ofGalway.ie
46
Before you dive into regression analysis... (or
Assignment #1)

University
University
ofGalway.ie
ofGalway.ie
47
Formulating hypotheses

1. Ask a question. Start by observing a phenomenon or pattern that you


want to understand better. Then, formulate a specific question that you
want to answer.

2. Review the existing literature. Conduct a thorough search of existing


research to see what is already known about the topic. This will help you
identify any gaps in knowledge and inform your hypotheses.

3. Develop a tentative explanation. Based on your observations and


review of the literature, develop a tentative explanation for the
phenomenon or relationship you are investigating. This explanation
University is
University
ofGalway.ie
your hypothesis. ofGalway.ie
48
Formulating hypotheses

4. Formulate the null hypothesis and alternative hypothesis.

A hypothesis is typically stated in the form of a null hypothesis


(H0) and an alternative hypothesis (H1). The null hypothesis
represents the default assumption, often that there is no
relationship between the variables. The alternative hypothesis
represents the claim that there is a relationship that you
hypothesize.
University
University
ofGalway.ie
ofGalway.ie
49
Formulating hypotheses

5. Define the variables. Clearly define the variables in your hypothesis, including their
operational definitions. This will help you measure and compare the variables in your
study.

Identify the independent and dependent variables. Determine which variable you will
manipulate (independent variable) and which variable you will measure (dependent variable).

6. State the predicted relationship between the variables. In your hypothesis, state your
prediction about the relationship between the independent and dependent variables.

7. Consider alternative explanations. Be aware of other possible explanations for the


phenomenon you are investigating. Try to design your study in a way to rule out these
alternative explanations.
University
University
ofGalway.ie
ofGalway.ie
50
Examples

Hypothesis: Exposure to products endorsed by social media


influencers increases the likelihood of purchase among the
target demographic (ages 18-35) compared to products without
influencer endorsement.

Hypothesis: Personalized advertising campaigns, tailored


based on consumer browsing and purchase history, result in a
higher conversion rate than generic advertising campaigns.
University
University
ofGalway.ie
ofGalway.ie
51
Examples

Hypothesis: Customers enrolled in a loyalty and rewards


program exhibit a higher frequency of purchases compared
to non-enrolled customers.

University
University
ofGalway.ie
ofGalway.ie
52
How to test
whether H1 is
likely to be true?

University
University
ofGalway.ie
ofGalway.ie
53
Source:
University
https://en.wikipedia.org/wiki/Normal_distribution#/me University
ofGalway.ie
dia/File:Standard_deviation_diagram_micro.svg ofGalway.ie
54
Definition of P-Value

● A p-value is a statistical measure that helps scientists and


researchers determine the significance of their results. It
represents the probability of observing results at least as
extreme as the ones in your study, assuming that the null
hypothesis (a hypothesis of no effect or no difference) is
true.

● It’s essentially a tool to gauge whether the evidence you


have is strong enough to reject the null hypothesis.
University
University
ofGalway.ie
ofGalway.ie
55
Interpreting P-Values

● A low p-value (typically ≤ 0.05) indicates that the observed


data are unlikely under the null hypothesis. This
unlikelihood suggests that there may be a true effect or
difference, leading researchers to reject the null
hypothesis.

● Conversely, a high p-value indicates that the observed


data are likely under the null hypothesis, suggesting no
significant effect or difference.
University
University
ofGalway.ie
ofGalway.ie
56
Why 0.05?

● The threshold of 0.05 is a convention that was popularized


by Ronald Fisher in the 1920s. It is not a magic number
but rather a chosen standard for determining statistical
significance.

● A p-value of 0.05 implies a 5% risk of concluding that a


difference exists when there is no actual difference. It is a
balance between being too stringent (and missing real
effects) and too lenient (and claiming false effects).
University
University
ofGalway.ie
ofGalway.ie
57
Misconceptions

● A common misconception is that a p-value can tell you


the probability that the null hypothesis is true or false.
However, it only tells you about the data assuming the null
hypothesis is true.

● Another misconception is that a p-value of 0.05 is the only


standard for significance. Depending on the field and the
nature of the study, different thresholds (like 0.01 or 0.10)
might be more appropriate.
University
University
ofGalway.ie
ofGalway.ie
58
Criticism and Context

● The p-value has been criticized for its potential to be


misleading, especially when used as the sole basis for
decision-making. It should be considered alongside other
factors like the effect size, study design, and prior
evidence.

● In recent years, there's been a push towards using


confidence intervals and effect sizes as more informative
than p-values alone.
University
University
ofGalway.ie
ofGalway.ie
59
Example:
Our recent “wine” study

University
University
ofGalway.ie
ofGalway.ie
60
Interpretation:

Compared to
AI-generated ‘vintage’
and ‘natural’ labels,
customers are willing
to pay (WTP) less for
‘unlabeled’ wine

[1.85$ less]
University [but that’s a complexUniversity
model,
ofGalway.ie
so it’s not that easy :)]
ofGalway.ie
61
Additional videos on hypothesis testing:
Intro to Hypothesis Testing in Statistics - Hypothesis Testing Statistics Problems & Examples
What Is A P-Value? - Clearly Explained
Hypothesis Testing Problems - Z Test & T Statistics - One & Two Tailed Tests 2

The Most Simple Introduction to Hypothesis Testing! - Statistics Help


Hypothesis Testing - Z test & T test
Hypothesis Testing and The Null Hypothesis, Clearly Explained!!!
Simple hypothesis testing | Probability and Statistics | Khan Academy
Hypothesis Testing - Introduction
Hypotheses & Hypothesis tests
Introduction to Hypothesis Testing (Statistics)

Also see MathIsFun.com resources:


Hypothesis Definition (Illustrated Mathematics Dictionary)
Probability
University
Normal Distribution
ofGalway.ie
University
ofGalway.ie
62
Linear regression for digital
metrics & analytics

University
University
ofGalway.ie
ofGalway.ie
63
Regression analysis is a way of estimating the relationship
between an independent (X, predictor, explanatory variable)
and a dependent (Y, outcome) variable.

Formula:
Y = mx + b
Y = dependent variable value
x = predictor variable value
m = slope (how steep the line is)
b = the Y Intercept (the point where Y axis is crossed by the line)
University
University
ofGalway.ie
ofGalway.ie
64
Source:
https://www.mathsisfu
n.com/data/least-squar
es-regression.html

University
University
ofGalway.ie
ofGalway.ie
65
In Ordinary Least
Squares (OLS)
regression, an
"error" refers to the
difference between
the observed values
of the dependent
variable and the
values predicted by
Source:
the regression https://www.mathsisfu
model. n.com/data/least-squar
es-regression.html

University
University
ofGalway.ie
ofGalway.ie
66
Example

X (Time spent on a website in sec.) Y (Average basket size in €)


15 2
33 5
65 9
99 12
126 16
158 21
University
ofGalway.ie
201 27 University
ofGalway.ie
67
University
University
ofGalway.ie
ofGalway.ie
68
Interpretation: One unit of change in x (Time spent on a website in sec.) results in
0.13 units increase (the sign is positive) in Y (Average basket size in €).

This means that a customer A who spending 50 seconds will spend 50 * 0.13 +
(intercept at 0.07 EUR) = €6.57.
University
University
Customer
ofGalway.ie B spending 180 second will spend 180 * 0.13 + (intercept) = €23.47.ofGalway.ie
69
What OLS regression does not always tell us in the context of
digital metrics & analytics:

● Causality
● Data quality (biases, Mon. vs Fri. shopping patterns)
● Assumption of linear relationship
● Extrapolation (do you know anybody who is 4m tall?)
● Problems with multiple predictors (multicollinearity)
University
University
ofGalway.ie
ofGalway.ie
70
Linear regression in Jamovi

University
University
ofGalway.ie
ofGalway.ie
71
Why not Excel/SPSS?
Reproducibility (crisis): Excel spreadsheets can be difficult to
share and replicate, making it challenging to ensure data
integrity and reproducibility of results. R and Jamovi provide
comprehensive documentation and support reproducibility
through clear code syntax and well-defined functions.

Limited Data Handling Capacity: Excel struggles with large


datasets, often becoming slow or unresponsive. R and Jamovi
are built to handle big data efficiently.
University
University
ofGalway.ie
ofGalway.ie
72
Why not Excel/SPSS?
Data Visualization: Whereas Excel provides basic charts and
graphs, it lacks the flexibility for advanced visualizations.
R and Jamovi excel in creating sophisticated and customizable
data visualizations.

Open-Source and Community Support: Excel is a proprietary


software with limited community-driven development. R and
Jamovi are open-source with strong community support,
offering continuous updates and new packages.
University
University
ofGalway.ie
ofGalway.ie
73
Ease of
learning Jamovi

Excel SPSS

R
University
ofGalway.ie Functionality / University
ofGalway.ie
Versatility
74
What is Jamovi?

University
University
ofGalway.ie
ofGalway.ie
75
● Jamovi is a free and open-source
graphical user interface (GUI) for R.
● It was developed by a team of researchers and
data scientists at the University of Konstanz in Germany.
● Jamovi aims to make R more accessible to users with less
programming experience.
● It provides a point-and-click interface for performing a variety of
statistical analyses, including linear regression, ANOVA, and
correlation (and more with additional libraries).
● Jamovi supports a wide range of R packages and can export results in
various formats, including PDF, Microsoft Word, and LaTeX.University
University
ofGalway.ie
ofGalway.ie
76
University
University
ofGalway.ie
ofGalway.ie
77
Source:
https://www.jamovi
.org/library.html

University
University
ofGalway.ie
ofGalway.ie
78
Linear regression in Jamovi

University
University
ofGalway.ie
ofGalway.ie
79
A sample dataset

University
University
ofGalway.ie
ofGalway.ie
80
What is in
data.csv file?

University
University
ofGalway.ie
ofGalway.ie
81
University
University
ofGalway.ie
ofGalway.ie
82
University
University
ofGalway.ie
ofGalway.ie
83
University
University
ofGalway.ie
ofGalway.ie
84
University
University
ofGalway.ie
ofGalway.ie
85
University
University
ofGalway.ie
ofGalway.ie
86
University
University
ofGalway.ie
ofGalway.ie
87
University
University
ofGalway.ie
ofGalway.ie
88
University
University
ofGalway.ie
ofGalway.ie
89
What data can you analyse this way?

● (Almost) all digital metrics


● (OLS) Linear regression = continuous outcome variable
● There are other types of regression, e.g., logistic
regression for dichotomous outcome variables
(e.g., 1 = purchased; 0 = has not purchased)
● But the logic is the same
University
University
ofGalway.ie
ofGalway.ie
90
Your homework / second
part of the lecture

University
University
ofGalway.ie
ofGalway.ie
91
1. Explore data.csv in Jamovi (https://www.jamovi.org/download.html)
2. Read Jamovi user guide (https://www.jamovi.org/user-manual.html)
3. Watch Simple Linear Regression in Jamovi (18 min.):
https://www.youtube.com/watch?v=RIJDJ49WEgw
4. Watch How to Use the Customer Satisfaction Score (CSAT) Metric (4 min.):
https://www.youtube.com/watch?v=8ANkDCHkjew
5. Watch Marketing Analytics: Predicting Customer Behavior Using Regression
(22 min.): https://www.youtube.com/watch?v=RBTqmEOCM_s
6. Keep
University working on group Assignment #1 University
ofGalway.ie
ofGalway.ie
92
Additional videos (especially for digital marketing students):

● Machine learning in Digital marketing (19 min.):


https://www.youtube.com/watch?v=i1UU1qP-07Y

● Analysing & Optimising Campaign Performance Explained (6


min.):
https://www.youtube.com/watch?v=2MTqUgIhcbg

● Digital Marketing Metrics & KPI's Explained (16 min.):


https://www.youtube.com/watch?v=mPiWWnJsVGw
University
University
ofGalway.ie
ofGalway.ie
93
University
University
ofGalway.ie
ofGalway.ie
Next week 94
Thank you

Questions/suggestions?

University
ofGalway.ie
95
96

You might also like