2

I have an experiment where I'd like to determine if a coin is biased. I'm using the binomial distribution to look at coin flips.

I've collected data from a sample of 30 flips and found that in 24 of the flips, the outcome was heads. I would like to calculate the power of this experiment. Here I am interested in only a one sided test:

binom.test(24, 30, p=0.5, alternative="greater")

How can I calculate the power of this analysis?

turtle
  • 517
  • 4
  • 10

1 Answers1

5

There are reasons not to do post-hoc power analysis. See UCLA site.

In addition, the code you presented tests 20/30, but you got 24/30. Testing 24/30 gives a p of 0.0007155, so clearly you have enough power to find the difference you got significant.

To do an a priori power analysis of a binomial proportion, see this question and the answers and comments there.

Peter Flom
  • 94,055
  • 35
  • 143
  • 276