Finding the P-Value

75 Views Asked by At

Suppose a coin with probability $p$ of heads is repeatedly flipped until $10$ heads appear. Call this number $X$. Find the p-value of $H_0:p=0.5$ versus the alternate $H_a:p≠0.5$ using the test statistic $|X−20|$ if $X=27$.


Isn't this the $Prob(10 \space heads|p=0.5)$ at $27$. So, if p = 0.5 then 10 heads should come up at $X=20$; but since it's at $27$, $p$ is actually lower than $0.5$, It's closer to $0.325$. How do you use the test statistic though?

1

There are 1 best solutions below

1
On BEST ANSWER

The p-values is the probability that you observe something at least as crazy as what happened if you assume $H_0$. In this case, X is 27, so you need to calculate $P[|X-20|\geq 7|p=0.5]$. You need to use the negative binomial distribution to calculate this number. If it's smaller than your cutoff (0.05 is a standard cutoff), you would reject the null. Otherwise, you accept that you don't have enough information to reject the null.