Doing Bayesian Data Analysis by John K. Kruschke
Author:John K. Kruschke
Language: eng
Format: mobi, pdf
ISBN: 9780123814852
Publisher: Academic Press
Published: 2011-01-15T20:00:00+00:00
13.2. Sample Size for a Single Coin
As our first worked-out example, consider the simplest case: data from a single coin. Perhaps we are polling a population and we want to know if there is a preference for candidate A or candidate B. Or perhaps we want to know if a drug has more than a 50% cure rate. We will go through the steps listed in Section 13.1.2 to compute the exact sample size needed to achieve various degrees of power for different data-generating hypotheses.
13.2.1. When the Goal is to Exclude a Null Value
Suppose that our goal is to show that the coin is biased. In other words, we want to show that 0.5 is not among the credible values. More specifically, we want to show that the 95% HDI excludes .
Because of previous research (or just a really strong hunch), we think that the true bias of the coin is very close to . It is a strong belief, so we'll describe the data-generating hypothesis as a beta distribution with mean and certainty based on 2000 fictitious flips of the coin. This puts 95% of the data-generating biases between 0.63 and 0.67.
Next, we generate simulated data from hypothetical coins that have those biases, and tally how often the HDI excludes . One replication of the process goes like this: First, select a value for the “true” bias in the coin, from the data-generating distribution that is narrowly centered on . Suppose that the selected value is 0.638. Second, simulate flipping a coin with that bias times. The simulated data have heads and tails. The proportion of heads, , will tend to be around .638, but will be higher or lower because of randomness in the flips. Third, using the audience-agreed prior for purposes of data analysis, determine the posterior beliefs regarding if heads in flips were observed. Tally whether or not the 95% HDI excludes the null value of . Notice that even though the data were generated by a coin with bias of 0.638, the data might, by chance, show a low proportion of heads, and therefore the 95% HDI might not exclude . This process is repeated many times to estimate the probability that the null value will be excluded from the HDI. In fact, for this simple situation, the exact power can be computed analytically, as explained in Section 13.6.1 ( minNforHDIpower.R), p. 335.
Table 13.1 shows the minimal sample size needed for the 95% HDI to exclude when flipping a single coin. As an example of how to read the table, suppose you have a data-generating hypothesis that the coin has a bias very near . This hypothesis is implemented, for purposes of Table 13.1, as a beta distribution with shape parameters of and . The value of is arbitrary; it's as if the generating mean of 0.65 was based on fictitious previous data containing 2000 flips. The table indicates that if we desire a 90% probability of obtaining a 95% HDI that excludes , we need a sample size of (i.
Download
Doing Bayesian Data Analysis by John K. Kruschke.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Modelling of Convective Heat and Mass Transfer in Rotating Flows by Igor V. Shevchuk(6200)
Weapons of Math Destruction by Cathy O'Neil(5779)
Factfulness: Ten Reasons We're Wrong About the World – and Why Things Are Better Than You Think by Hans Rosling(4454)
Descartes' Error by Antonio Damasio(3139)
A Mind For Numbers: How to Excel at Math and Science (Even If You Flunked Algebra) by Barbara Oakley(3075)
Factfulness_Ten Reasons We're Wrong About the World_and Why Things Are Better Than You Think by Hans Rosling(3025)
TCP IP by Todd Lammle(2982)
Applied Predictive Modeling by Max Kuhn & Kjell Johnson(2858)
Fooled by Randomness: The Hidden Role of Chance in Life and in the Markets by Nassim Nicholas Taleb(2833)
The Tyranny of Metrics by Jerry Z. Muller(2819)
The Book of Numbers by Peter Bentley(2744)
The Great Unknown by Marcus du Sautoy(2516)
Once Upon an Algorithm by Martin Erwig(2456)
Easy Algebra Step-by-Step by Sandra Luna McCune(2435)
Lady Luck by Kristen Ashley(2386)
Practical Guide To Principal Component Methods in R (Multivariate Analysis Book 2) by Alboukadel Kassambara(2358)
Police Exams Prep 2018-2019 by Kaplan Test Prep(2334)
All Things Reconsidered by Bill Thompson III(2242)
Linear Time-Invariant Systems, Behaviors and Modules by Ulrich Oberst & Martin Scheicher & Ingrid Scheicher(2210)
