To calculate type I error of hypothesis testing on a discrete random variable

458 Views Asked by At

Suppose X is a random variable with $P(X=k)=(1-p)^kp$ for $k\in{0,1,2,...}$ and some $p\in(0,1)$. For the hypothesis testing problem $H_0:p=1/2$ and $H_1:p\neq 1/2$.

Consider the test "Reject $H_0$ if $X\leq A$ or if $X\geq B$", where $A<B$ are given positive integers. Express the type-I error of this test in terms of A and B.

My thoughts: The probability we need is P(reject $H_0|H_0$ is true). So, p=1/2. Now the probabilities at each k will be as follows:

$\frac{1}{2}\;\frac{1}{2^2}\;\frac{1}{2^3}\;\cdots\frac{1}{2^{A+1}}\;[\cdots\text{Here $H_0$ cannot be rejected}\cdots]\frac{1}{2^{B+1}}\;\cdots$

I need the probability of $1$-above region. How do I get an expression from this series ?

Edit: The given answer is $1+2^{-B}-2^{-A-1}$. I don't understand how.

1

There are 1 best solutions below

0
On

See here.
The sum of the first terms is $a+a r+a r^2+...+a r^n$ where $a=\frac{1}2$, $r=\frac{1}2$ and $n=A$.
The sum of the second set of terms is also a geometric series.
Use the formula to find the two sums and add them together.

Alternative:
Call the sum of all the terms $x$.
Multiple $x$ by $-\frac{1}2$, which is the sum of all those terms multiplied by $-\frac{1}2$.
Add the original sum and the new sum of terms. Almost all the terms are cancelled out.
Figure out which terms are not cancelled out. Then, you are left with an equation:
$x-\frac{1}2 x=\text{whatever terms are not cancelled out}$
Solve that for $x$.