# Math Help - problem understanding one thing in hypothesis testing of discrete variables

1. ## problem understanding one thing in hypothesis testing of discrete variables

hi,

Ok so I understand the problems and what I have to do. This chapter is straight after hypothesis testing of continuous variables.

I just dont understand ONE thing..

Problem 1 :
One evening on a estate playground 12 boys and 6 girls were playing. Assuming these were a random sample of all children living in the estate, test, and the 10% significance level, whether there are equal numbers of Boys and girls on the estate.
So the solution to this was X ~ B(18, 0.5) (X follows a binomial distribution)
find P(X >= 12) which is 11.9% since its a two tail test 11.9 > (10/2) % so the boys and girls are equal.

Problem 2
A car dealer claims atleast 95% of his customers are satisfied. In A random sample of 25 of them 22 said they were satisfied. Test at 5% sig level that the data supports his claim.
So here X ~ B(25, 0.95) but when I calculated P(X>=22) i was wrong, apparently I had to calculate P(X<= 22)

Why P(X<=22) how do I know when I have to look for greater than ??

I'm very sorry if this is a stupid question but I am learning on my own!

2. These are the p-values, the probability of being worse off than the data, assuming the null hypothesis is correct.
In the first case, you assume under the null that it's equally likely to see a male or female out of 18 children, so p=.5 under the null.
You observe 12 males, hence the p-value is $2P(X\ge 12)$ where n=18 and p=.5
and you double it since this is a two sided test.

$H_o: p=.5$ vs. $H_a: p\ne .5$

You then compare the p-vale to your alpha in order to make a decision.

In the second one, I'D put the thing I want to prove in the althernative hypothesis.

Hence my alternative is $H_a: p\ge .95$

The null can either be $H_o: p<.95$ or for simplicity $H_o: p=.95$
Both are treated the same.

3. Sorry I didnt reply sooner. Yea I understood after a while! =P Also I realized I have to look for a probability that is usually small, if I get the direction wrong the probability is opposite.