Unit 3 Quiz - Quantitative Analysis of Consumer Data

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/51

encourage image

There's no tags or description

Looks like no tags are added yet.

52 Terms

1
New cards

Linear regression

so far, we have generally assumed a linear relationship between Y and X

  • this is an assumption of OLS

  • a non-linear relationship between Y and X violates this assumption


2
New cards

Non-linear relationship example

See image

<p>See image</p>
3
New cards

OLS Failure Image

See image

<p>See image</p>
4
New cards

Can we adjust our model to still use linear regression to estimate a non-linear relationship between X and Y?

Yes! (sometimes)

5
New cards

How Much Would You Buy?

  • Extreme example:

    • How much more of X would you buy if Price goes $10 → $5?

      • ???

    • How much more of X would you buy if Price goes $5 → $0?

      • ???

        • ∞

    • How can we get an accurate, actionable estimate of consumers responses to changes in price?


6
New cards

Demand curve

  • Change in Units Sold when Price increases by $1 is not constant

  • A linear regression coefficient assumes it is

  • Weird note: economics classes will flip these axes


<ul><li><p>Change in Units Sold when Price increases by $1 is not constant</p></li><li><p>A linear regression coefficient assumes it is</p></li><li><p>Weird note: economics classes will flip these axes</p></li></ul><p></p>
7
New cards

Demand curve (continued)

  • % change in Units Sold when Price increases by 1% is constant

    • This is a stable empirical finding in economics

  • How can we capture that with regression?


<ul><li><p>% change in Units Sold when Price increases by 1% is constant </p><ul><li><p>This is a stable empirical finding in economics</p></li></ul></li><li><p>How can we capture that with regression?</p></li></ul><p></p>
8
New cards

Elasticities

  • A crucial concept in most pricing strategies is elasticity

  • Elasticity measures the how the percent change in one variable (e.g., price) affects the percent change in another variable (e.g., units sold)


9
New cards

Three common measures of elasticity in marketing/economics/business

1) own-price elasticity of demand

2) cross-price elasticity of demand

3) income elasticity of demand

10
New cards

own-price elasticity of demand

how does demand for a product changes when its price changes?

11
New cards

cross-price elasticity of demand

how does demand for one product change when the price of another product changes?

12
New cards

income elasticity of demand

how does demand for a product change when the customer’s income changes?

13
New cards

own-price elasticity of demand?

  • OPE = %Δ in Units Sold / %Δ in Price

    • Almost always negative (we like lower prices)

  • Inelastic Demand: -1 < OPE < 0

    • → |%Δ in Units Sold| < %Δ in Price

  • Elastic Demand: OPE < -1

    • → |%Δ in Units Sold| > %Δ in Price

  • Examples?


14
New cards

what drives OPE?

  • what overarching aspects of purchase decisions drive whether demand for a good/service is elastic or inelastic?

    • want vs need

    • availability of substitutes

      • also includes brand loyalty, inertia, switching costs, path dependence

    • percent of budget

    • time horizon


15
New cards

own-price elasticity of demand (regular)

Non-linear relationships between Price and Units Sold!

<p>Non-linear relationships between Price and Units Sold!</p>
16
New cards

Variable transformations

  • it is common in real word data to transform variables for a variety of reasons

    • we have already seem examples of this → standardized regression coefficients scale variables in terms of standard deviations

  • one useful reason to transform variables is to create a linear relationship

    • in most markets, the relationship between price and sales is approximately logarithmic


17
New cards

own-price elasticity of demand (ln)

Linear relationship between ln(Price) and ln(Units Sold)!

<p>Linear relationship between ln(Price) and ln(Units Sold)!</p>
18
New cards

Log-Log Regressions

  • When we run a linear regression with ln(Y) as our dependent variable and ln(X) as our independent variable…

    • A 1-unit increase in ln(X) predicts a β-unit change in ln(Y)

      • Is this helpful?

    • A 1% increase in X predicts a β% change in Y

      • This is our definition of elasticity!

        • → We can easily estimate elasticities from data by running “log-log” regressions


19
New cards

