You are Here: Home >< Maths

# Hypothesis Testing (Edexcel S2) problem thread watch

1. Can anyone help me out with this question please:

Carry out the following test using the binomial distribution where the random variable X respresents the number of successes:
H0: p = 0.5
H1: p ≠0.5
n = 20
x = 7
(using a 10% level of significance)
2. If H0 is true then

P(X <= 7)
= 20Ck * (1/2)^20
= 0.132

Since 0.132 > 0.05, there is insufficent evidence to reject H0.

(We compare 0.132 to 0.05 rather than to 0.1 because we are doing a two-tailed test. Alternatively, we can double 0.132 to get the "significance level of the observation" and compare that with 0.1.)
3. (Original post by Jonny W)
If H0 is true then

P(X <= 7)
= 20Ck * (1/2)^20
= 0.132

Since 0.132 > 0.05, there is insufficent evidence to reject H0.

(We compare 0.132 to 0.05 rather than to 0.1 because we are doing a two-tailed test. Alternatively, we can double 0.132 to get the "significance level of the observation" and compare that with 0.1.)
Why is the probability of X <= 7 is worked out?

I don't get the second line - why have you used the sigma sign?

I understand what you wrote about comparing the probability with 0.05 rather than 0.1 but I don't get how you've answered the question (not that I understand what the question is asking me to do!)

Sorry for asking you all these questions - I'm not so good on hypothesis testing

p.s. the answer at the back of the book is: '0.2632, not significant'
4. (Original post by Jonny W)
If H0 is true then

P(X <= 7)
wa never taught properly in schol, and didn't really get this when i self taught - why do they take less than - you could just have easily have taken >=...how do you choose whether you choose less than or greater than, or doens't it really matter?
5. (Original post by bbcer)
Why is the probability of X <= 7 is worked out?
In a two-tailed test, the significance level of an observation x is

2*P(X <= x) if x is less than the mean of X
2*P(X >= x) if x is more than the mean of X

(where the probabilities and mean are calculated under the assumption that H0 is true).

The significance level of the observation measures how extreme it is in relation to H0. The smaller the SL, the more extreme.

You reject H0 if the observation is sufficiently extreme: if the SL of the observation is less than the SL of the test.
I don't get the second line - why have you used the sigma sign?
You don't need to, you could say

P(X <= 7)
= P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3) + P(X = 4) + P(X = 5) + P(X = 6) + P(X = 7)
= (1/2)^20 + 20C1*(1/2)^20 + 20C2*(1/2)^20 + 20C3*(1/2)^20 + 20C4*(1/2)^20 + 20C5*(1/2)^20 + 20C6*(1/2)^20 + 20C7*(1/2)^20
= 0.1316
I understand what you wrote about comparing the probability with 0.05 rather than 0.1 but I don't get how you've answered the question (not that I understand what the question is asking me to do!)
The significance level of the observation is 2*0.1316 = 0.2632, which we compare with the significance level of the test. Since 0.2632 > 0.1, the observation is not extreme enough to constitute evidence that H0 is false.

--

To check you've understood, do the test again with the observation "x = 15" instead of "x = 7". If you get it right you can have some rep!
6. (Original post by Jonny W)
In a two-tailed test, the significance level of an observation x is

2*P(X <= x) if x is less than the mean of X
2*P(X >= x) if x is more than the mean of X

(where the probabilities and mean are calculated under the assumption that H0 is true).

The significance level of the observation measures how extreme it is in relation to H0. The smaller the SL, the more extreme.

You reject H0 if the observation is sufficiently extreme: if the SL of the observation is less than the SL of the test.

You don't need to, you could say

P(X <= 7)
= P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3) + P(X = 4) + P(X = 5) + P(X = 6) + P(X = 7)
= (1/2)^20 + 20C1*(1/2)^20 + 20C2*(1/2)^20 + 20C3*(1/2)^20 + 20C4*(1/2)^20 + 20C5*(1/2)^20 + 20C6*(1/2)^20 + 20C7*(1/2)^20
= 0.1316

