DEV Community

mayank-p
mayank-p

Posted on

Statistically Significant

How do scientists test out different theories? One such strategy is using a p-value test.

Problem Statement

On average, do dogs weigh more than cats?

State the Hypothesis

This is where we make our guesses. When we try to prove that event A causes event B, we have to provide the burden of proof, just like a prosecutor in a court case. Now we state our hypotheses.

Null Hypothesis: On average, dogs do not weigh more than cats.
Alternate Hypothesis: On average, dogs weight more than cats.

Set the Significance Level

For the test, we need to set a certain probability threshold that will indicate whether or not the probability we get after doing the test is significant or not. Generally the threshold is set at 0.05 or 5%. So if the test gives a probability less than 5%, then the information is significant enough to reject the null hypothesis. If the probability is greater than 5%, then the test is not significant enough to reject the null hypothesis.

Set the significance level or alpha to 0.05

Perform the Test

After setting the significance level, we can now perform the statistical test. This can pretty much be any test like chi square test, t-test, z-score, etc. After performing the test, we get a probabilistic value based on the test. This is called the p-value. If the p-value is less than the significance level, then we reject the null hypothesis.

Conclusion

Now we can conclude our test.

P-value = 0.03. Therefore I reject my null hypothesis.
P-value = 0.16. Therefore I do not reject my null hypothesis.

Top comments (0)