Flipping coins the PyMC3 way

Let's revisit the coin-flipping problem from Chapter 1, Thinking Probabilistically, but this time using PyMC3. We will use the same synthetic data we used in that chapter. Since we are generating the data, we know the true value of , called theta_real, in the following code. Of course, for a real dataset, we will not have this knowledge:

np.random.seed(123)
trials = 4
theta_real = 0.35 # unknown value in a real experiment
data = stats.bernoulli.rvs(p=theta_real, size=trials)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.12.170