The significance level of the observation is 2*0.1316 = 0.2632. By the rules of two-tailed tests, we compare that number with the significance level of the test. Since 0.2632 > 0.1, the observation is not extreme enough to constitute evidence that H0 is false.

--

To check you've understood, do the test again with the observation "x = 15" instead of "x = 7". If you get it right you can have some rep!
lol I said I understood what you wrote about significance level and then I go and quote the answer from the back of the book (thinking that you got it wrong) which is two times what you got!

Now I know why you worked out P(X <= 7)!

If H0 is true then
P(X => 15) = 1 - P(X <= 14)
= 1 - 0.9793 (from tables)
= 0.0207

2 x 0.0207 = 0.0414 < 0.1 therefore it is significant and there's enough evidence to reject H0?

Another thing... how do you decide what to have as the alternative hypothesis? for example in this question:

'In a restaurant the ratio of non-vegetarian to vegetarian meals ordered is 3:1. One day a random sample of 20 people contained 2 who ordered a veg meal. Carry out a sig. test to determine where or not the proportion of veg meals ordred that day is lower than is usual. State your hypotheses and use 10% significance level.'

the null hypothesis is p=1/4 and alternative hypothesis is p<1/4?
7. Yup, that's what I would do for H0 and H1...
8. You got the "x = 15" thing right.
(Original post by bbcer)
Another thing... how do you decide what to have as the alternative hypothesis? for example in this question:

'In a restaurant the ratio of non-vegetarian to vegetarian meals ordered is 3:1. One day a random sample of 20 people contained 2 who ordered a veg meal. Carry out a sig. test to determine where or not the proportion of veg meals ordred that day is lower than is usual. State your hypotheses and use 10% significance level.'

the null hypothesis is p=1/4 and alternative hypothesis is p<1/4?
Yes, because the question says "lower than is usual" not "different to usual". If it were "different to usual" then you would need to do a two-tailed test with

H0: p = 1/4
H1: p 1/4.
9. (Original post by Jonny W)
You got the "x = 15" thing right.
Phew! That's thanks to your help!

What's the alternative hypothesis for this question...

'The success rate of the standard treatment for patients suffering from a particular skin disease is known to be 68%. X = no. for which the treatment is successful. A random sample of 10 patients receives the standard treament. Find, to 3dp, the probability that for exactly 6 patients the treatment will be succesful'?

H1: p ≠0.68? Or is there no need to state the alternative hypothesis for this kind of question because we're not working out whether something is significant or not?

H0: p=0.68
H1: ?

If H0 is true then X ~ B(10,0.68)
P(X=6) = 10C6 x 0.68^6 x 0.32^4
= 0.218 (3 dp)
10. They're not asking you to carry out a hypothesis test in this question, so you just need to work out P(X=6), as you've done.

If they had said: "On one particular day, 6 patients' treatments were successful. Test at the 5% significance level whether the proportion of successful treatments has decreased on this day," then you would make H1: p < 0.68 .

If they had said "....whether the proportion of successful treatments is different to usual on this day," then you would carry out a two tailed test, with H1: p ≠ 0.68 .
11. (Original post by mockel)
They're not asking you to carry out a hypothesis test in this question, so you just need to work out P(X=6), as you've done.

If they had said: "On one particular day, 6 patients' treatments were successful. Test at the 5% significance level whether the proportion of successful treatments has decreased on this day," then you would make H1: p < 0.68 .

If they had said "....whether the proportion of successful treatments is different to usual on this day," then you would carry out a two tailed test, with H1: p ≠ 0.68 .
Oh, I see. Thanks!

### Related university courses

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: June 13, 2005
The home of Results and Clearing

### 2,728

people online now

### 1,567,000

students helped last year
Today on TSR

### University open days

1. Sheffield Hallam University
Tue, 21 Aug '18
2. Bournemouth University
Wed, 22 Aug '18
3. University of Buckingham
Thu, 23 Aug '18
Poll
Useful resources

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams