# Predicting someone's behavior based on population tendences and small sample of his own decisions

I'm trying to create some easy predictive model for person behavior. Here is example problem:

Situation: It is raining

Population decisions on huge sample

• 60% takes umbrella
• 30% takes jacket
• 10% ignores rain

Particular person faced situation n-times

• 3x takes umbrella

• 5x takes jacket

• 0x ignores rain

Question: Estimate probabilities, what action will particular person do next time facing rain?

Let's say there is no learining, development or system in decisions. Ignoring rain can lead to illness so the more times the illness comes, the less probable ignoring rain would be in the future, but I feel comfortable just ignoring this.

There are no additional actions allowed for person. If it likes action that is not within population, like taking swimsuit, I just ignore it.

There will be low number of possible actions per each situation, 1-15

I expect some parametrized models for this kind of problem already exists, but I wasn't successfull searching on the internet. Looked mainly at data scientific pages, googled some behaviour predictive models, also tried to look at some math models, but I just don't know how to name this problem, as I think it should already have good solution. I feel invetning myself some workaround for this problem doesn't have to be good choice as I expect much better mathematitians worked on this.

With increasing n I expect person's actions probabilities will be closer to ratio of his previous actions, but I will face a lot of situations, where person has very few actions, 0-5. Ok with 0 I take population probabilities, the question is how should I handle more than 0 actions, particularly very small numbers.

Edit 2: There were good notes that these 60/30/10 percentages can be distributed in various very different ways and it is true. Unfortunately I can't get additional information like individual distributions. First I updated my question with info that was more confusing than usefull. I have predictive algorithm, that estimates confidently population behavior on large sample. It uses various ways to get the result, from mining real decisions to simulation. Optimal decision distribution should always be perfect mixture of population decisions (60:30:10), to have both quality and unpredictability, but people aren't that optimal and it is probably not very important for the question anyway. People can be very narrow (100:0:0), overly random (33:33:33) or whatever they like (4:12:84), this tendency should be parameter of the model. Also I think good parameter to be is some f(n) saying how fast person's sample outweight population probabilities. To me it looks like problem of some interpolation and probability weighting.

• Well, I'd say you want to make some assumptions about how individual statistics are distributed about the population levels. Then, with each observation, you can use Bayes to re-estimate the probabilities for your person. Of course, a few observations won't change the estimate much but lots of observations might.
– lulu
Commented Jul 24, 2017 at 12:40
• It makes a difference how the population probabilities came about. In one possible world, if you choose a person at random there is a $60\%$ chance they always carry an umbrella when it rains. I another possible world, every individual has the exact same distribution of behaviors as every other individual: choose any of them, and you will find he or she takes an umbrella $60\%$ of the time. The person you observed can live in the second world, not in the first, but there are other worlds that person might live in. Commented Jul 24, 2017 at 12:59
• Each individual has some probability distribution of behavior, and those probability distributions are themselves distributed over the population. If you knew the complete distribution of distributions, rather than just the result of their convolution, I think you could say more about the likely behavior of the observed individual. Commented Jul 24, 2017 at 13:02
• @DavidK edited my question, bringing additional information. Commented Jul 24, 2017 at 14:34
• @DavidK Edited again. Commented Jul 25, 2017 at 6:46

With only $n=8$ observations on the particular individual, you very little information about his/her behavior. Presumably, this individual is from the population with specified probabilities .6, .3, and .1.

We cannot make a case that the individual's behavior is inconsistent with the population, even though he/she may be more likely to take a jacket than those in the population. A chi-squared goodness-of-fit test of counts 3, 5, 0 to the population proportions has P-value about 0.15 (failing to reject a match to the population distribution).

At the 5% significance level, an individual with counts 2, 6, 0 would be inconsistent with this population: P-value about 0.02 (< 0.05), as shown by the output from R statistical software below, where the P-value must be simulated because of the very small amount of data.

obs = c(2,6,0);  pop = c(.6, .3, .1)
chisq.test(x=obs, p=pop, simulate=T, B = 1000)

Chi-squared test for given probabilities with simulated p-value (based
on 1000 replicates)

data:  obs
X-squared = 7.8333, df = NA, p-value = 0.02198


As @lulu and @DavidK have pointed out, you lack adequate information linking the individual's behavior with that of the population.

An analogy may be helpful. Suppose you know that 5% of the population has a particular disease; that is, the prevalence of the disease is 5%. An individual submits to a screening test that indicates presence of the disease ('positive' result) 90% of the time when given to a subject with the disease, and gives a 'negative' result 95% of the time when given to a subject free of the disease. These conditional probabilities P(Pos|Disease) and P(Neg|No Disease) are called, respectively, the sensitivity and the specificity of the screening test.

Given prevalence, sensitivity, and specificity, you can use Bayes' Theorem to find P(Disease|Pos) and P(No Disease|Neg). Sensitivity and specificity link the subject's test results to the population.

In your situation the sample space is partitioned into three actions (Umbrella, Jacket, Ignore). For the screening test there are two situations (Disease, No Disease). In your situation, you have the equivalent of prevalence (60/30/10) and of the test result (3/5/0), but you lack linkage information such as sensitivity and specificity.

There are at least a dozen Q&A's on this site about the use of Bayes' Theorem in interpreting screening tests. Also, there are more or less stable Wikipedia pages (google 'sensitivity', for example). Reading some of this material may help you to generalize from two partition sets to three, in order to understand what kinds of information you are lacking.

• Please, how do you mean "We cannot make a case that the individual's behavior is inconsistent with the population"? I expect random person will do one of possible actions, exactly with probability distribution .6, .3, .1 and I expect that any observation of his actions should change the probabilities somehow. I must google a little to understand everything you wrote, but you mean that such low sample is just meaningless and we still expect (almost) .6, .3, .1 distribution next time with any of these small samples? Commented Jul 25, 2017 at 7:16
• I mean that the behavior doesn't closely follow the 60/30/10 split, but it is 'close enough' that a chi-squared goodness of fit test doesn't reject that model. // Wishing you success googling. // Of course individuals will have widely differing behaviors. The issue is to get a conditional model that relates these behaviors to the larger population. [During the No.California rainy season I always wear what you might call a rain jacket because weather forecasts are unreliable (and I like the jacket even when it isn't raining}.] Commented Jul 25, 2017 at 7:30