I'm currently studying statistics and I'm reviewing notes I took during a class last week. However, there's something I'm confused about. My professor subtracted 1 from the "successes" and I can't seem to figure out why. Essentially, the scenario was like this:
Someone flipped a coin 16 times.
$$H_0:p=0.5\text{ v.s. }H_a:p=0.55$$
Test 1: Reject $p = 0.50$ if 10 or more heads are observed out of 16.
$\text{Pr}(X \ge 10 \text{ when } p= 0.5)$ where X is a binomial with $n = 16$ and $p = 0.50$.
This is the part I don't understand. When using R, he did the following:
1 - pbinom(9, 16, 0.5)
Where did the 9 come from? Why did he subtract 1 from the initial 10 tosses? If I was in a scenario where I had:
$$\text{Pr}(X \le 15 \text{ when } p = 0.50)$$
Would I still subtract 1? Would the R solution be pbinom(15, 16, 0.50) or pbinom(14, 16, 0.50)? How do we decide when to subtract 1 like this?
( Sorry if my formatting is bad! I've never posted math equations like this to these forums and I can't seem to figure it out)
$P(X \ge 10) = 1 - P(X \le 9) = 0.2272491.$ In R,
pbinomis a binomial CDF anddbinoma binomial PDF.For $X \sim \mathsf{Binom}(n=16,p=.5)$ here are three ways to find $P(X \ge 10)$ in R. The last, and most direct method, subtracting the CDF, is the one shown in class.
The desired probability is the sum of the heights of the bars to the right of the dotted red line.