fair_probs = torch.tensor([0.5, 0.5]) Multinomial(100, fair_probs).sample()#We take 100 draws and set the probility with head0.5 and tail0.5, #then we use Multinomial to sample and get the estimating results.
tensor([40., 60.])
1
Multinomial(100, fair_probs).sample() / 100
tensor([0.4700, 0.5300])
1 2
#we can increase the draws number. Multinomial(10000, fair_probs).sample() / 100