# Hypothesis Testing: p-value

Show 40 post(s) from this thread on one page
Page 1 of 2 12 Last
• March 30th 2009, 01:27 AM
kingwinner
Hypothesis Testing: p-value
Definition: A p-value is the probability that the test statistic would take a value AS EXTREME OR MORE EXTREME than that ACTUALLY OBSERVED when H_o, the null hypothesis, is true. If the p-value is samll, it gives evidence against H_o.

Consider the test for the pouplation mean μ of a normal population with known population variance.
Case (i):
Ho: μ=μ_o
Ha: μ>μ_o
p-value=P(Z>Z_stat) where Z~N(0,1)
Here I can understand the > here since the "as extreme or more extreme" is the direction away from H_o towards H_a.

Case (ii):
Ho: μ=μ_o
Ha: μ<μ_o
p-value=P(Z<Z_stat)
Here I can understand the < here since the "as extreme or more extreme" is the direction away from H_o towards H_a.

Case (iii):
Ho: μ = μ_o
Ha: μ μ_o
p-value = P(Z<-|Z_stat|) + P(Z>|Z_stat|) = 2 P(Z>|Z_stat|)
This part I don't understand. How does the "as extreme or more extreme" idea above translates into this formula for p-value?

So, for example, if the observed value of the test statistic for a two-tailed test is 1.65, then the direction away from H_o towards H_a should be to the right (I believe), so it looks like p-value = P(Z>1.65), but the above says that p-value = P(Z>1.65) + P(Z<-1.65). How come?
I think I am confused about the meaning of the sentence "a value AS EXTREME OR MORE EXTREME than that ACTUALLY OBSERVED". What does it actually mean?

Thanks for explaining!
• March 30th 2009, 10:10 PM
matheagle
This definition is quite similar to the one I made up years ago.
I say worse off than the test stat.
The point here is that in a two sided test. if your test stat is 1.65 then -2 is even worse. YOU decide on $H_a$ if your test stat is -2 or 3 or -4. You decide on $H_o$ for z-scores is near 0 and decide on $H_a$ any time you are far away from zero in either direction in the two sided situation.
• March 30th 2009, 11:30 PM
kingwinner
If the test stat is 1.65, then 2 is even wrose since it's larger than 1.65, I got that.
But -2 is also even worse, why?
I am quite confused about the p-value...
• March 30th 2009, 11:41 PM
matheagle
Because this is a two sided test.
You will agree with the null hypothesis for z scores near zero.
BUT you reject the null hypothesis for z score that are far from zero in EITHER direction. So a z score of -2 or 2 say the same thing.
• March 30th 2009, 11:49 PM
kingwinner
OK!

In case (i), how come there are no absolute value signs around Z_stat? i.e. why is p-value=P(Z>Z_stat) and not P(Z> |Z_stat|)?

So if Z_stat=-1000, then we still have p-value=P(Z>-1000)?
• March 31st 2009, 12:12 AM
matheagle
Quote:

Originally Posted by kingwinner
OK!

In case (i), how come there are no absolute value signs around Z_stat? i.e. why is p-value=P(Z>Z_stat) and not P(Z> |Z_stat|)?

So if Z=-1000, then we still have p-value=P(Z>-1000)?

Because the uniformly most powerful test via Neyman-Pearson say to only reject the null hypthesis for large values of your sample mean in case i.
It's 3am and I am going to bed.
• March 31st 2009, 08:50 PM
kingwinner
Ho: μ=μ_o
Ha: μ>μ_o
So in case (i), what if Z_stat=-1000? Do we still have p-value=P(Z>-1000) in this case?
• March 31st 2009, 08:55 PM
matheagle
yes, and that's approximately one and you will NOT reject $H_0$
• March 31st 2009, 11:45 PM
kingwinner
Quote:

Originally Posted by matheagle
yes, and that's approximately one and you will NOT reject $H_0$

Ho: μ=μ_o
Ha: μ>μ_o

So if we OBSERVED a value of sample mean WAY WAY smaller than μ_o, we would still accept (not reject) Ho? That looks a bit weird to me...
• March 31st 2009, 11:50 PM
matheagle
Quote:

