1
$\begingroup$

Note: The edits below phrase the problem better, but I kept the original post as is. My apologies if not explaining the problem coherently

Assume Person X likes to visit different restaurants at different times. We would like to determine the current estimate of their demographic distribution based on all prior information we know from other sources based on the history of their visits:

  • Demographic distribution of those who also were at that particular restaurant at the particular time.
  • Demographic distribution of those who were at any restaurant at that particular time.
  • Demographic distribution of overall population at that particular time

Let i be the index of each visit. (e.g. i=1 could be January 1, i=2 could be Jan 28th, etc.). Let j be the jth demographic; for simplicity we can assume (Young, Middle, Old)

Not sure if just probabilities can be used, or actual numbers are needed. The possible example thought of for the latter was that if for each $i$ (visit) the percentage of 'Old' may be small for that particular restaurant at that specific time, but that may be the only restaurant 'Old' attends at that time. If for each $i$ Person X also follows the same trend of going to the same restaurant and time as all 'Old' also visit, that should increase the probability Person X is 'Old', even though for that particular restaurant at that time the percentage 'Old' may be small. In order to tell all 'Old' visited that restaurant at that time, the raw numbers are needed. (or conditional based on each demographic)

As a concrete example, for $i=1$:

$POP_1 = [.30, .20, .50]$ $n=1000$ (Population at time i=1)

$ANY_1 = [.70, .20, .10]$ $n=300$ (Those going to any restaurant at time i=1)

$REST_1 = [.10, .60, .30]$ $n=100$ (Those also attending same restaurant as Person X at time i=1)

Set wise, REST is a subset of ANY, which is a subset for POP. This is true for each $i$.

EDIT 1

Person X has a true, but unknown demographic. We don't know what it is, so we are trying to estimate it with a "demographic distribution", a categorical distribution of different demographics. Using (Young, Middle, Old) as an example list of demographics then [.1 .8 .1] might be a very good estimate if Person X was truly in 'Middle' demographic.

To try and estimate their demographic we look at which restaurants they visit, and at what times. From another source, we have the number of people who visit any particular restaurant for each time, the number of people who visit any restaurant for each time, and the overall population - along with number in each demographic.

(Side tangent: The restaurant analogy is the closest I can come up without getting into technical details of the actual problem at hand, but the analogy is exact. For Person X we know an activity they did at that time, as well demographic information of other people who did that activity at the same time, and those who did any activity at that time, and population under consideration)

The numbers given above would be identical to if, at time $i=1$: (The triplet refers to (Young, Middle, Old) demographics)

  • Population had (300, 200, 500) people in each demographic
  • Of those, (210, 60, 30) went out to eat at the same time as Person X, but may be different restaurants
  • Of those, (10, 60, 30) were at the same restaurant as Person X and at the same time.

Notice that Person X attended the same restaurant, at the same time, as all 'Middle' and 'Old' also attended. (i.e. no one in those two demographics went to a different restaurant at the same time) This should increase the probability Person X may be one of those two demographics, especially if at time $i=2$ the same event happens. (This may be an extreme example)

At each visit $i=1,2,3,4,...,$ we know the demographic information of those three bullet points above. How can we combine all that information to get an estimate of Person X's demographic?

Edit 2

Assume the demographics under interest are descriptors of age: (Young, Middle, Old).

At the first time index $i=1$ (Calendar day not important), Person X goes to a restaurant at a particular time. At such that time:

  • Population had (300, 200, 500) people in each demographic
  • Of those, (210, 60, 30) went out to eat at the same time as Person X, but may be different restaurants
  • Of those, (10, 60, 30) were at the same restaurant as Person X and at the same time.

At a different time index, $i=2$, Person X also went to a possibly different restaurant. At such time:

  • Population had (350, 190, 550) people in each demographic
  • Of those, (300, 150, 20) went out to eat at the same time as Person X, but may be different restaurants
  • Of those, (50, 10, 20) were at the same restaurant as Person X and at the same time.

How can we use all information about both visits to get an estimate of the probability Person X is each demographic? (Notice both times Person X went exclusively to the same restaurant that all 'Old' also attended - should that increase the probability is in the Old demographic?)

Example estimate might be: (.10, .20, .70) - that is, there is a 70% chance Person X is 'Old' - the categorical distribution representing the probability of being in each demographics would be updated with information gathered from each new visit ($i=1,2,3,...$), taking into account all prior information from other visits as well.

$\endgroup$
2
  • 1
    $\begingroup$ You lost me at the second sentence. The first refers to a specific person, whereas the second asks how to estimate their "demographic distribution". How does an individual have a demographic distribution? The rest of the question is so vague that even the example is of little help in understanding what data you have and what you are really trying to find out. $\endgroup$
    – whuber
    Commented Dec 22, 2014 at 17:58
  • 2
    $\begingroup$ My apologies, I tried to be clear. Person X has a true, but unknown, demographic. We are trying to estimate their demographic based on which restaurants they visit and at what time. The 'demographic distribution' could be [10% Young, 80% Middle, 10% Old] as an estimate. (And good estimate if Person X is truly 'Middle'). I will try and edit the question to make the example clear. $\endgroup$
    – sheppa28
    Commented Dec 22, 2014 at 21:30

1 Answer 1

-1
$\begingroup$

From what I understand of your post, this is definitely a classification problem. Since it seems like you need to first identify your demographics, it seems like an unsupervised learning problem. So, you might want to think about cluster analysis. You could have variables like [age, restaurant, time] and try to come up with some clusters around these. Then, you can predict what cluster a person will be in.

If you can identify your demographics in advance, you can use supervised learning. Namely, a classification system such as k-nearest-neighbors to predict which demographic a person will be in.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.