# Math Help - Hypothesis Testing. Power Function

1. ## Hypothesis Testing. Power Function

We just learned this today so I am just slightly confused on how this stuff works. Any hints or starters would be great!! Thank you!!

Suppose the proportion p of defective items in a large population of items is unknown and that it is desired to test the following hypothesis:
Null: p=.2, Alternative: p does not equal .2
Suppose also that a random sample of 20 items is drawn from the population. Let Y denote the number of defective items in the sample, and consider a test procedure delta such that the critical region contains all the outcomes for which either Y is greater than or equal to 7, or Y is less than or equal to 1.

Determine the value of the power function at the points p= 0, .1, .2, .3, .4, .5, .6, .7, .8, .9, and 1 and sketch the power function.
Determine the size of the test.

2. The power function is the probability of rejecting the null hypothesis.

hence $Power(p)=P(X\le 1)+P(X\ge 7)$

Now X is a binomial rv with n=20 and p anything you wish in [0,1]

So $Power(p)=\sum_{k=0}^1{20\choose k}p^k(1-p)^{20-k}+\sum_{k=7}^{20}{20\choose k}p^k(1-p)^{20-k}$

OR $F_p(1) + 1-F_p(6)$

3. Thanks so much that's very helpful, I think I can do it from there just plugging in values of p. How did you change it to Fp(1)+1-Fp(6) though?
Also, how do you determine the size of a test?

4. I had to recall what 'size' meant
According to this, Statistical hypothesis testing - Wikipedia, the free encyclopedia, its just alpha
Well that the probability of rejecting under the null which happens when p=.2

AND $P(X\le 1)=F(1)$ while $P(X\ge 7)=1-PX(\le 6)=1-F(6)$