Monte Carlo, Markov Chains, Metropolis Hastings.
I used “np.random.randint(2, size=10)” function to generate head and tail. This function uses a discrete uniform distribution U[0,1], hence the probability for p(x=0)=p(x=1)=0.5. Last let’s visualize the prior distribution — initial distribution of θ, the likelihood distribution, and posterior