Open Side Menu Go to the Top
Register
Null and Alternative Hypothesis testing Null and Alternative Hypothesis testing

06-19-2009 , 03:55 PM
1. In a clinical study of an allergy drug, 108 of the 203 subjects reported experiencing significant relief from their symptoms. Using a significance level of .01, test the claim that more than half of all those using the drug experienced relief.


2. According to a recent poll, 53% of Americans would vote for an incumbent president. If a sample of 100 people results in 45% who would vote for the incumbent, test the claim that the percentage is 53%. Use a .10 significance level.

If anyone can help me out with these problems and a few more I will be willing to pay. It all has to do with null and alternative hypotheses.
Null and Alternative Hypothesis testing Quote
06-19-2009 , 08:39 PM
Quote:
Originally Posted by timmy720
1. In a clinical study of an allergy drug, 108 of the 203 subjects reported experiencing significant relief from their symptoms. Using a significance level of .01, test the claim that more than half of all those using the drug experienced relief.


2. According to a recent poll, 53% of Americans would vote for an incumbent president. If a sample of 100 people results in 45% who would vote for the incumbent, test the claim that the percentage is 53%. Use a .10 significance level.

If anyone can help me out with these problems and a few more I will be willing to pay. It all has to do with null and alternative hypotheses.
You don't need to pay.

Concepts:

You're testing an observed value against a hypothesis. Since values are measured all sorts of ways - with different units, orders of magnitude, etc. - you have to compare the observed value to its inherent variability. This way, you can ignore the fact that one mean measures in 10^6 meters and the other measures in 10^-2 milliliters/second. The inherent variability will be measured similarly, so by comparing the observed value against it, you normalize your test statistic to a number (denotation depending on which probability distribution you're using) to which you can then attach a probability value.

You're testing to see whether your hypothesis is true. The claim that your hypothesis is false is called the null hypothesis (denoted H0). Your hypothesis, then, is called the alternative hypothesis (denoted Ha), and you validate it by rejecting the null hypothesis. That's how this works: you demonstrate false the claim that your hypothesis is false. You set a significance level (denoted alpha) that says if you produce a P-value - that is, the probability that you would have observed this value if the null was true - less than this number, then you reject the null.

When you're dealing with proportions, know that:
-1. Pi denotes the true, population proportion of a parameter. You don't know this, but your sample proportion (denoted P) is your best estimate.
-2. there is no inherent population variability to estimate. Every subject in your population can answer 'true' or 'false' to your parameter. You can, however, express the variance (denoted S^2) you'd run into if you were to sample from your population over and over again.

S^2 = P(1 - P)/n where n is your sample size

Exercises:

1.
Let
H0: Pi <= 0.5 because it's the complement of your hypothesis.
Ha: Pi > 0.5 because it's your hypothesis.

P = 108/203 ~ 0.532 is your sample proportion, and it's your best estimate of the population proportion. The variance of this sample relative to the population is

S^2 = 0.532(0.468)/203 ~ 0.001
S = sqrt(0.532(0.468)/203) ~ 0.035 is the standard deviation of this sample statistic relative to the population. This is the measure of variability to which you want to compare your sample proportion in the form