Cross-Price Elasticity of Demand

  • CPE = %Δ in Units of X Sold / %Δ in Price of Y

  • Substitutes: CPE > 0

    • → Y is an alternative to X

    • → If the price of Y goes down, I buy less X and more Y

  • Compliments: CPE < 0

    • → Y and X are used together

    • → If the price of Y goes down, I buy more X and more Y

  • Examples?


<ul><li><p>CPE = %Δ in Units of X Sold / %Δ in Price of Y</p></li><li><p>Substitutes: CPE &gt; 0</p><ul><li><p>→ Y is an alternative to X</p></li><li><p>→ If the price of Y goes down, I buy less X and more Y</p></li></ul></li><li><p>Compliments: CPE &lt; 0</p><ul><li><p>→ Y and X are used together</p></li><li><p>→ If the price of Y goes down, I buy more X and more Y </p></li></ul></li><li><p>Examples?</p></li></ul><p></p>
20
New cards

Income Elasticity of Demand

  • IE = %Δ in Units Sold / %Δ in Customer Income

  • Inferior Goods: IE < 0

    • As my income goes up, I buy less

    • Examples?

  • Normal Goods: IE > 0

    • Necessities: 0 < IE < 1

      • |%Δ in Units Sold| < %Δ in Income

        • → As my income goes up, I buy more at a decreasing rate

  • Luxuries: IE > 1

    • |%Δ in Units Sold| > %Δ in Income

      • → As my income goes up, I buy more at an increasing rate


<ul><li><p>IE = %Δ in Units Sold / %Δ in Customer Income</p></li><li><p>Inferior Goods: IE &lt; 0</p><ul><li><p>As my income goes up, I buy less</p></li><li><p>Examples?</p></li></ul></li><li><p>Normal Goods: IE &gt; 0</p><ul><li><p>Necessities: 0 &lt; IE &lt; 1</p><ul><li><p>|%Δ in Units Sold| &lt; %Δ in Income</p><ul><li><p>→ As my income goes up, I buy more at a decreasing rate</p></li></ul></li></ul></li></ul></li><li><p>Luxuries: IE &gt; 1</p><ul><li><p>|%Δ in Units Sold| &gt; %Δ in Income</p><ul><li><p>→ As my income goes up, I buy more at an increasing rate</p></li></ul></li></ul></li></ul><p></p>
21
New cards

So far…

  • Basic question we’ve addressed thus far: How does X affect our prediction of Y?

    • Or, how does X1 affect our prediction of Y, holding other X's constant?

  • New question: How does the effect of X1 on our predictions of Y change depending on the value of X2?

    • No longer linear

    • Need an interaction term!


22
New cards

Product Reviews Interaction (Example)

  • You are studying the impact of a product’s average consumer rating on its sales

  • Would you rather buy a product with…

    • A) an average rating of 4.9 on 10 total reviews

    • B) an average rating of 4.8 on 10,000 total reviews

  • The effect of average rating likely depends on the total number of reviews


<ul><li><p>You are studying the impact of a product’s average consumer rating on its sales</p></li><li><p>Would you rather buy a product with…</p><ul><li><p>A) an average rating of 4.9 on 10 total reviews</p></li><li><p>B) an average rating of 4.8 on 10,000 total reviews</p></li></ul></li><li><p>The effect of average rating likely depends on the total number of reviews</p></li></ul><p></p>
23
New cards

Product Reviews Interaction - R

  • R syntax: regmod(Y ~ X1*X2, data)

    • R shorthand for regmod(Y ~ X1 + X2 + X1:X2 , data)

  • regmod(Sales ~ Avg_rating * Num_Reviews, data = data_reviews)


<ul><li><p>R syntax: regmod(Y ~ X1*X2, data)</p><ul><li><p>R shorthand for regmod(Y ~ X1 + X2 + X1:X2 , data)</p></li></ul></li><li><p>regmod(Sales ~ Avg_rating * Num_Reviews, data = data_reviews) </p></li></ul><p></p>
24
New cards

