# Relationship between random variables that are parameterized

Suppose we have $n$ random variables $X_n$ - let's say these are measures of customer engagement - and we sample these $m$ times through a set of designed trials. The resulting $m$ data points define the 'behavior' for each customer. We end up with an $m$ by $n$ matrix of samples. Now, each one of these random variables is also parametrized $X_n = X_n(a, b, ...,z)$ where $a, b, ..., z$ can be both categorical and numerical variables. Let's say $a, b, ..., z$ are information about the customer (age etc.) that can be collected beforehand and that does not change throughout our sampling trials.

The task is to come up with a model that clusters customers with similar behavior and then to use this model to classify new customers into one of these clusters. However, for new customers, sampled data/behavior information is not available -- only the parameter values $a, b, ..., z$. There is most certainly a relationship between the $a, b, ..., z$ parameters and the behavioral samples for each customer, and we would like to somehow calibrate and exploit this in the model.

At this point, I'm struggling to clearly understand what the essence of the problem is. It's an unsupervised learning task where we have samples of many random variables that are themselves parameterized by some categorical or numerical values. We would like to come up with a model or representation that makes it easy to classify a new random variable if we can only observe its parameters.

I'm not sure what the most obvious approach is to try here (I only have basic background in ML) but I'm hoping that this is actually a fairly standard problem in literature that I don't know about.

Any help or suggestions would be helpful!

This is a nice task you are working on.

A possible strategy is as follows:

1. Cluster the customers based on their behaviours. Here we may choose between two slightly different ways: (A) Replace the $m$ variables by $p$ derived new variables (like e.g. intercept and slope of a linear regression per client or just anything that you think captures the main behaviour of the clients) and then run any cluster analysis algorithm on these $p$ derived (standardized) variables. Or (B) run a cluster analysis on the original $m$ (standardized?) variables e.g. using as similarity measure "correlation" (if you want to cluster based on the shape of the curves per client). Either way will provide you with a new variable $C$ naming the cluster levels in which each of the $n$ clients fall.
2. Now build a classification model (e.g. multinomial logistic regression or a tree) to predict the cluster level of each client based on age, gender etc.
3. Use the classifier to predict the cluster level (and thus the behaviour) for each new client based on its age etc.

A different strategy would be fully model based without clustering. You basically have a $m$ dimensional outcome so you can model it with any modelling technique that takes a multidimensional response (MANCOVA/repeated measures ANOVA, mixed effects model). Or, maybe simpler, like in the cluster analysis above, reduce the $m$ values per client to 1-2 derived values that you think are important (e.g. average and slope or area under the curve etc.) and then regress them individually on age, gender etc. If you want to guess the behaviour of a new person based on his characteristica, then just predict the values of the derived variables (e.g. individual average and slope) using the regressions and draw corresponding expected curve based on those.

• Thanks for your comment! I mentioned the clustering part to make it a little easier to visualize/explain (for myself mainly!), but it's not strictly necessary. A more general way to state the goal would be "Try to predict the average behavior of a new customer, only given their prior information". Similar to something a recommender system would do where you don't necessarily have the concept of strict clusters. Could you elaborate on your last comment to do away with clustering and do it fully model based? That would be very useful!
– wfh
Jul 30, 2015 at 13:46
• I tried to add some hints in this direction. It could be worth trying out two different strategies and the check if you get similar results for new clients. Jul 30, 2015 at 14:30