1

A reformulation of a question that came up in a model:

Imagine a toy store that sells $K$ toys, where our prior is that each toy has equal probability $1/K$ of being purchased by a customer. Then you have a customer come in and buy a teddy bear. Can we use Bayesian updating to find a new probability estimate of a customer buying a teddy bear?

Roger D W
  • 11
  • 1
  • It looks like you are trying to connect two different things: making a purchase and purchasing a teddy bear. Since you haven't posited any prior concerning teddy bears, there doesn't seem to be anything to update. Are you sure your formulation accurately reflects the question you actually have about the model? – whuber Sep 08 '21 at 20:29
  • Yes it’s correct. We’re looking for the probability that a given sale is a teddy bear. Our prior is that the probability of a given sale being a teddy bear is 1/K. – Roger D W Sep 08 '21 at 20:36
  • 1
    You now seem to be asserting that all toys are teddy bears. If that's the case, please edit your post accordingly. But then your model is strange: why should a customer come in and buy anything at all? You will be far better off abandoning this effort to explain your problem by analogy: tell us what the problem *really* is. – whuber Sep 08 '21 at 20:40
  • 1
    @whuber - I think the OP means there are $K$ *types* of toys, one of which is "teddy bear". The OP is unclear on what a prior is defined on, but this is a common introductory mistake in my experience. If we assume some prior on the probability of buying a teddy bear such that the expected probability is $1/K$, and you observe one customer buying a teddy bear, how do you update the prior with the single observation? – jbowman Sep 08 '21 at 20:51

1 Answers1

2

This is how I read your question: when a customer comes to a store, they always buy one, and only one, of $K$ items. There’s an infinite supply of the items (i.e. they are sampled with replacement). With no other prior knowledge, you assume a prior probability for picking any of the items to be $1/K$. A customer comes and buys $i$-th item, you want to use this information to update the prior.

In such a case, use Dirichlet-multinomial model. Your prior is an uniform Dirichlet distribution with parameters $\alpha_1=\alpha_2=\dots= \alpha_K=1$, hence the individual probabilities are on average equal to $1/K$. When you observe a purchase for the $i$-th category, you update the prior to get the posterior $E[p_i]=\frac{2}{K + 1}$ and $\frac{1}{K+1}$ for other categories.

Tim
  • 108,699
  • 20
  • 212
  • 390