The script for interpreting interactions

  • General interaction interpretation: how does the effect of one predictor change depending on the value of another predictor?

  • Let β1 = the effect of X1 on predictions of Y (aka Ŷ)

  • Let ΔX2 = what it means to change the value of X2

  • Interaction effect = When ΔX2 , β1 would change by β3

  • Note: multiplication is symmetric. Deciding which predictor is X1 and which is X2 depends on our hypothesis

    • X1 = "focal" variable that we are primarily interested in its impact on the outcome

    • X2 = "moderator" that can alter the effect of the "focal" variable


<ul><li><p>General interaction interpretation: how does the effect of one predictor change depending on the value of another predictor?</p></li><li><p>Let β1 = the effect of X1 on predictions of Y (aka Ŷ)</p></li><li><p>Let ΔX2 = what it means to change the value of X2</p></li><li><p>Interaction effect = When ΔX2 , β1 would change by β3</p></li><li><p>Note: multiplication is symmetric. Deciding which predictor is X1 and which is X2 depends on our hypothesis</p><ul><li><p>X1 = "focal" variable that we are primarily interested in its impact on the outcome</p></li><li><p>X2 = "moderator" that can alter the effect of the "focal" variable</p></li></ul></li></ul><p></p>
25
New cards

Product Reviews Interaction - R (Continued)

Table breakdown

<p>Table breakdown</p>
26
New cards

Multicollinearity and Variable Selection

  • Tolerate VIFs > 10 (we are explicitly adding a correlated predictor)

    • regmod() suppresses the VIF for the interaction term

    • Multicollinearity problem if VIF for main effects > 10

  • Never omit the "main effects" from an interaction model

    • The main effects (coefficients, effect size) are no longer interpretable on their own because they now have a multiplicative effect on the outcome

    • The question of interest is about the interaction

  • Interaction R2i is generally small, even when effect size is large

    • The variables were already there for the model to use for predictions, the interaction term clarifies the best way to use them


27
New cards

You try - Income “Elasticity” (Example)

  • You work for a company that is trying to understand how sensitive its customers are to changes in price

  • You know low-income customers will be more price sensitive than high-income customers

  • Your goal is to see how large of an effect income has on price sensitivity

  • You measure total units sold to test this


<ul><li><p>You work for a company that is trying to understand how sensitive its customers are to changes in price</p></li><li><p>You know low-income customers will be more price sensitive than high-income customers</p></li><li><p>Your goal is to see how large of an effect income has on price sensitivity</p></li><li><p>You measure total units sold to test this</p></li></ul><p></p>
28
New cards

You try - Income “Elasticity” (Example Continued)

If income were $1k higher, the effect of a $1 increase in price on Units Sold would be 1.06 units larger

→ note: smaller impact

<p>If income were $1k higher, the effect of a $1 increase in price on Units Sold would be 1.06 units larger</p><p>→ note: smaller impact</p>
29
New cards

Types of Interactions

  • Continuous X Continuous

  • Continuous X Categorical

  • Categorical X Categorical


30
New cards

Is Advertising More Effective for Startups? (Example)

  • You want to know if advertising is more effective for startups or established brands

  • People already aware of established brands, more ads reinforce awareness

  • People may be unaware of startups, more ads generate more awareness

  • You observe this pattern in your data but you need to formally test it


<ul><li><p>You want to know if advertising is more effective for startups or established brands</p></li><li><p>People already aware of established brands, more ads reinforce awareness</p></li><li><p>People may be unaware of startups, more ads generate more awareness</p></li><li><p>You observe this pattern in your data but you need to formally test it</p></li></ul><p></p>
31
New cards

Is Advertising More Effective for Startups? (Example - R)

See image for output

<p>See image for output</p>
32
New cards

The Script for Interpreting Interactions

  • Y ~ β0 + β1*X1 + β2*X2 + β3* X1 *X2

  • General interaction interpretation: how does the effect of one predictor change depending on the value of another predictor?

  • Let β1 = the effect of X1 on predictions of Y (aka Ŷ)

  • Let ΔX2 = what it means to change the value of X2

  • Interaction effect = When ΔX2 , β1 would change by β3