Originally Posted by kingwinner
Ho: μ=μ_o
Ha: μ>μ_o

So if we OBSERVED a value of sample mean WAY WAY smaller than μ_o, we would still accept (not reject) Ho? That looks a bit weird to me...

why?
if we're testing $H_0:\mu=2$ vs. $H_a:\mu>2$
and you observe the sample mean to be 0, you should NOT accept $H_a$.
The goal is whether or not to accept $H_a$.
AND what if the sample mean was 2? Then your p-value is .5 and again you WON'T decide on $H_a$.

And by the way the null hypothesis of $H_0:\mu=2$ is treated as the same as $H_0:\mu\le 2$.
In this second case the $\alpha$ is obtained by taking the supremum over the region $\mu\le 2$, since it's not a simple hypothesis.
• April 1st 2009, 03:13 AM
kingwinner
Quote:

Originally Posted by matheagle
why?
if we're testing $H_0:\mu=2$ vs. $H_a:\mu>2$
and you observe the sample mean to be 0, you should NOT accept $H_a$.

I agree that you should not accept H_a (since 0 is even further away from H_a).
But we should still reject H_o (since the observed value is much smaller), right? Can we not accept H_a and at the same time reject H_o? Not accepting H_a does not mean that we cannot reject H_o.

Quote:

And by the way the null hypothesis of $H_0:\mu=2$ is treated as the same as $H_0:\mu\le 2$.
In this second case the $\alpha$ is obtained by taking the supremum over the region $\mu\le 2$, since it's not a simple hypothesis.
But how can a simple hypothesis and a composite hypothesis be regarded as the SAME??

Thanks!
• April 1st 2009, 05:50 AM
matheagle
YOU have to decide on one or the other, there's no $H_2$.
BUT what I say is that we either accept $H_a$ or we fail to accept $H_a$.
Since we assume accept $H_0$ from the get go, doesn't insure it's correct.
Again, I look at this like a proof by contradiction.
• April 1st 2009, 11:39 PM
kingwinner
Quote:

Originally Posted by matheagle
And by the way the null hypothesis of $H_0:\mu=2$ is treated as the same as $H_0:\mu\le 2$.

How can they be treated as the SAME? Can you please explain a bit more on this? I think this idea might be important...

Thank you!
• April 7th 2009, 08:01 PM
kingwinner
Now I am having a little trouble translating the word problem into a set of hypotheses Ho & Ha...

A random sample of 26 students who are enrolled in School A was taken and their SAT scores were recorded. The sample mean was 548 with a sample standared derivation s=57. The principal of School A claims that the mean SAT scores of students in her school is higher than the mean SAT scores of all the students in City B which is known to be 530. (City B is the city where School A is located) Does the data support the principal's claim? Include a set of hypotheses. Use alpha=0.05.

Just to confirm...in this case, the test would be Ho: μ=530 v.s. Ha: μ>530 , am I right?
• April 7th 2009, 10:30 PM
kingwinner
Quote:

Originally Posted by kingwinner
Now I am having a little trouble translating the word problem into a set of hypotheses Ho & Ha...

A random sample of 26 students who are enrolled in School A was taken and their SAT scores were recorded. The sample mean was 548 with a sample standared derivation s=57. The principal of School A claims that the mean SAT scores of students in her school is higher than the mean SAT scores of all the students in City B which is known to be 530. (City B is the city where School A is located) Does the data support the principal's claim? Include a set of hypotheses. Use alpha=0.05.

Just to confirm...in this case, the test would be Ho: μ=530 v.s. Ha: μ>530 , am I right?

I have checked my notes and textbook and I believe the test Ho: μ=530 v.s. Ha: μ>530 is CORRECT because in many similar problems in my notes and textbook, this is the implied test based on the wording "...claims that the mean SAT scores of students in her school is HIGHER THAN..."

Now my question is:
Why is the test NOT Ho: μ530 v.s. Ha: μ>530? In this case, Ho and Ha are complements of one another. In general, do Ho and Ha always have to be complements?
Show 40 post(s) from this thread on one page
Page 1 of 2 12 Last