I am trying to understand hypothesis testing, I've been following this tutorial: http://www.r-tutor.com/elementary-statistics/hypothesis-testing/two-tailed-test-population-proportion, but the combination of double negatives is getting a little confusing.
In my data, I have two separate populations (from the same overall population), for simplicity I shall call them "class1" and "class2". I want to check the probability that the probability of something occuring within these two classes is NOT EQUAL.
If I understand this correctly, this means I have to present the null hypothesis that they ARE EQUAL, and test if I can reject it.
Using R
and the prop.test
method:
class1 has a total of 1551 observations class2 has a total of 1446 observations
the probability of something occurring in class1 is 52.7% (817 observations) the probability of something occurring in class2 is 58.2% (842 observations)
On the surface, these probabilities do look different, so - looking good.
prop.test(817, 1551, p=0.582)
gives: p-value = 1.159e-05
prop.test(842, 1446, p=0.527)
gives: p-value = 2.849e-05
So, from what I can gather, this means that my probabilities ARE different, so I reject the null hypothesis. Is this correct?
Some questions:
- Does it matter what the distribution of my data is?
- What is the significance level of the test (is it the p-value, if so which value do I use?)
Thanks