<ul><li><p>Y ~ β0 + β1*X1 + β2*X2 + β3* X1 *X2</p></li><li><p>General interaction interpretation: how does the effect of one predictor change depending on the value of another predictor?</p></li><li><p>Let β1 = the effect of X1 on predictions of Y (aka Ŷ)</p></li><li><p>Let ΔX2 = what it means to change the value of X2</p></li><li><p>Interaction effect = When ΔX2 , β1 would change by β3</p></li></ul><p></p>
33
New cards

Startup Advertising Interaction (Continued)

See image for table breakdown

<p>See image for table breakdown</p>
34
New cards

Is Advertising More Effective for Startups? (Conclusion)

  • Is ad spending more effective for startups?

  • Yes, the change in sales from a one-unit increase in Ad_Spend is $7.92 larger for startups than established brands

  • Slope for Startups – Slope for Established = 7.92

  • Slope for Established = 5.38

  • Slope for Startups = 13.3


<ul><li><p>Is ad spending more effective for startups?</p></li><li><p>Yes, the change in sales from a one-unit increase in Ad_Spend is $7.92 larger for startups than established brands</p></li><li><p>Slope for Startups – Slope for Established = 7.92</p></li><li><p>Slope for Established = 5.38</p></li><li><p>Slope for Startups = 13.3</p></li></ul><p></p>
35
New cards

You Try – Discounts for Loyalists

  • You work for a company that is trying to understand how loyalty membership affects discount sensitivity

  • You observe the data on the right and need to determine whether that interaction exists


<ul><li><p>You work for a company that is trying to understand how loyalty membership affects discount sensitivity</p></li><li><p>You observe the data on the right and need to determine whether that interaction exists</p></li></ul><p></p>
36
New cards

You Try – Discounts for Loyalists (Continued)

Effect for non-members = 30.18 + 105.47 = 135.65

Effect of discount for members = 30.18

Effect of discount for nonmembers – Effect of discount for members = 105.47

<p>Effect for non-members = 30.18 + 105.47 = 135.65</p><p>Effect of discount for members = 30.18</p><p>Effect of discount for nonmembers – Effect of discount for members = 105.47</p>
37
New cards

Regression with Binary Outcome Variables

  • OLS assumes a linear relationship between the predictors and the outcome

  • If Y is binary (buy/didn’t buy), this is not true

  • Using OLS in this case violates assumptions and makes suboptimal predictions


38
New cards

Did a Customer Buy a Subscription? (Example)

  • We're doing market research studying how price impacts whether people subscribe to a streaming service

  • For each customer, we observe the price they saw and whether they subscribed

  • OLS?

  • Running OLS with this data reveals a glaring problem…

  • Predicted probabilities can fall outside [0,1]

    • Impossible


<ul><li><p>We're doing market research studying how price impacts whether people subscribe to a streaming service</p></li><li><p>For each customer, we observe the price they saw and whether they subscribed</p></li><li><p>OLS?</p></li><li><p>Running OLS with this data reveals a glaring problem…</p></li><li><p>Predicted probabilities can fall outside [0,1]</p><ul><li><p>Impossible</p></li></ul></li></ul><p></p>
39
New cards

Logistic Regression

  • take the OLS line and “bend” it into a sigmoid (S-shaped) curve

  • this keeps predicted probabilities within [0,1]

  • it also improves model fit (sometimes dramatically)


<ul><li><p>take the OLS line and “bend” it into a sigmoid (S-shaped) curve</p></li><li><p>this keeps predicted probabilities within [0,1]</p></li><li><p>it also improves model fit (sometimes dramatically) </p></li></ul><p></p>
40
New cards

Logistic Regression explained

  • Thus far, everything we've done has been housed under OLS

  • Why introduce logistic regression?

    • Binary outcomes are very common in marketing

    • Logistic regressions predict those outcomes more accurately than OLS

    • ML/AI

    • Demystifying the difference between linear and logistic regression

      • The way it's typically presented is odd


41
New cards

