# Bayesian Hierarchical Customer Spend Model

#### Snow64

##### New Member
Hi guys, I am trying to set up a Bayesian Hierarchical model for customer spending, and was hoping to clarify a couple of things. I want to look at the returns on investment amongst people who buy our products for a particular marketing initiative. So what we have is:
- A general customer base
- A VIP customers club that is for people who buy frequently
- People who have been emailed for a particular marketing initiative (this is a subset of the VIP customers i.e. not all the VIP customers are emailed for every initiative. We only email the subset who are identified as potentially interested in this particular offer).

Question:
What I want to do is quantify the ROI for this particular marketing initiative - the difference between the people who were emailed, and the entire VIP customer base or general customer base.

Is it correct to structure the hierarchy as:

- Individual Customer Spend (bottom level) (Gamma or Exp distribution most likely)
- The subset emailed for this initiative (2nd level)
- All VIP members (3rd level)
- General customer population (4th level)

1. Is this structure a good solution for my needs? (are there any fundamental flaws?)
2. Are the priors for the 2nd level up basically the distributions of that level's spending? i.e. the priors for the emailed customers are distributions of the overall VIP customer spend?

Apologies for the long question but I was trying to explain the whole set-up, and thanks in advance for your answers/suggestions on improvements.

p.s. I am maths/software literate but Bayesian Inference is not my field of expertise.

Cheers.

#### hlsmith

##### Not a robit
This is not my forte but I am pretty sure when you get to 3 or more levels - getting model running can get difficult. Your presentation is clear. I would start with a simpler version, perhaps exclude level 4. Also, I could be wrong but can level 3 and 2 be collapsed. So you have Vip with random variable initiative.

Is your y amount spent total or each purchase with clusters for each person (guessing the latter)?

#### Snow64

##### New Member
Hi hlsmith and thanks for your quick response.
Yes I can leave out level 4 for now. This was a concern I had too actually - whether this many levels will be computationally feasible if I go to >100,000 customers.

I am not sure I can collapse level 2 and 3. This is because within all the VIP members, we are emailing only a subset who have been identified as the high value ones for this particular initiative. So, for example, amongst all the members we may identify people >65 years old as suitable for this week's offer. So we email them. Our y value then is how much they spent (this won't be all the people who were emailed as not all will even take up the offer). Our y is how much those people spent in the week following the marketing initiative (our offers are short-term, so we can only assume that their spending on those items during the following week is due to being emailed). What I want to know out of this is:

Was the frequency/amount of spending for the group we emailed higher than the general spend of the VIP customers. We want to know if our selection criteria is working, basically. So this means I am trying to compare level 2 with 3 (does this mean I have the hierarchy wrong, and I am looking at 2 simpler models?)

Thanks for your help.