Distribution

Multinomial Distribution

Multinomial Distribution (Definition)

We say the vector follows a Multinomial Distribution if:

  1. There are trials, where each trial has possible outcomes with probabilities , with and
  2. The trials are independent.
  3. is the number of successes of type in total trials, so

The joint pmf is given by

Marginals

Conditionals I a little iffy about what this means, they gave this example, but I don’t think it’se worthy to put it in my notes.

PyTorch

Serendipity learned this from STAT206, and now I am applying it from Andrej Karpathy.

torch.multinomial(p, num_samples=20, replacement=True, generator=g)

We use the probability distribution to generate a tensor of indices.