Logistic Regression – The Key Change

  • OLS assumes the effect of a predictor on the outcome is constant

  • When the outcome is binary, the effect is smaller near the bounds


<ul><li><p>OLS assumes the effect of a predictor on the outcome is constant</p></li><li><p>When the outcome is binary, the effect is smaller near the bounds</p></li></ul><p></p>
42
New cards

Marginal Effect (ME):

Change in Ŷ for a one-unit change in a X, starting from a specific value of X

→ Not constant in logistic regression

43
New cards

How do we Capture this Nonlinearity? (marginal effect)

  • OLS → constant linear effect

  • log-log → nonlinearity captured by changing units

  • Interactions → nonlinearity captured by multiplicative interaction

  • Logistic regression → nonlinearity captured by a decay factor


44
New cards

Logistic Regression as Decaying ME's

  • In logistic regression, predictors have their largest impact when P(Y=1) = 50%

  • Predictors' ME's approach zero as P(Y=1) approaches 0 or 1

  • Why? …


<ul><li><p>In logistic regression, predictors have their largest impact when P(Y=1) = 50%</p></li><li><p>Predictors' ME's approach zero as P(Y=1) approaches 0 or 1</p></li><li><p>Why? …</p></li></ul><p></p>
45
New cards

Logistic Regression as Decaying ME's (Continued)

The effect of a predictor on a binary outcome combines two values

1) Maximum effect the predictor can have (i.e., ME at p̂ = 50%)

2) How that effect decays as p̂ moves away from 50%

<p>The effect of a predictor on a binary outcome combines two values</p><p>1) Maximum effect the predictor can have (i.e., ME at p̂ = 50%)</p><p>2) How that effect decays as p̂ moves away from 50%</p>
46
New cards

Logistic Regression as Decaying ME's (About the Decay Factor)

  • Same for every predictor in every logistic regression

  • The decay accelerates as you approach the bounds


<ul><li><p>Same for every predictor in every logistic regression</p></li><li><p>The decay accelerates as you approach the bounds</p></li></ul><p></p>
47
New cards

So How Do We Do This?

Logistic regression is simply OLS + an "activation function"

<p>Logistic regression is simply OLS + an "activation function"</p>
48
New cards

Logistic Regression = OLS + Sigmoid Activation

  • The GIF is real!

  • Mathematically, we are just applying a function to bend the OLS line

→ This lets us keep almost everything the same, just add the decay

<ul><li><p>The GIF is real!</p></li><li><p>Mathematically, we are just applying a function to bend the OLS line</p></li></ul><p>→ This lets us keep almost everything the same, just add the decay</p>
49
New cards

Note on "OLS + Activation Function"

Framing logistic regression in this way has two key advantages

1) Most of our previous machinery and interpretations remain

2) This is a broader concept that generalizes outside our class

→ There are many activation functions used in other fields or for other purposes, especially in ML/AI

→ Knowing this creates an easy bridge for you

50
New cards

Running Logistic Regression in R

  • Don't ask AI to give you code for this

  • Default logistic regression output/interpretation is more complicated

  • Default R functions for it make it even more complicated

  • So how do we do it?

  • regmod() ☺


<ul><li><p>Don't ask AI to give you code for this</p></li><li><p>Default logistic regression output/interpretation is more complicated</p></li><li><p>Default R functions for it make it even more complicated</p></li><li><p>So how do we do it?</p></li><li><p>regmod() <span data-name="relaxed" data-type="emoji">☺</span></p></li></ul><p></p>
51
New cards

Logistic Fit > OLS Fit

Logistic regression is the winner due to a higher R²

<p>Logistic regression is the winner due to a higher R² </p>
52
New cards

Multiple Predictors? No Problem

• Let's say some of the customers received a free trial of the streaming service before deciding whether to subscribe

• As before, the presence of a free trial has the largest ME for customers on the fence

• The ME of price remains the same, holding trial status constant

<p>• Let's say some of the customers received a free trial of the streaming service before deciding whether to subscribe</p><p>• As before, the presence of a free trial has the largest ME for customers on the fence</p><p>• The ME of price remains the same, holding trial status constant</p>