z* = (P - Pi')/S where Pi' is your hypothesized population proportion.

z* = (0.532 - 0.500)/0.035 = 0.032/0.035 ~ 0.914

The probability that you would get at least a z*-value of 0.914 is the integral of the z-curve from 0.914 to infinity. You can look up on a table or find on a calculator that the probability associated with a z*-value of 0.914 is 0.180. This is well above your significance level (denoted alpha) of 0.01, so you fail to reject the null.

2.
Let
H0: Pi = 0.53
Ha: Pi != 0.53

n = 100
P = 0.45
S^2 = 0.45(0.55)/100 ~ 0.002
S ~ 0.05

z* = (P - Pi')/S = (0.45 - 0.53)/0.05 = -0.08/0.05 = -1.6

P(z* < -1.6) ~ 0.055 represents the probability that you would get a sample proportion of 0.45 or less with a sample size of 100 if H0 was true. Since your P-value ~ 0.055 < 0.10, your significance level, you reject the null.

Last edited by Monkey Suite; 06-19-2009 at 08:47 PM.
Null and Alternative Hypothesis testing Quote
06-19-2009 , 09:06 PM
solid 4th post.
Null and Alternative Hypothesis testing Quote
06-20-2009 , 02:14 AM
Quote:
Originally Posted by Monkey Suite
You don't need to pay.

S^2 = 0.532(0.468)/203 ~ 0.001
S = sqrt(0.532(0.468)/203) ~ 0.035 is the standard deviation of this sample
Can you explain why we wouldn't use S^2 = 0.500(0.500)/203?

If we are testing the null hypothesis that p = 0.5, wouldn't we want to assume that p = 0.5 when we calculate the variance used for the test?
Null and Alternative Hypothesis testing Quote
06-20-2009 , 11:04 AM
Quote:
Originally Posted by bighomage
Can you explain why we wouldn't use S^2 = 0.500(0.500)/203?

If we are testing the null hypothesis that p = 0.5, wouldn't we want to assume that p = 0.5 when we calculate the variance used for the test?
You're calculating the variance of the sample, which includes 203 people. 108 of those people vote "yes", so the S^2 equation uses 108/203 as P.
Null and Alternative Hypothesis testing Quote
06-20-2009 , 07:36 PM
Quote:
Originally Posted by bighomage
Can you explain why we wouldn't use S^2 = 0.500(0.500)/203?

If we are testing the null hypothesis that p = 0.5, wouldn't we want to assume that p = 0.5 when we calculate the variance used for the test?
preflop is right. There are two intuitive reasons I can think for this.

Firstly, it's backwards reasoning. If you assume that you're right and conclude from the test that you're right, then is it really a valid conclusion?

Secondly, you're expressing the variance of the sample proportion P you'd see if you were to sample from your population over and over again. This is only dependent on your sample size since a larger sample size leads to a more accurate (lower variance) estimate of the true population value. It isn't dependent on your hypothesized value. If it was, then a value Pi' of 0 or 1 would imply a variance of 0, which we know is false.
Null and Alternative Hypothesis testing Quote
06-21-2009 , 09:45 AM
Quote:
Originally Posted by Monkey Suite
preflop is right. There are two intuitive reasons I can think for this.

Firstly, it's backwards reasoning. If you assume that you're right and conclude from the test that you're right, then is it really a valid conclusion?

Secondly, you're expressing the variance of the sample proportion P you'd see if you were to sample from your population over and over again. This is only dependent on your sample size since a larger sample size leads to a more accurate (lower variance) estimate of the true population value. It isn't dependent on your hypothesized value. If it was, then a value Pi' of 0 or 1 would imply a variance of 0, which we know is false.
My statistical background is limited, so I apologize if I sound dumb but I'm trying to learn.

Since our null hypothesis is p=0.5, aren't we basically assuming that this is right and looking for evidence that suggests that we're wrong (based on p-value)?

If we were flipping a coin and trying to show that the probability of getting heads is 0.5, and we had a sample size of 2 where we ended up with a tails both times, surely we wouldn't use a sample variance of 0 (right?).
Null and Alternative Hypothesis testing Quote
06-22-2009 , 01:17 AM
Quote:
Originally Posted by bighomage
My statistical background is limited, so I apologize if I sound dumb but I'm trying to learn.

Since our null hypothesis is p=0.5, aren't we basically assuming that this is right and looking for evidence that suggests that we're wrong (based on p-value)?

If we were flipping a coin and trying to show that the probability of getting heads is 0.5, and we had a sample size of 2 where we ended up with a tails both times, surely we wouldn't use a sample variance of 0 (right?).
Yes. You default to your null hypothesis unless you can demonstrate evidence to the contrary; your P-value summarizes that evidence. That probability tells you how reasonable the null hypothesis is.

Your question perfectly exemplifies the need for large sample sizes. You can't build a hypothesis test or a confidence interval without a non-zero variance, so the fact that both coins flipped tails tells you nothing statistically except that: 2/2 trials resulted tails.

As a general rule, your sample size should be of a large enough size such that

nPi' > 0.1
n(1 - Pi') > 0.1

where Pi' is your hypothesized probability. The justification for this lies in the fact that you simply can't get certain sample proportions without a large enough sample size. For example, let's say someone shows you a number generator he wrote which he says randomly selects single-valued lottery numbers from 1 to 64. Let's also say that he always buys lottery tickets with the number 7 on the grounds that he thinks it's 'lucky'. You might believe that he coded the lottery program to come up with the number 7 with Pi(7) > 1/64. Hence,

H0: Pi(7) = 1/64
Ha: Pi(7) > 1/64

What are the bounds on your sample size? If you keep running trials but can't seem to get a 7, then your variance is 0, and you can't test anything. If you get a 7 after a few runs, then the sample proportion P(7) is going to be much larger than 1/64, and your variance is going to be very large due to the small sample size. This is problematic. Intuitively, you know you're going to need to run 64 trials at the very least. The rule would have you run

n(1/64) = 10
n = 640

trials. Of course, if you're talking about trials of a simple number generator, you'd be running tens of thousands of trials in a matter of seconds, but the example holds.
Null and Alternative Hypothesis testing Quote
06-22-2009 , 03:07 AM
Quote:
Originally Posted by Monkey Suite
As a general rule, your sample size should be of a large enough size such that

nPi' > 0.1
n(1 - Pi') > 0.1

where Pi' is your hypothesized probability.
Correction:

nPi' > 10
n(1 - Pi') > 10
Null and Alternative Hypothesis testing Quote
04-15-2019 , 12:48 PM
Hello,

This thread was helpful to my understanding of this matter.

Thank you.
Null and Alternative Hypothesis testing Quote
04-15-2019 , 06:55 PM
We aim for truth and satisfaction SMP does. A Decade can go by and we still deliver.
Null and Alternative Hypothesis testing Quote

      
m